Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cloud-backend
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
framework
cloud-backend
Commits
b3caa06c
Commit
b3caa06c
authored
Jul 14, 2021
by
袁伟铭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.0.0
parent
e8ae0d6a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
2 deletions
+44
-2
api-server/src/main/java/com/zq/api/constant/ApiCodeEnum.java
+44
-2
No files found.
api-server/src/main/java/com/zq/api/constant/ApiCodeEnum.java
View file @
b3caa06c
...
@@ -2,39 +2,81 @@ package com.zq.api.constant;
...
@@ -2,39 +2,81 @@ package com.zq.api.constant;
/**
/**
* API响应码
* API响应码
*
* @author wilmiam
* @since 2021-07-14 11:37
*/
*/
public
enum
ApiCodeEnum
{
public
enum
ApiCodeEnum
{
/**
* 成功
*/
SUCCESS
(
"200"
,
"成功"
),
SUCCESS
(
"200"
,
"成功"
),
/**
* 未知错误
*/
UNKNOWN_ERROR
(
"100"
,
"未知错误"
),
UNKNOWN_ERROR
(
"100"
,
"未知错误"
),
/**
* 登陆验证失败
*/
LOGIN_VALID_ERROR
(
"101"
,
"登陆验证失败"
),
LOGIN_VALID_ERROR
(
"101"
,
"登陆验证失败"
),
/**
* 版本号错误
*/
VERSION_ERROR
(
"102"
,
"版本号错误"
),
VERSION_ERROR
(
"102"
,
"版本号错误"
),
/**
* 调用方法不存在
*/
METHOD_ERROR
(
"103"
,
"调用方法不存在"
),
METHOD_ERROR
(
"103"
,
"调用方法不存在"
),
/**
* 调用方法异常
*/
METHOD_HANDLER_ERROR
(
"104"
,
"调用方法异常"
),
METHOD_HANDLER_ERROR
(
"104"
,
"调用方法异常"
),
/**
* 传递参数异常
*/
PARAM_ERROR
(
"105"
,
"传递参数异常"
),
PARAM_ERROR
(
"105"
,
"传递参数异常"
),
/**
* IP黑名单拦截
*/
IP_BLACK
(
"106"
,
"IP黑名单拦截"
),
IP_BLACK
(
"106"
,
"IP黑名单拦截"
),
/**
* API服务维护中
*/
SERVER_MAINTAIN
(
"107"
,
"API服务维护中"
),
SERVER_MAINTAIN
(
"107"
,
"API服务维护中"
),
/**
* 签名校验失败
*/
CHECK_SIGN_VALID_ERROR
(
"108"
,
"签名校验失败"
),
CHECK_SIGN_VALID_ERROR
(
"108"
,
"签名校验失败"
),
/**
* 服务不可用
*/
SERVICE_NOT_AVAILABLE
(
"109"
,
"服务不可用"
),
SERVICE_NOT_AVAILABLE
(
"109"
,
"服务不可用"
),
/**
* 业务处理失败
*/
BUSINESS_ERROR
(
"400"
,
"业务处理失败"
),
BUSINESS_ERROR
(
"400"
,
"业务处理失败"
),
/**
* 服务器繁忙
*/
SERVER_ERROR
(
"500"
,
"服务器繁忙"
),
SERVER_ERROR
(
"500"
,
"服务器繁忙"
),
;
;
private
String
code
;
private
final
String
code
;
private
String
msg
;
private
final
String
msg
;
ApiCodeEnum
(
String
code
,
String
msg
)
{
ApiCodeEnum
(
String
code
,
String
msg
)
{
this
.
code
=
code
;
this
.
code
=
code
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment