完成错误码
parent
4c3997b628
commit
54378aeed3
@ -1,45 +1,27 @@
|
||||
package cn.iocoder.dashboard.modules.system.controller.errorcode.dto;
|
||||
|
||||
import cn.iocoder.dashboard.framework.validator.InEnum;
|
||||
import cn.iocoder.dashboard.modules.system.enums.errorcode.ErrorCodeTypeEnum;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 错误码创建 DTO
|
||||
*/
|
||||
@ApiModel("错误码创建 DTO")
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ErrorCodeCreateDTO implements Serializable {
|
||||
public class ErrorCodeCreateDTO {
|
||||
|
||||
/**
|
||||
* 错误码编码
|
||||
*/
|
||||
@ApiModelProperty(value = "错误码编码", required = true, example = "10086")
|
||||
@NotNull(message = "错误码编码不能为空")
|
||||
private Integer code;
|
||||
/**
|
||||
* 错误码错误提示
|
||||
*/
|
||||
@ApiModelProperty(value = "错误码错误提示", required = true, example = "艿艿长的丑")
|
||||
@NotEmpty(message = "错误码错误提示不能为空")
|
||||
private String message;
|
||||
/**
|
||||
* 错误码类型
|
||||
*/
|
||||
@NotNull(message = "错误码类型不能为空")
|
||||
@InEnum(value = ErrorCodeTypeEnum.class, message = "错误码类型必须是 {value}")
|
||||
private Integer type;
|
||||
/**
|
||||
* 错误码分组
|
||||
*/
|
||||
@NotNull(message = "错误码分组不能为空")
|
||||
@ApiModelProperty(value = "错误码分组", required = true, example = "user-service")
|
||||
@NotEmpty(message = "错误码分组不能为空")
|
||||
private String group;
|
||||
/**
|
||||
* 错误码备注
|
||||
*/
|
||||
@ApiModelProperty(value = "错误码备注", example = "我就是一个备注")
|
||||
private String memo;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1,33 +1,24 @@
|
||||
package cn.iocoder.dashboard.modules.system.controller.errorcode.dto;
|
||||
|
||||
import cn.iocoder.dashboard.common.pojo.PageParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 错误码分页 DTO
|
||||
*/
|
||||
@ApiModel("错误码分页 DTO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
public class ErrorCodePageDTO extends PageParam {
|
||||
|
||||
/**
|
||||
* 错误码编码
|
||||
*/
|
||||
@ApiModelProperty(value = "错误码编码", required = true)
|
||||
private Integer code;
|
||||
/**
|
||||
* 错误码错误提示
|
||||
*
|
||||
* 模糊匹配
|
||||
*/
|
||||
@ApiModelProperty(value = "错误码错误提示", required = true)
|
||||
private String message;
|
||||
/**
|
||||
* 错误码分组
|
||||
*
|
||||
* 模糊匹配
|
||||
*/
|
||||
@ApiModelProperty(value = "错误码分组", required = true)
|
||||
private String group;
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue