| | |
| | |
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | | import javax.validation.constraints.Email;
|
| | | import javax.validation.constraints.NotBlank;
|
| | | import javax.validation.constraints.Size;
|
| | | import com.fasterxml.jackson.annotation.JsonIgnore;
|
| | | import jakarta.validation.constraints.*;
|
| | | import org.apache.commons.lang3.builder.ToStringBuilder;
|
| | | import org.apache.commons.lang3.builder.ToStringStyle;
|
| | | import com.fasterxml.jackson.annotation.JsonProperty;
|
| | | import com.ruoyi.common.core.annotation.Excel;
|
| | | import com.ruoyi.common.core.annotation.Excel.ColumnType;
|
| | | import com.ruoyi.common.core.annotation.Excel.Type;
|
| | | import com.ruoyi.common.core.constant.UserConstants;
|
| | | import com.ruoyi.common.core.annotation.Excels;
|
| | | import com.ruoyi.common.core.web.domain.BaseEntity;
|
| | | import com.ruoyi.common.core.xss.Xss;
|
| | |
|
| | | /**
|
| | | * 用户对象 sys_user
|
| | |
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | /** 用户ID */
|
| | | @Excel(name = "用户序号", cellType = ColumnType.NUMERIC, prompt = "用户编号")
|
| | | @Excel(name = "用户序号", type = Type.EXPORT, cellType = ColumnType.NUMERIC, prompt = "用户编号")
|
| | | private Long userId;
|
| | |
|
| | | /** 部门ID */
|
| | |
| | | private String email;
|
| | |
|
| | | /** 手机号码 */
|
| | | @Excel(name = "手机号码")
|
| | | @Excel(name = "手机号码", cellType = ColumnType.TEXT)
|
| | | private String phonenumber;
|
| | |
|
| | | /** 用户性别 */
|
| | |
| | | /** 密码 */
|
| | | private String password;
|
| | |
|
| | | /** 帐号状态(0正常 1停用) */
|
| | | @Excel(name = "帐号状态", readConverterExp = "0=正常,1=停用")
|
| | | /** 账号状态(0正常 1停用) */
|
| | | @Excel(name = "账号状态", readConverterExp = "0=正常,1=停用")
|
| | | private String status;
|
| | |
|
| | | /** 删除标志(0代表存在 2代表删除) */
|
| | |
| | | /** 最后登录时间 */
|
| | | @Excel(name = "最后登录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Type.EXPORT)
|
| | | private Date loginDate;
|
| | |
|
| | | /** 密码最后更新时间 */
|
| | | private Date pwdUpdateDate;
|
| | |
|
| | | /** 部门对象 */
|
| | | @Excels({
|
| | |
| | |
|
| | | public boolean isAdmin()
|
| | | {
|
| | | return isAdmin(this.userId);
|
| | | }
|
| | |
|
| | | public static boolean isAdmin(Long userId)
|
| | | {
|
| | | return userId != null && 1L == userId;
|
| | | return UserConstants.isAdmin(userId);
|
| | | }
|
| | |
|
| | | public Long getDeptId()
|
| | |
| | | this.deptId = deptId;
|
| | | }
|
| | |
|
| | | @Xss(message = "用户昵称不能包含脚本字符")
|
| | | @Size(min = 0, max = 30, message = "用户昵称长度不能超过30个字符")
|
| | | public String getNickName()
|
| | | {
|
| | |
| | | this.nickName = nickName;
|
| | | }
|
| | |
|
| | | @Xss(message = "用户账号不能包含脚本字符")
|
| | | @NotBlank(message = "用户账号不能为空")
|
| | | @Size(min = 0, max = 30, message = "用户账号长度不能超过30个字符")
|
| | | public String getUserName()
|
| | |
| | | this.avatar = avatar;
|
| | | }
|
| | |
|
| | | @JsonIgnore
|
| | | @JsonProperty
|
| | | public String getPassword()
|
| | | {
|
| | | return password;
|
| | |
| | | public void setLoginDate(Date loginDate)
|
| | | {
|
| | | this.loginDate = loginDate;
|
| | | }
|
| | |
|
| | | public Date getPwdUpdateDate()
|
| | | {
|
| | | return pwdUpdateDate;
|
| | | }
|
| | |
|
| | | public void setPwdUpdateDate(Date pwdUpdateDate)
|
| | | {
|
| | | this.pwdUpdateDate = pwdUpdateDate;
|
| | | }
|
| | |
|
| | | public SysDept getDept()
|
| | |
| | | {
|
| | | this.roleId = roleId;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public String toString() {
|
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
| | |
| | | .append("delFlag", getDelFlag())
|
| | | .append("loginIp", getLoginIp())
|
| | | .append("loginDate", getLoginDate())
|
| | | .append("pwdUpdateDate", getPwdUpdateDate())
|
| | | .append("createBy", getCreateBy())
|
| | | .append("createTime", getCreateTime())
|
| | | .append("updateBy", getUpdateBy())
|