提交 | 用户 | 时间
|
149dd0
|
1 |
package com.iailab.netsdk.lib.enumeration; |
H |
2 |
|
|
3 |
/** |
|
4 |
* @author 47081 |
|
5 |
* @version 1.0 |
|
6 |
* @description 操作错误码 |
|
7 |
* @date 2021/3/31 |
|
8 |
*/ |
|
9 |
public enum NET_EM_FAILCODE { |
|
10 |
NET_EM_FAILCODE_NOERROR(0, "没有错误"), |
|
11 |
NET_EM_FAILCODE_UNKNOWN(1, "未知错误"), |
|
12 |
NET_EM_FAILCODE_INVALID_PARAM(2, "参数错误"), |
|
13 |
NET_EM_FAILCODE_INVALID_PASSWORD(3, "无效密码"), |
|
14 |
NET_EM_FAILCODE_INVALID_FP(4, "无效信息数据"), |
|
15 |
NET_EM_FAILCODE_INVALID_FACE(5, "无效人脸数据"), |
|
16 |
NET_EM_FAILCODE_INVALID_CARD(6, "无效卡数据"), |
|
17 |
NET_EM_FAILCODE_INVALID_USER(7, "无效人数据"), |
|
18 |
NET_EM_FAILCODE_FAILED_GET_SUBSERVICE(8, "能力集子服务获取失败"), |
|
19 |
NET_EM_FAILCODE_FAILED_GET_METHOD(9, "获取组件的方法集失败"), |
|
20 |
NET_EM_FAILCODE_FAILED_GET_SUBCAPS(10, "获取资源实体能力集失败"), |
|
21 |
NET_EM_FAILCODE_ERROR_INSERT_LIMIT(11, "已达插入上限"), |
|
22 |
NET_EM_FAILCODE_ERROR_MAX_INSERT_RATE(12, "已达最大插入速度"), |
|
23 |
NET_EM_FAILCODE_FAILED_ERASE_FP(13, "清除信息数据失败"), |
|
24 |
NET_EM_FAILCODE_FAILED_ERASE_FACE(14, "清除人脸数据失败"), |
|
25 |
NET_EM_FAILCODE_FAILED_ERASE_CARD(15, "清除卡数据失败"), |
|
26 |
NET_EM_FAILCODE_NO_RECORD(16, "没有记录"), |
|
27 |
NET_EM_FAILCODE_NOMORE_RECORD(17, "查找到最后,没有更多记录"), |
|
28 |
NET_EM_FAILCODE_RECORD_ALREADY_EXISTS(18, "下发卡或信息时,数据重复"), |
|
29 |
NET_EM_FAILCODE_MAX_FP_PERUSER(19, "超过个人最大信息记录数"), |
|
30 |
NET_EM_FAILCODE_MAX_CARD_PERUSER(20, "超过个人最大卡片记录数"), |
|
31 |
NET_EM_FAILCODE_EXCEED_MAX_PHOTOSIZE(21, "超出最大照片大小"), |
|
32 |
NET_EM_FAILCODE_INVALID_USERID(22, "用户ID无效(未找到客户)"), |
|
33 |
NET_EM_FAILCODE_EXTRACTFEATURE_FAIL(23, "提取人脸特征失败"), |
|
34 |
NET_EM_FAILCODE_PHOTO_EXIST(24, "人脸照片已存在"), |
|
35 |
NET_EM_FAILCODE_PHOTO_OVERFLOW(25, "超出最大人脸照片数"), |
|
36 |
NET_EM_FAILCODE_INVALID_PHOTO_FORMAT(26, "照片格式无效"), |
|
37 |
NET_EM_FAILCODE_EXCEED_ADMINISTRATOR_LIMIT(27, "超出管理员人数限制"); |
|
38 |
/** 错误码 */ |
|
39 |
private int failCode; |
|
40 |
/** 对应错误信息 */ |
|
41 |
private String desc; |
|
42 |
|
|
43 |
NET_EM_FAILCODE(int failCode, String desc) { |
|
44 |
this.failCode = failCode; |
|
45 |
this.desc = desc; |
|
46 |
} |
|
47 |
|
|
48 |
public static NET_EM_FAILCODE FailCode(int failCode) { |
|
49 |
for (NET_EM_FAILCODE code : NET_EM_FAILCODE.values()) { |
|
50 |
if (failCode == code.getFailCode()) { |
|
51 |
return code; |
|
52 |
} |
|
53 |
} |
|
54 |
return NET_EM_FAILCODE_UNKNOWN; |
|
55 |
} |
|
56 |
|
|
57 |
public static String FailCodeMessage(int failCode) { |
|
58 |
return FailCode(failCode).getDesc(); |
|
59 |
} |
|
60 |
|
|
61 |
public int getFailCode() { |
|
62 |
return failCode; |
|
63 |
} |
|
64 |
|
|
65 |
public void setFailCode(int failCode) { |
|
66 |
this.failCode = failCode; |
|
67 |
} |
|
68 |
|
|
69 |
public String getDesc() { |
|
70 |
return desc; |
|
71 |
} |
|
72 |
|
|
73 |
public void setDesc(String desc) { |
|
74 |
this.desc = desc; |
|
75 |
} |
|
76 |
} |