| | |
| | | package org.dromara.system.domain.bo; |
| | | |
| | | import org.dromara.common.core.constant.UserConstants; |
| | | import org.dromara.common.core.xss.Xss; |
| | | import org.dromara.common.mybatis.core.domain.BaseEntity; |
| | | import org.dromara.common.sensitive.annotation.Sensitive; |
| | | import org.dromara.common.sensitive.core.SensitiveStrategy; |
| | | import org.dromara.system.domain.SysUser; |
| | | import io.github.linpeilie.annotations.AutoMapper; |
| | | import jakarta.validation.constraints.Email; |
| | | import jakarta.validation.constraints.NotBlank; |
| | |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.util.Date; |
| | | import org.dromara.common.core.constant.SystemConstants; |
| | | import org.dromara.common.core.xss.Xss; |
| | | import org.dromara.common.mybatis.core.domain.BaseEntity; |
| | | import org.dromara.system.domain.SysUser; |
| | | |
| | | /** |
| | | * 用户信息业务对象 sys_user |
| | |
| | | * 用户昵称 |
| | | */ |
| | | @Xss(message = "用户昵称不能包含脚本字符") |
| | | @NotBlank(message = "用户昵称不能为空") |
| | | @Size(min = 0, max = 30, message = "用户昵称长度不能超过{max}个字符") |
| | | private String nickName; |
| | | |
| | |
| | | /** |
| | | * 用户邮箱 |
| | | */ |
| | | @Sensitive(strategy = SensitiveStrategy.EMAIL) |
| | | @Email(message = "邮箱格式不正确") |
| | | @Size(min = 0, max = 50, message = "邮箱长度不能超过{max}个字符") |
| | | private String email; |
| | |
| | | /** |
| | | * 手机号码 |
| | | */ |
| | | @Sensitive(strategy = SensitiveStrategy.PHONE) |
| | | private String phonenumber; |
| | | |
| | | /** |
| | | * 用户性别(0男 1女 2未知) |
| | | */ |
| | | private String sex; |
| | | |
| | | /** |
| | | * 头像地址 |
| | | */ |
| | | private Long avatar; |
| | | |
| | | /** |
| | | * 密码 |
| | |
| | | * 帐号状态(0正常 1停用) |
| | | */ |
| | | private String status; |
| | | |
| | | /** |
| | | * 最后登录IP |
| | | */ |
| | | private String loginIp; |
| | | |
| | | /** |
| | | * 最后登录时间 |
| | | */ |
| | | private Date loginDate; |
| | | |
| | | /** |
| | | * 备注 |
| | |
| | | */ |
| | | private Long roleId; |
| | | |
| | | /** |
| | | * 排除不查询的用户(工作流用) |
| | | */ |
| | | private String excludeUserIds; |
| | | |
| | | public SysUserBo(Long userId) { |
| | | this.userId = userId; |
| | | } |
| | | |
| | | public boolean isSuperAdmin() { |
| | | return UserConstants.SUPER_ADMIN_ID.equals(this.userId); |
| | | return SystemConstants.SUPER_ADMIN_ID.equals(this.userId); |
| | | } |
| | | |
| | | } |