通用实体类
1. 通用列表查询类
内置了园区ID(park_id)、页码(page)、行数(size),业务实际查询类可继承它来进行简化
public class CommonQueryVO implements Serializable {
private static final long serialVersionUID = 6990794642352554429L;
@ApiModelProperty("园区ID")
@Length(max = ID_LENGTH)
@InvalidCode(value = "1203", message = "{park}")
private String parkId;
@ApiModelProperty(value = "页码", required = true)
@NotNull
@Range(min = 1, max = 999)
@InvalidCode(value = "1201", message = "{page}")
private Integer page;
@ApiModelProperty(value = "行数", required = true)
@NotNull
@Range(min = 1, max = 999)
@InvalidCode(value = "1202", message = "{size}")
private Integer size;
}
2. 通用业务用户实体类
配合IBaseController,用以获取用户,以隔离业务与登录用户的耦合:IBaseController
@Api("业务通用用户类")
public class User implements Serializable {
private static final long serialVersionUID = 566450443127827654L;
public User() {
}
/**
* 使用当前用户初始化业务用户
*
* @param loginUser 登录用户
*/
public User(LoginUser loginUser) {
BeanUtil.copyProperties(loginUser, this);
}
@ApiModelProperty("用户ID")
private String userId;
@ApiModelProperty("用户名称")
private String nickName;
@ApiModelProperty("部门ID")
private String deptId;
@ApiModelProperty("运营企业ID/租户ID")
private String entId;
private String platform;
private String openId;
@ApiModelProperty("园区ID")
private String parkId;
@ApiModelProperty("园区编号")
private String parkCode;
@ApiModelProperty("园区名称")
private String parkName;
@ApiModelProperty("部门名称")
private String deptName;
@ApiModelProperty("运营企业名称")
private String entName;
@ApiModelProperty("员工ID")
private String staffId;
@ApiModelProperty("员工名称")
private String staffName;
@ApiModelProperty("手机号码")
private String phoneNumber;
@ApiModelProperty("版本")
private String version;
@ApiModelProperty("头像")
private String avatar;
}
###
文档更新时间: 2022-02-25 09:13 作者:陆鸿睿