1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
package com.example.springcs.utils;
public enum EnumCode {
SUCCESS(20000, "success"),
REDIRECT(10000, "success"),
NOAD(20001, "no ad exists"),
ERR_HTTP(40000, "http content-type error"),
ERR_APP_NULL(40001, "app info is required"),
ERR_APP_INFO(40002, "invalid app info"),
ERR_ADCODE_NULL(40003, "ad code is required"),
ERR_ADTYPE_NULL(40004, "ad type is required"),
ERR_SCHE_NULL(40005, "scheduler not exist"),
ERR_UAD_REPEAT(40006, "user ad repeated"),
ERR_PLATFORM_NULL(40007, "platform config not exist"),
ERR_REQ_CONTENT_DEFECT(40009, "request content data defect"),
ERR_UNKNOWN_TOKEN(40010, "unknown token"),
ERR_SIGNATURE(40011, "signature error"),
ERR_BLACKLIST(40012, "user blocked by blacklist"),
ERR_SERVER(50001, "server error"),
ERR_DATA(50002, "data error"),
ERR_TIMEOUT(50003, "request ad server timeout"),
ERR_ANTI_CHEAT(50004, "user blocked by anti cheat"),
ERR_UNKNOWN(50005, "unknown error"),
ERR_MATERIAL_RULES(50006, "ad material blocked"),
ERR_MATERIAL_UNAPPROVED(50007, "ad material is unapproved"),
ERR_MATERIAL_FILTERED(50008, "ad material are filtered"),
ERR_MATERIAL_AUDITED(50009, "ad material are audited"),
ERROR_PARAM(60001, "param error"),
ERROR_ACCESS(60002, "access error");
private Integer code;
private String msg;
private EnumCode(Integer code, String msg) {
this.code = code;
this.msg = msg;
}
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
}
|