123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158 |
- package com.xy.dto;
- import com.fasterxml.jackson.annotation.JsonFormat;
- import com.xy.utils.PageBean;
- import io.swagger.annotations.ApiModelProperty;
- import lombok.Data;
- import lombok.experimental.Accessors;
- import javax.validation.constraints.NotBlank;
- import javax.validation.constraints.NotNull;
- import javax.validation.constraints.Pattern;
- import java.time.LocalDate;
- import java.time.LocalDateTime;
- import java.util.List;
- /**
- * <p>
- * 用户表
- * </p>
- *
- * @author lijin
- * @since 2023-01-12
- */
- public class UserInfoDto {
- @Data
- @Accessors(chain = true)
- public static class Page extends Vo {
- @ApiModelProperty(value = "分页对象", required = true)
- private PageBean page;
- @JsonFormat(pattern = "yyyy-MM-dd")
- @ApiModelProperty(value = "创建时间-起")
- private LocalDate beginCreateTime;
- @JsonFormat(pattern = "yyyy-MM-dd")
- @ApiModelProperty(value = "创建时间-始")
- private LocalDate endCreateTime;
- public LocalDateTime getBeginCreateTime() {
- return beginCreateTime == null ? null : beginCreateTime.atTime(0, 0, 0);
- }
- public LocalDateTime getEndCreateTime() {
- return endCreateTime == null ? null : endCreateTime.atTime(23, 59, 59);
- }
- }
- @Data
- @Accessors(chain = true)
- public static class Save extends Vo {
- @NotNull(message = "sysIds不能为空")
- @ApiModelProperty("系统id集合")
- private String sysIds;
- @NotBlank(message = "账户名称不能为空")
- @ApiModelProperty(value = "账户名称", required = true)
- private String name;
- @NotBlank(message = "phone不能为空")
- @ApiModelProperty(value = "手机", required = true)
- @Pattern(regexp = "^((13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(17[013678])|(18[0,2-9])|(19[0,2-9]))\\d{8}$", message = "phone格式错误")
- private String tel;
- @ApiModelProperty(value = "邮件")
- @Pattern(regexp = "^(\\w+([-.][A-Za-z0-9]+)*){3,18}@\\w+([-.][A-Za-z0-9]+)*\\.\\w+([-.][A-Za-z0-9]+)*$", message = "email格式错误")
- private String mail;
- @ApiModelProperty(value = "密码", required = true)
- @NotBlank(message = "密码不可为空")
- @Pattern(regexp = "^[a-zA-z0-9]{6,11}$", message = "password必须为数字或字母,长度6-11位之间")
- private String password;
- @ApiModelProperty(value = "角色ID(数组)")
- private List<Long> roleIds;
- }
- @Data
- @Accessors(chain = true)
- public static class Update {
- @NotNull(message = "userId不能为空")
- @ApiModelProperty(value = "id")
- private Long userId;
- @ApiModelProperty(value = "手机", required = true)
- @Pattern(regexp = "^((13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(17[013678])|(18[0,2-9])|(19[0,2-9]))\\d{8}$", message = "phone格式错误")
- private String tel;
- @ApiModelProperty(value = "邮件")
- @Pattern(regexp = "^(\\w+([-.][A-Za-z0-9]+)*){3,18}@\\w+([-.][A-Za-z0-9]+)*\\.\\w+([-.][A-Za-z0-9]+)*$", message = "email格式错误")
- private String mail;
- @ApiModelProperty(value = "密码", required = true)
- @Pattern(regexp = "^[a-zA-z0-9]{6,11}$", message = "password必须为数字或字母,长度6-11位之间")
- private String password;
- @ApiModelProperty(value = "用户类型")
- private String userType;
- @ApiModelProperty(value = "状态")
- private Boolean status;
- @ApiModelProperty(value = "系统id集合")
- private String sysIds;
- }
- @Data
- @Accessors(chain = true)
- public static class Vo {
- @ApiModelProperty(value = "id")
- private Long userId;
- @ApiModelProperty(value = "用户昵称")
- private String name;
- @ApiModelProperty(value = "手机号")
- private String tel;
- @ApiModelProperty(value = "邮件")
- private String mail;
- @ApiModelProperty(value = "微信开放平台识别码")
- private String unionid;
- @ApiModelProperty(value = "系统id集合")
- private String sysIds;
- @ApiModelProperty(value = "权限系统用户id")
- private Long authorizeUserId;
- @ApiModelProperty(value = "用户类型")
- private String userType;
- @ApiModelProperty(value = "状态")
- private Boolean status;
- @ApiModelProperty(value = "创建人")
- private Long createUser;
- @ApiModelProperty(value = "创建时间")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private LocalDateTime createTime;
- @ApiModelProperty(value = "更新人")
- private Long updateUser;
- @ApiModelProperty(value = "更新时间")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private LocalDateTime updateTime;
- }
- }
|