添加分组

This commit is contained in:
benpaodeyouyusi
2020-05-22 15:42:33 +08:00
parent 4f095309fd
commit 4293fde5ad
14 changed files with 212 additions and 63 deletions

View File

@@ -1,16 +1,26 @@
package cn.iocoder.mall.system.rpc.api.errorcode;
import cn.iocoder.common.framework.vo.CommonResult;
import cn.iocoder.mall.system.rpc.request.errorcode.ErrorCodeAddRequest;
import cn.iocoder.mall.system.rpc.request.systemlog.ExceptionLogAddRequest;
import cn.iocoder.mall.system.rpc.response.errorcode.ErrorCodeResponse;
import java.util.List;
/**
* ErrorCode RPC 接口
* 提供其他服务初始化加载错误码到db中同时提供读取该服务的错误码信息
* 同时提供删除接口,
* @author ding
*/
public interface ErrorCodeRPC {
CommonResult<List<ErrorCodeResponse>> getErrorCode();
CommonResult<List<ErrorCodeResponse>> getErrorCodeByGroup(Integer group);
CommonResult<Boolean> addErrorCode(ErrorCodeAddRequest errorCodeAddRequest);
CommonResult<Boolean> addErrorCodeList(List<ErrorCodeAddRequest> list);
CommonResult<Boolean> deleteErrorCodeByGroup(Integer group, Integer type);
}

View File

@@ -0,0 +1,33 @@
package cn.iocoder.mall.system.rpc.request.errorcode;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
/**
* 错误码模块,枚举初始化错误码时使用
* @author ding
*/
@Data
@Accessors(chain = true)
public class ErrorCodeAddRequest implements Serializable {
@ApiModelProperty(value = "错误码信息", required = true)
@NotEmpty(message = "错误码信息不能为空")
private String message;
@ApiModelProperty(value = "错误码编码")
@NotEmpty(message = "错误码编码不能为空")
private Integer code;
@ApiModelProperty(value = "错误码分组,字典表获取")
@NotEmpty(message = "错误码分组不能为空")
private Integer group;
@ApiModelProperty(value = "错误码角色,系统内置(枚举)还是自定义")
@NotEmpty(message = "错误码角色不能空")
private Integer type;
}