完成管理后台的 admin 相关接口
This commit is contained in:
@@ -8,7 +8,6 @@ import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Pattern;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 管理员添加 BO
|
||||
@@ -20,9 +19,9 @@ public class AdminCreateDTO implements Serializable {
|
||||
/**
|
||||
* 昵称
|
||||
*/
|
||||
@NotEmpty(message = "昵称不能为空")
|
||||
@Length(max = 10, message = "昵称长度最大为 10 位")
|
||||
private String nickname;
|
||||
@NotEmpty(message = "真实名字不能为空")
|
||||
@Length(max = 10, message = "真实名字长度最大为 10 位")
|
||||
private String name;
|
||||
/**
|
||||
* 部门编号
|
||||
*/
|
||||
@@ -47,11 +46,11 @@ public class AdminCreateDTO implements Serializable {
|
||||
* 创建管理员编号
|
||||
*/
|
||||
@NotNull(message = "创建管理员编号不能为空")
|
||||
private String createAdminId;
|
||||
private Integer createAdminId;
|
||||
/**
|
||||
* 创建 IP
|
||||
*/
|
||||
@NotNull(message = "创建 IP 不能为空")
|
||||
private Date createIp;
|
||||
private String createIp;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,22 +1,25 @@
|
||||
package cn.iocoder.mall.systemservice.rpc.admin.dto;
|
||||
|
||||
import cn.iocoder.common.framework.vo.PageParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@ApiModel("管理员分页查询 DTO")
|
||||
/**
|
||||
* 管理员分页查询 DTO
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
public class AdminPageDTO extends PageParam {
|
||||
|
||||
@ApiModelProperty(value = "真实名字,模糊匹配", example = "小王")
|
||||
/**
|
||||
* 真实名字,模糊匹配
|
||||
*/
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "部门编号")
|
||||
/**
|
||||
* 部门编号
|
||||
*/
|
||||
private Integer departmentId;
|
||||
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package cn.iocoder.mall.systemservice.rpc.admin.dto;
|
||||
|
||||
import cn.iocoder.common.framework.enums.CommonStatusEnum;
|
||||
import cn.iocoder.common.framework.validator.InEnum;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
@@ -24,15 +23,13 @@ public class AdminUpdateDTO implements Serializable {
|
||||
@NotNull(message = "管理员编号不能为空")
|
||||
private Integer id;
|
||||
/**
|
||||
* 昵称
|
||||
* 真实名字
|
||||
*/
|
||||
@ApiModelProperty(value = "昵称", required = true, example = "小王")
|
||||
@Length(max = 10, message = "昵称长度最大为 10 位")
|
||||
private String nickname;
|
||||
@Length(max = 10, message = "真实名字长度最大为 10 位")
|
||||
private String name;
|
||||
/**
|
||||
* 部门编号
|
||||
*/
|
||||
@ApiModelProperty(value = "部门编号", required = true, example = "1")
|
||||
private Integer departmentId;
|
||||
/**
|
||||
* 状态
|
||||
@@ -48,7 +45,6 @@ public class AdminUpdateDTO implements Serializable {
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
@ApiModelProperty(value = "密码", required = true, example = "buzhidao")
|
||||
@Length(min = 4, max = 16, message = "密码长度为 4-16 位")
|
||||
private String password;
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 管理员 DO
|
||||
@@ -37,4 +38,9 @@ public class AdminVO implements Serializable {
|
||||
*/
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user