From b601ad896966018e9e9251b699cacaee14f56721 Mon Sep 17 00:00:00 2001 From: huangzhen <867127663@qq.com> Date: 星期二, 06 九月 2022 10:08:29 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/main/java/com/ruoyi/doublePrevention/enums/ErrorCodes.java | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 56 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/ruoyi/doublePrevention/enums/ErrorCodes.java b/src/main/java/com/ruoyi/doublePrevention/enums/ErrorCodes.java new file mode 100644 index 0000000..06f46e1 --- /dev/null +++ b/src/main/java/com/ruoyi/doublePrevention/enums/ErrorCodes.java @@ -0,0 +1,56 @@ +package com.ruoyi.doublePrevention.enums; + +public enum ErrorCodes { + + //正常 + OK("200","一切 ok"), + + //请求参数错误 + REQUEST_PARAM_ERROR("501","请求参数错误"), + + //接口权限错误 + API_PERMISSION_ERROR("502","无接口访问权限"), + + //数据库错误 + DATABASE_ERROR("401","数据库错误"), + + //业务权限错误 + BUSINESS_PERMISSION_ERROR("503","无业务权限"), + + //接口签名错误 + REQUEST_SIGN_ERROR("504","签名错误"), + + //系统错误 + SERVER_ERROR("403","系统执行出错"), + + //业务超时 + BUSINESS_TIME_OUT("505","操作超时"), + + ; + + + + ErrorCodes(String code, String desc) { + this.code = code; + this.desc = desc; + } + + private String code; + private String desc; + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getDesc() { + return desc; + } + + public void setDesc(String desc) { + this.desc = desc; + } +} -- Gitblit v1.9.2