店铺员工新增校验

This commit is contained in:
磷叶 2024-12-02 17:52:49 +08:00
parent 2a8851feda
commit f85f168766

View File

@ -30,7 +30,7 @@ public class StoreStaff extends BaseEntity
@Excel(name = "店铺ID")
@ApiModelProperty("店铺ID")
@NotNull(message = "店铺不能为空", groups = {ValidGroup.Create.class})
@NotNull(message = "店铺不能为空", groups = {ValidGroup.Create.class, ValidGroup.FrontCreate.class})
private Long storeId;
@Excel(name = "用户ID")
@ -39,19 +39,19 @@ public class StoreStaff extends BaseEntity
@Excel(name = "角色", readConverterExp = "1=合伙人")
@ApiModelProperty("角色")
@NotNull(message = "角色不能为空", groups = {ValidGroup.Create.class})
@NotNull(message = "角色不能为空", groups = {ValidGroup.Create.class, ValidGroup.FrontCreate.class})
private String role;
@Excel(name = "分成比例")
@ApiModelProperty("分成比例")
@NotNull(message = "分成比例不能为空", groups = {ValidGroup.Create.class})
@NotNull(message = "分成比例不能为空", groups = {ValidGroup.Create.class, ValidGroup.FrontCreate.class})
@Min(value = 0, message = "分成比例不允许小于0")
@Max(value = 100, message = "分成比例不允许大于100")
private BigDecimal point;
@Excel(name = "是否启用")
@ApiModelProperty("是否启用")
@NotNull(message = "是否启用不能为空", groups = {ValidGroup.Create.class})
@NotNull(message = "是否启用不能为空", groups = {ValidGroup.Create.class, ValidGroup.FrontCreate.class})
private Boolean enabled;
@Excel(name = "权限列表", readConverterExp = "1=查看店铺,2=操作店铺,3=查看设备,4=操作设备,5=查看订单,6=操作订单")