Authored by 胡古飞

no message

Showing 49 changed files with 4624 additions and 0 deletions

Too many changes to show.

To preserve performance only 49 of 49+ files are displayed.

/target/
.settings/
*.project
*.classpath
.idea/
error-code.iml
... ...
@echo off
cd ..
mvn deploy -DrepositoryId=snapshots -Durl=http://192.168.102.168:18081/nexus/content/repositories/snapshots &pause
\ No newline at end of file
... ...
#!/bin/bash
################################################################
#@Authro Lijian
#@Date 2011-06-08
################################################################
cd ..
/usr/local/maven/bin/mvn mvn deploy -DrepositoryId=snapshots -Durl=http://192.168.102.168:18081/nexus/content/repositories/snapshots &pause
\ No newline at end of file
... ...
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.yoho</groupId>
<artifactId>parent</artifactId>
<version>1.1.9-SNAPSHOT</version>
</parent>
<groupId>com.yoho.common</groupId>
<artifactId>error-code</artifactId>
<version>1.1.9-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
... ...
# 错误码定义
错误码定义在下面的目录下:`src/main/resources`. 预先定义了如下的yml文件:服务的异常分开在不同的文件中
- gateway-error.yml
- service-error.yml
- service-error-*.yml
分别用来表示`API Gateway` 和 服务内部的错误码。 注意,错误码需要用`UTF-8`来编码,否则会出错。
# 如何添加新的错误码
1. 先在yml文件中添加错误码(注意使用 `UTF-8`编码)
2. 然后在对应的枚举类型`Java`类中添加对应的枚举类型。例如:
```
public enum GatewayError implements ErrorCode {
PROFILE_IS_NULL(421),
PASSWORD_IS_NULL(422);
PASSWORD_IS_INVALIDATE(424);
}
```
# 使用说明
1.先在maven中添加依赖:
```
<dependency>
<groupId>com.yoho.common</groupId>
<artifactId>error-code</artifactId>
</dependency>
```
2.在你的spring context中拉起这个`src/resources/META-INF/spring/spring-error.xml`
3.然后可以直接使用如下错误码的枚举类型
- `com.yoho.error.GatewayError`
- `com.yoho.error.ServiceError`
# 服务的异常码自动映射到gateway的异常
服务的异常码可以自动映射到gateway,可以通过下面的配置实现:
```yml
300000001:
message: "request error"
gwError: 22222:消息不能为空
```
其中,`gwError`定义了输出到gateway的异常(这个异常信息会通过json发送给app)。用`:`分割异常码和消息
# 服务间错误码的规范
`[100][001][001]` 模块编码+子模块编码+错误码, 例如 `001001002`
## 模块编码
- `100`: 用户(Passport)
- `200`: 购物车
- `300`: 资源(Resource)
- `400`: 订单
- `500`: 产品
- `600`: 消息(Message)
- `700`: 促销(Promotion)
### 子模块编码
- 用户001: auth(`001`), vip(`002`), profile(`003`), sso(`004`)
... ...
package com.yoho.error;
import java.util.Map;
/**
*
* Created by chang@yoho.cn on 2015/11/3.
*/
public interface ErrorCode {
/**
* 设置错误内容
* @param content
*/
public void setErrorContent(Map<String, Object> content);
/**
* 获取错误码
* @return 错误码
*/
public int getCode();
}
... ...
package com.yoho.error;
import java.text.MessageFormat;
import java.util.Map;
/**
*
* Gateway的错误码定义
* Created by chang@yoho.cn on 2015/11/3.
*/
public enum GatewayError implements ErrorCode {
// ----------------------- begin profile error ---------------------//
CODE_SUCCESS(200),
// PROFILE_IS_NULL(421),
// PASSWORD_IS_NULL(422),
PASSWORD_NOT_RULE(423),
SEND_ERROR(425),
SEND_SUCCESS(200),
//第三方登录code开始
// SOURCE_TYPE_IS_NULL(502),
LOGIN_ERROR(503),
OTHER_ERROR(412),
// NOT_BIND(201),
//第三方登录code结束
UPDATE_MOBILE_ERROR(411),
UPDATE_PASSWORD_ERROR(420),
PLEASE_INPUT_PASSWORD(413),
REGISTER_ERROR(414),
// PROFILE_MUST_BE_MOBILE_OR_EMAIL(10001),
PASSWORD_ERROR(10012),
USER_NOT_EXISTS(10010),
//以下为 address code
BIND_SUCCESS(200),//200
ADDRESS_LIST(200),//200
ADDRESS_ID_ERROR(452),//500
USER_ID_ERROR(453),//500
ADDRESSEENAME_ERROR(454),//500
ADDRESS_NULL(455),//500
PROVINCE_MUST(456),//500
MOBILE_PHONE_ONE(457),//500
ADD_SUCCESS(200),//200
ADD_FALSE(458),//404
UPDATE_SUCCESS(200),//200
ID_UID_NULL(459),//500
DEL_SUCCESS(200),//200
DEL_FALSE(460),//404
PROVINCE_LIST(200),//200
ID_IS_NULL(461),//405
SET_SUCCESS(200),//200
SET_FALSE(462),//201
PHONE_UPDATE_SUCCESS(200),//200
PHONE_UPDATE_FALSE(464),//409
// GET_USER_SSO_INFO_ERROR(601),
// SSO_LOGIN_INFO_NULL(602),
UID_MAIL_MOBILE_MUST_NOT_NULL(603),
GET_SSO_INFO_ERROR(604),
SSO_UPDATE_ERROR(605),
SHOPPING_ACTION_SUCCESS(200),//200
REQUEST_PAREMENT_ERROR(413),
///*************** 通用的异常 ****************************
//未映射的服务异常
SERVICE_ERROR(998),
SERVICE_NOT_AVAILBLE(999),
//**************************************ERP BEGIN*******************************
SERVICE_ID_NOT_AVAILBLE(1000)
//**************************************ERP END*******************************
;
//-------------------------------------/
static String DEFAULT_ERROR_MSG = "操作失败";
static int DEFAULT_ERROR_CODE = 400;
private final int code;
private String message;
GatewayError(int code)
{
this.code=code;
}
/**
* 根据code查找错误
* @param code code
* @return error info
*/
public static GatewayError getGatewayErrorByCode(int code){
for(GatewayError error : GatewayError.values()){
if(error.code == code){
return error;
}
}
return null;
}
@Override
public int getCode() {
return code;
}
public String getMessage(Object ... param) {
if( param != null && param.length > 0){
return MessageFormat.format(this.message, param);
}else {
return message;
}
}
@Override
public void setErrorContent(Map<String, Object> content) {
this.message = (String)content.get("message");
}
/**
* 直接调用 {@link GatewayError#getMessage(Object...)}
*
* @param param 参数
* @return 格式化之后的消息
*/
@Deprecated
public String getFormattedMessage(Object ... param){
return MessageFormat.format(this.message, param);
}
}
... ...
package com.yoho.error;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.Pair;
import java.util.Map;
/**
* 服务的错误码定义
* <p>
* Created by chang@yoho.cn on 2015/11/3.
*/
public enum ServiceError implements ErrorCode {
//-------------------common---------------------------
REQUEST_PAREMENT_ERROR(413),
// ----------------------- begin error ---------------------//
USER_NOT_FOUND(100200300),
CODE_SUCCESS(100000000),//200
NOT_BIND(100000001),//200
CODE_FAILED(100000002),
OUT_OF_RANGE(100000010),
//----Begin----------用户模块异常码---------------------
//100-001
OPEN_ID_IS_NULL(100001001),//501
SOURCE_TYPE_IS_NULL(100001002),//502
LOGIN_ERROR(100001003),//503
REGISTER_PARAM_NULL(100001004),
PASSWORD_NOT_INVALID(100001005),
REGISTER_FAILED(100001006),
THIRD_LOGIN(100001007),//400
LOGIN_METHOD(100001008),//400
BIND_SUCCESS(100001009),//200
ADDRESS_LIST(100001010),//200
ADDRESS_ID_ERROR(100001011),//500
USER_ID_ERROR(100001012),//500
ADDRESSEENAME_ERROR(100001013),//500
ADDRESS_NULL(100001014),//500
PROVINCE_MUST(100001015),//500
MOBILE_PHONE_ONE(100001016),//500
ADD_SUCCESS(100001017),//200
ADD_FALSE(100001018),//404
ID_UID_NULL(100001019),//500
DEL_SUCCESS(100001020),//200
DEL_FALSE(100001021),//404
PROVINCE_LIST(100001022),//200
ID_IS_NULL(100001023),//405
SET_SUCCESS(100001024),//200
SET_FALSE(100001025),//201
MOBILE_NUMBER_ERROR(100001026),//401
UPDATE_SUCCESS(100001027),//200
UID_NOT_MATCH_MOBILE(100001028),
MOBILE_INVALID(100001029),
UID_IS_RELATED(100001030),
CARDNO_IS_NULL(100001031),
CLIENT_TYPE_IS_NULL(100001032),
IDNO_IS_NULL(100001033),
USERNAME_IS_NULL(100001034),
SNSCHECKCODE_IS_NULL(100001035),
APPLY_IS_DONE(100001036),
APPLY_IS_DOING(100001037),
VERIFYID_IS_NULL(100001038),
GET_VERIFYCODE_FAIL(100001039),
CODETYPE_IS_NULL(100001040),
CALL_CRF_FAIL(100001041),
BANKID_ID_ERROR(100001042),
REGISTER_FAILED_EXIST(100001043),
INTALMENT_CARDNO_IS_ERROR(100001044),
INTALMENT_CARDNO_USED_ERROR(100001101),
INTALMENT_USERNAME_IS_ERROR(100001045),
INTALMENT_MOBILE_IS_ERROR(100001046),
INTALMENT_IDNO_IS_ERROR(100001047),
CARDNO_IS_NOT_SUPPORT(100001048),
CARDNO_IS_BINDING(100001049),
INTALMENT_INFO_NOT_MATCH(100001050),
SNSCHECKCODE_IS_ERROR(100001051),
USER_SMS_TYPE_ERROR(100001052),
NOT_APPLY_SUCCESS(100001053),
CARD_IS_BANDING(100001054),
PREPAYNO_IS_NULL(100001055),
ORDERNO_IS_NULL(100001056),
//100-003
PASSWORD_IS_NULL(100003000),
UID_IS_NULL(100003001),///421
PROFILE_IS_NULL(100003002),
PASSWORD_NOT_RULE(100003003),
MOBILE_IS_NULL(100003004),
MOBILE_IS_ERROR(100003005),
SEND_ERROR(100003006),
SEND_SUCCESS(100003007),
TYPE_IS_NULL(100003007),
PRODUCTID_IS_NULL(100003008),
CONSULT_LIST_IS_NULL(100003009),
CONSULT_CONTENT_IS_NULL(100003010),
CONSULT_PRODUCT_NOT_EXIST(100003011),
USER_IS_NOT_EXIST(100003012),
THREAD_IS_NOT_EXIST(100003013),
MOBILE_IS_REGISTER(100003014),
UPDATE_MOBILE_ERROR(100003015),
UPDATE_PASSWORD_ERROR(100003016),
PLEASE_INPUT_PASSWORD(100003017),
BIND_ERROR(100003018),
REGISTER_ERROR(100003019),
USER_COUPON_IS_NULL(100003020),
PROFILE_MUST_BE_MOBILE_OR_EMAIL(100003021),
PASSWORD_ERROR(100003022),
USER_NOT_EXISTS(100003023),
MOBILE_IS_EXISTS(100003024),
MOBILE_CHECK_IS_SUCCRSS(100003025),
CODE_IS_NULL(100003026),//403 短信验证码空
PHONE_UPDATE_SUCCESS(100003027),//200
PHONE_UPDATE_FALSE(100003028),//409
GET_USER_SSO_INFO_ERROR(100003029),
SSO_LOGIN_INFO_NULL(100003030),
NICK_NAME_IS_NULL(100003031),
CONSULT_INSERT_FAILED(100003032),
UID_MAIL_MOBILE_MUST_NOT_NULL(100003033),
GET_SSO_INFO_ERROR(100003034),
SSO_UPDATE_ERROR(100003035),
USER_CONPONS_INSERT_ERROR(100003036),
USER_BASE_UPDATE_FAILED(100003037),
CHECK_MOBILE_SUCCESS(100003038),
FAVORITE_UID_NULL(100003039),
UID_MUST_NOT_NULL(100003040),
PRODUCT_IS_EMPTY(100003041),
BRAND_IS_EMPTY(100003042),
MOBILE_IS_BIND(100003043),
PASSWORD_IS_ERROR(100003044),
SSO_LOGIN_CODE_50101(100003045),
VALID_CODE_TIMEOUT_CODE(100003046),
VALID_ERROR(100003047),
SESSION_KEY_ISNULL(100003048),
CODE_IS_EMPTY(100003049),
CODE_IS_INVALID(100003050),
NEW_PWD_IS_NULL(100003051),
NEW_PWD_IS_NOT_RULE(100003052),
EMAIL_IS_EXISTS(100003053),
QUESTION_ID_ISNULL(100003054),
FEEDBACK_ID_ISNULL(100003055),
ANSWER_ISNULL(100003056),
EMAIL_SUBSCRIBER_FAIL(100003057),
NICK_NAME_IS_EXISTS(100003058),
//100-004 yohocoin 有货币、红包
YOHOCOIN_TYPE_ISNULL(100004001),
YOHOCOIN_NUM_ISNULL(100004002),
YOHOCOIN_PARAMS_ISNULL(100004003),
YOHOCOIN_ORDERCODE_ISNULL(100004004),
YOHOCOIN_CURRENCY_ISNULL(100004005),
LOGINNAME_OR_PASSWORD_ERROR(100004006),
YOHOCOIN_CURRENCY_NOT_ENOUGH(100004007),
YOHOCOIN_ORDER_FULLY_REFUND(100004008),
YOHOCOIN_ORDERRECORD_NOT_EXIST(100004009),
REDENVELOPES_CURRENCY_NOT_ENOUGH(100004010),
//100-005 browse 浏览记录
BROWSE_ADD_ID_ISNULL(100005001),
BROWSE_ADD_SKN_ISNULL(100005002),
BROWSE_ADD_CATEGORYID_ISNULL(100005003),
BROWSE_TOTAL_UID_ISNULL(100005004),
BROWSE_DEL_UID_ISNULL(100005005),
BROWSE_LIST_UID_ISNULL(100005006),
VERIFY_CODE_ERROR(100005007),
TOKEN_IS_ERROR(100005008),
NOT_CHECK_MOBILE(100005009),
EMAIL_NULL(100005010),
EMAIL_ERROR(100005011),
//100-006 suggest 意见反馈
SUGGEST_ADD_PARAM_ISNULL(100006001),
SUGGEST_ADD_CONTENT_ISNULL(100006002),
SUGGEST_ADD_FAILED(100006003),
SUGGEST_RELIABLE_UDIDSUGGESTID_ISNULL(100006004),
SUGGEST_RELIABLE_ISRELIABLE_INVALIDATED(100006005),
SUGGEST_RELIABLE_SETALREADY(100006006),
SUGGEST_RELIABLE_ADD_FAILED(100006007),
//100-007 help 在线客服
HELPCONTENT_ID_ISNULL(100007001),
HELPCONTENT_NOT_EXISTS(100007002),
HELPCONTENT_CATEGORYID_ISNULL(100007003),
HELPCONTENT_CATEGORYID_ISERROR(100007004),
//100008活动信息
PARAM_ERROR(100008001),
WECHAT_HAVE_ACTIVITIED(100008002),
NOT_ACTIVITY(100008003),
HAVE_SHARE_ACTIVITY(100008004),
RECORD_ERROR(100008005),
ACTIVITY_NOT_EXISTS(100008006),
//100-009 UserContacts 用户联系信息
USERCONTACTS_MODIFY_UID_ISNULL(100009001),
USERCONTACTS_MODIFY_CODEADDRESS_ISNULL(100009002),
USERCONTACTS_GET_UID_ISNULL(100009003),
USERCONTACTS_MODIFY_ZIPCODE_ISERROR(100009004),
//100-010 UserHabits 用户购物&着装习惯
USERHABITS_MODIFY_UID_ISNULL(100010001),
USERHABITS_GET_UID_ISNULL(100010002),
//100-011 UserHabits 用户喜爱品牌
LIKEBRAND_MODIFY_UID_ISNULL(100011001),
LIKEBRAND_GET_UID_ISNULL(100011002),
//012 在线帮助
HELP_ID_ERROR(100012001),
HELP_CONTENT_EMPTY(100012002),
//013 用户签到
USER_SIGN_SIGNED(100013001),
USER_SIGN_CONFIG_NOT_EXIST(100013002),
USER_SIGN_PARAM_PUSH_FLAG_ERROR(100013003),
//014 用户投诉
USER_COMPLAINTS_PARAM_EMPTY(100014001),
USER_COMPLAINTS_PARAM_UID_EMPTY(100014002),
USER_COMPLAINTS_PARAM_TITLE_EMPTY(100014003),
USER_COMPLAINTS_PARAM_TITLE_TOOLONG(100014004),
USER_COMPLAINTS_PARAM_CUSTOMER_TOOLONG(100014005),
USER_COMPLAINTS_PARAM_ORDERCODE_EMPTY(100014006),
USER_COMPLAINTS_PARAM_CONTENT_EMPTY(100014007),
USER_COMPLAINTS_PARAM_CONTENT_TOOLONG(100014008),
//015个人中心
GIFT_CODE_IS_NULL(100015001),
CAPTCHA_CODE_IS_NULL(100015002),
GIFT_EXCHANGE_FAIL(100015003),
GIFT_CODE_NOT_FOUND(100015004),
GIFT_CODR_IS_ERROR(100015005),
ADD_LOG_FAIL(100015006),
// 016 各种专题
// 新潮教室
USER_STAR_INTIMACY_PARAM_NULL(100016001),
USER_STAR_INTIMACY_SIGN_ALREADY(100016002),
USER_STAR_INTIMACY_SIGN_ERROR(100016003),
USER_STAR_INTIMACY_GET_RANK_FAIL(100016004),
USER_STAR_INTIMACY_GET_FORWARD_FAIL(100016005),
USER_STAR_INTIMACY_SET_INTIMACY_FAIL(100016006),
USER_STAR_INTIMACY_SET_ISCHECKED_FAIL(100016007),
USER_STAR_INTIMACY_SET_CHECKEDDAYS_FAIL(100016008),
USER_STAR_INTIMACY_GET_TOP_FAIL(100016009),
// 017 商家端
SHOPS_ACCOUNT_IS_NULL(100017001),
SHOPS_PASSWORD_IS_NULL(100017002),
SHOPS_LOGIN_ERROR(100017003),
SHOPS_PID_IS_NULL(100017004),
SHOPS_CALL_ERP_FAIL(100017005),
SHOPS_PASSWORD_NOT_RULE(100017006),
SHOPS_UPDATE_PASSWORD_ERROR(100017007),
SHOPS_APP_VERSION_IS_NULL(100017008),
SHOPS_CLIENT_TYPE_IS_NULL(100017009),
SHOPS_APP_URL_IS_NULL(100017010),
SHOPS_OLD_PASSWORD_IS_ERROR(100017011),
SHOPS_ACCOUNT_IS_NOT_EXIST(100017012),
SHOPS_NEW_PASSWORD_IS_NOT_CONSISTENT(100017013),
SHOPS_ID_IS_ERROR(100017014),
SHOPS_INBOX_ID_IS_ERROR(100017015),
SHOPS_INBOX_TYPE_IS_ERROR(100017016),
SHOPS_NEW_PASSWORD_IS_SIMPLE(100017017),
SHOPS_ID_IS_NULL(100017018),
SHOPS_ACCOUNT_CALL_FAIL(100017019),
// 018 mars点数
MARSPOINT_NUM_INVALID(100018001),
MARSPOINT_TYPE_INVALID(100018002),
MARSPOINT_ORDERCODE_IS_NULL(100018004),
MARSPOINT_CURRENCY_NOT_ENOUGH(100018005),
MARSPOINT_CALL_METHOD_ERRPR(100018006),
SSOID_IS_NULL(100018008),
MOBIL_EMAIL_IS_NULL(100018009),
PASSWORD_NOT_VALID(100018010),
// order黑名单限制
USER_BLACK_LIST_UID_IS_INVALID(100019001),
// 学生认证
REQUEST_ZMXY_ERROR(100020001),
NO_RESPONSE_FROM_ZMXY(100020002),
NOT_REAL_NAME_USER(100020003),
NOT_ZHIFUBAO_USER(100020004),
ZMXY_TOKEN_IS_NULL(100020005),
IS_STUDENT_ALREADY(100020006),
IDENTITYCARDNO_IS_USERD(100020007),
ZMXY_SERVICE_ERROR(100020008),
ZMXY_COLLEGE_INCORRECT(100020009),
ZMXY_DEGREE_INCORRECT(100020010),
ZMXY_ENROLLMENTYEAR_INCORRECT(100020011),
// 二维码登录
TWODIMEN_CODE_IS_NULL(100021001),
TWODIMEN_UID_IS_NULL(100021002),
TWODIMEN_CODE_IS_INVALID(100021003),
TWODIMEN_CODE_LOGIN_FAIL(100021004),
TWODIMEN_CODE_IS_ILLEGAL(100021011),
// 领取有货币活动
TOKEN_IS_NULL(100021005),
REVICE_ACTIVITY_NOT_EXIST(100021006),
REVICE_ACTIVITY_NOT_BEGIN(100021007),
REVICE_ACTIVITY_HAS_END(100021008),
REVICE_ACTIVITY_HISTORY_EXIST(100021009),
REVICE_TIMES_MAX(100021010),
// 第三方绑定优化
OPENID_IS_BIND(100031010),
UID_OPENID_IS_BIND(100031011),
RELATED_USER_OPENID_SINGLE(100031012),
REMOVE_BIND_FAIL(100031013),
OPENID_IS_NOT_BIND(100031014),
// 生成图片验证码失败
GET_VERIFIEDGRAPHICCODE_FAIL(100041014),
//---------------用户模块异常码-------------------
//-----------------联盟模块----------------------------------------
APP_IS_NULL(800000000),
UDID_IS_NULL(800000001),
CALLBACKURL_IS_NULL(800000002),
APP_UDID_IS_EXISTS(800000003),
APP_UDID_IS_NOT_EXISTS(800000004),
APP_UDID_IS_ACTIVED(800000005),
//-----------------联盟模块----------------------------------------
OTHER_ERROR(111111111),
ERROR(222222222),
//-----------resources模块异常处理----------------
RESOURCES_REQUEST_ERROR(300000001),
RESOURCES_SERVICE_ERROR(300000002),
RESOURCES_CONTENT_CODE_IS_EMPTY(300001001),
RESOURCES_CLIENT_TYPE_IS_EMPTY(300001002),
RESOURCES_GENDER_IS_EMPTY(300001003),
RESOURCES_PAGE_MUST_BE_GREATER_THAN_0(300001004),
RESOURCES_LIMIT_MUST_BE_GREATER_THAN_0(300001005),
RESOURCES_UID_IS_EMPTY(300002001),
RESOURCES_UDID_IS_EMPTY(300002002),
RESOURCES_APP_VERSION_IS_EMPTY(300002003),
RESOURCES_SCREEN_SIZE_EMPTY(300002004),
RESOURCES_NO_CACHE_CLEAR_INFO(300002005),
RESOURCES_NO_CLIENT_TYPE(300003001),
RESOURCES_NO_APP_CLIENT_TYPE_ADS(300003002),
RESOURCES__NO_APP_CLIENT_TYPE_ADS(300003004),
RESOURCES_NODE_IS_EMPTY(300003003),
RESOURCES_USERPROFILE_IS_EMPTY(300004001),
RESOURCES_USERBASE_IS_EMPTY(300004002),
RESOURCES_YOHOOD_PASSKIT_UID_EMPTY(300004005),
RESOURCES_YOHOOD_PASSKIT_TICKET_CODE_EMPTY(300004006),
RESOURCES_YOHOOD_PASSKIT_TICKET_DB_NOT_FOUND(300004007),
RESOURCES_YOHOOD_PASSKIT_TICKET_UID_UNMATCH(300004008),
RESOURCES_YOHOOD_PASSKIT_GENERATE_ERROR(300004009),
RESOURCES_YOHOOD_LARGEVIEW_TAG_ID_ERROR(300004010),
RESOURCES_SINGLE_NOT_FIND(300005001),
RESOURCES_SINGLE_PARSE_DATA_ERROR(300005002),
// 2016/12/9 v5.3帮助中心接口 对应的错误消息
PLATFORM_NAME_IS_NULL(300006001),
PLATFORM_IS_INVALID(300006002),
FIRST_LEVEL_CATEGORY_IS_NOTEXIST(300006003),
HELPER_CONTENT_IS_NOTEXIST(300006004),
//-----------resources模块异常处理----------------
//-----------order模块异常处理----------------
ORDER_REQUEST_ERROR(400000001),
ORDER_SERVICE_ERROR(400000002),
ORDER_NULL(400001001),
ORDER_ORDER_CODE_IS_EMPTY(400001002),
ORDER_UID_IS_EMPTY(400001003),
ORDER_DELETE_ORDER_FAIL(400001004),
ORDER_ORDERS_GOODS_IS_EMPTY(400001005),
ORDER_REQUEST_PARM_IS_EMPTY(400001000),
ORDER_ORDER_HAS_PAID(400001006),
ORDER_SUBMIT_ORDER_STATUS_FAIL(400001007),
ORDER_PAYMENT_IS_EMPTY(400001008),
ORDER_NO_DELIVERY_ORDER(400001009),
ORDER_NO_LOGISTICS_ORDER(400001010),
ORDER_NOT_FIND_LOGISTICS_COMPANY(400001011),
ORDER_LOGISTICS_INFORMATION(400001012),
ORDER_CHANGE_NO_ID(400001013),
ORDER_CHANGE_NO_EXPRESS_COMPANY(400001014),
ORDER_CHANGE_NO_EXPRESS_NUM(400001015),
ORDER_CHANGE_NO_LOGIN(400001016),
ORDER_HAS_DELETE(400001017),
ORDER_CHANGE_ORDER_NO_CONFIRM(400001018),
ORDER_CHANGE_ORDER_EXPIRED(400001019),
ORDER_SAVE_EXPRESS_FAIL(400001020),
ORDER_SAVE_EXPRESS_SUCCESS(400001021),
ORDER_CHANGE_NO_CHANGEID(400001022),
ORDER_CHANGE_ORDER_NO_EXISTS(400001023),
ORDER_CHANGE_SOURCE_NO_EXISTS(400001024),
ORDER_CHANGE_APPLY_NO_SIGN(400001025),
ORDER_CHANGE_APPLY_HAS_EXPIRED(400001026),
ORDER_CHANGE_APPLY_NO_GOODS(400001027),
ORDER_CHANGE_APPLY_NO_RECEIVE_NAME(400001028),
ORDER_CHANGE_APPLY_NO_AREA(400001029),
ORDER_CHANGE_APPLY_NO_ADDRESS(400001030),
ORDER_CHANGE_APPLY_PHONE_WRONG(400001031),
ORDER_CHANGE_APPLY_NO_DEVELIVERY_TYPE(400001032),
ORDER_CHANGE_APPLY_NO_CHANGE_REASON(400001033),
ORDER_CHANGE_APPLY_NO_FULL_INFO(400001034),
ORDER_CHANGE_APPLY_NO_SUBMIT_REPEAT(400001035),
ORDER_CHANGE_APPLY_CHANGE_NUM_WRONG(400001036),
ORDER_CHANGE_NO_EXISTS(400001037),
ORDER_CHANGE_APPLY_ERP_ERROR(400001038),
ORDER_CHANGE_CREATE_LOCAL_ERROR(400001039),
ORDER_PAY_CANCELED_AND_PAID(400001038),
ORDER_PAY_AMOUNT_NOT_EQUAL(400001039),
ORDER_PAY_ATTRIBUTE_EMPTY(400001040),
ORDER_PAY_ID_EMPTY(400001041),
ORDER_PAY_UID_EMPTY(400001042),
ORDER_CANCEL_ORDERS_OUPONS_FAIL(400001043),
ORDER_CANCEL_ORDERS_LIMITCODE_FAIL(400001044),
ORDER_PRODUCT_ID_EMPTY(400001045),
ORDER_CANCEL_FAILED_BY_STATUS_PAYFINISHED(400001046),//取消订单错误码,已支付的不能取消
ORDER_CANCEL_FAILED_BY_STATUS_SHIPPED(400001047),////取消订单错误码,已发货的不能取消
ORDER_CHANGE_CREATE_STORAGE_NOT_ENOUGH(400001048),
ORDER_CONFIRM_FAILED_BY_STATUS_NOT_SHIPPED(400001049), //确认未发货的订单错误码,未发货的订单不能确认
ORDER_CANCEL_FAILED_NOT_FIT_TIME(400001050),//取消订单错误码,预支付时间不够
ORDER_EXPRESS_NOT_VALIDATE(400001051),
// 收货地址
ORDER_DELIVERY_ADDRESSID_IS_EMPTY(400001052),
ORDER_NOT_EXIST(400001053),
ORDER_HAS_BEEN_REMOVED(400001054),
ORDER_HAS_BEEN_DELIVERED(400001055),
ORDER_THE_REGION_NOT_EXIST(400001056),
ORDER_MODIFY_ONE_TIMES_DELIVERY_ADDRESS(400001057),
ORDER_DELIVERY_ADDRESSID_NOT_SUPPORT_SF_DISTRIBUTION_AREA(400001058),
ORDER_PAY_NOT_ALLOW(400001059),
ORDER_THE_ORDER_HAS_BEEN_CANCELLED(400001060),
ORDER_DELIVERY_ADDRESSID_NOT_SUPPORT_SF_EXPRESS_TRANSPORT(400001061),
ORDER_NOT_SUPPORT_CODPAY(400001062),
ORDER_NOW_IS_CODPAY(400001063),
ORDER_PAYRESULT_CONFIRM_ING(400001070),
ORDER_NOT_OUTLINE_GET_PAYMENTSTATUS(400001080),
//退货
ORDER_UID_ERROR(400002001),
ORDER_REFUND_REQUEST_ID_ERROR(400002002),
ORDER_REFUND_REQUEST_NOT_EXIST(400002003),
ORDER_NO_REFUND_GOODS(400002004),
ORDER_SET_REFUND_REQUEST(400002005),
ORDER_LOGISTICS_COMPANY(400002006),
ORDER_FILL_OUT_EXPRESS_ORDER(400002007),
ORDER_LOGIN_FIRST(400002008),
ORDER_NO_REFUND_REQUEST(400002009),
ORDER_FAIL_EXPRESS_ORDER(400002010),
ORDER_REFUND_EXPRESS_DATA_FAIL(400002011),
ORDER_NO_REFUND_REQUEST_GOODS(400002012),
ORDER_INVALID_USER_ID(400002013),
ORDER_ORDER_NUMBER_ERROR(400002014),
ORDER_DOES_NOT_EXIST(400002015),
ORDER_HAS_BEEN_DELETED(400002016),
ORDER_NOT_CONFIRMED_CANNOT_RETURNED(400002017),
ORDER_EXCEEDED_RETURN_PERIOD(400002018),
ORDER_NUMBER_ERROR(400002019),
ORDER_USER_ID_ERROR(400002020),
ORDER_SELECT_GOODS_TO_RETURN(400002021),
ORDER_SELECT_RETURN_SET(400002022),
ORDER_SELECT_RETURN_METHOD(400002023),
ORDER_SETUP_BANK_CARD_INFORMATION(400002024),
ORDER_SETUP_ALIPAY_ACCOUNT(400002025),
ORDER_RETURN_ORDER_NOT_EXIST(400002026),
ORDER_ORDER_DELETE(400002027),
ORDER_SELECT_RETURN_GOODS(400002028),
ORDER_SELECT_RETURN_REASON(400002029),
ORDER_UPLOAD_REAL_PICTURE(400002030),
ORDER_FILLOUT_RETURN_INSTRUCTION(400002031),
ORDER_RETURN_AMOUNT_EXCEED(400002032),
ORDER_NO_DUPLICATE_SUBMIT(400002033),
ORDER_FAILTO_LOCAL_CREDIT_ORDER(400002034),
ORDER_FAILTO_CREDIT_ORDER(400002035),
ORDER_REFUND_SUBMIT_FAIL(400002036),
ORDER_REFUND_QUERY_ORDER_GOODS_NULL(400002037),
ORDER_REFUND_CANCAEL_STATUS_ILLEGAL(400002038),
ORDER_CHANGE_CANCAEL_STATUS_ILLEGAL(400002039),
ORDER_CHANGE_GOODS_NOT_EXISTS(400002040),
ORDER_EXPRESS_COMPANY_NOT_MORE_THAN_10_WORDS(400002041),
ORDER_INPUT_CORRECT_BANK_CARD(400002042),
ORDER_INPUT_CORRECT_ALIPAY_ACCOUNT(400002043),
ORDER_INPUT_BRANCH_BANK_INFORMATION(400002044),
//物流
ORDER_PARAMETER_PASSING_INCORRECT(400003001),
ORDER_NO_EXCHANGE_REFUND_INFORMATION(400003002),
ORDER_NOT_FIND_THE_LOGISTICS_COMPANY(400003003),
ORDER_NO_LOGISTICS_COMPANY(400003004),
//动态参数
ORDER_SUBMIT_CALL_ERP(400004001),
ORDER_SET_EXPRESS_CALL_ERP(400004002),
ORDER_MISSING_REQUIRED_FIELD(400004003),
ORDER_SUBMIT_CALL_ERP_RESULT(400004004),
//拆分订单
ORDER_SPLIT_ORDER_FAIL(400005001),
//电子发票
ORDER_INVOICE_NOT_ELETRONIC(400006001),
ORDER_INVOICE_HEADER_BLANK(400006002),
ORDER_INVOICE_GOODSITEMS_EMPTY(400006003),
ORDER_INVOICE_ORDERSTATUS_NULL(400006004),
ORDER_INVOICE_QUERY_SKNS_MARKETPRICE_NULL(400006005),
ORDER_INVOICE_ACTUAL_AMOUNT_IS_ZERO(400006006),
//门票
ORDER_TICKET_SOLD_OUT(400007001),
ORDER_TICKET_COLORNAME_FORMAT_IS_RIGHT(400007002),
ORDER_TICKET_SEAT_SOLD_OUT(400007003),
ORDER_TICKET_TYPE_IS_EMPTY(400007004),
ORDER_TICKET_IS_EMPTY(400007005),
ORDER_UID_NOT_EXIST(400007006),
//-----------order模块异常处理----------------
//-----------MESSAGE模块异常处理----------------
SMS_REQUEST_PARAM_NULL(600001001),
SMS_IP_REQUEST_OVER_1000_TIME(600001002),
SMS_MOBILE_REQUEST_OVER_100_TIME(600001003),
SMS_REDIS_ERROR(600001004),
SMS_TEMPLATE_ID_NULL(600001005),
SMS_TEMPLATE_NOT_EXIST(600001006),
SMS_TEMPLATE_NO_FIT_USER(600001007),
SMS_TEMPLATE_USER_NOT_EXIST(600001008),
SMS_MESSAGE_SEND_FAILED(600001009),
SMS_INBOX_UID_NULL(600001010),
SMS_MOBILE_IN_BLACKLIST(600001011),
SMS_IP_IN_BLACKLIST(600001012),
SMS_SEND_NUM_OUTOFLIMIT(600001013),
SMS_TEMPLATE_PROJECT_NULL(600001014),
SMS_MESSAGE_IS_NULL(600001015),
SMS_TOKEN_IS_NULL(600001016),
SMS_TOKEN_IS_ERRPR(600001017),
//-----------PUSH模块异常处理----------------
PUSH_RECYCLETASK_TASKKEY_EMPTY(600002001),
PUSH_RECYCLETASK_TASKKEY_NOTEXIST(600002002),
PUSH_RECYCLETASK_UID_EMPTY(600002003),
//-----------SNS模块异常处理----------------
SNS_PARAMS_IS_NULL(700001001),
// 700-003 guang 逛
ARTICLE_GET_ID_ISNULL(700003001),
ARTICLE_GET_DATA_ISNULL(700003002),
ARTICLE_FAV_UID_ISNULL(700003003),
ARTICLE_FAV_ARTID_ISNULL(700003004),
ARTICLE_FAV_ADD_FAIL(700003005),
ARTICLE_FAV_DEL_FAIL(700003006),
ARTICLE_GETBASEINFO_ID_ISNULL(700003007),
ARTICLE_GETBASEINFO_DATA_ISNULL(700003008),
ARTICLECOMMENTS_GETLIST_ARTICLEID_ISNULL(700003009),
ARTICLECOMMENTS_GETLIST_DATA_ISNULL(700003010),
ARTICLECOMMENTS_ADD_UID_ISNULL(700003011),
ARTICLECOMMENTS_ADD_ARTICLEID_ISNULL(700003012),
ARTICLECOMMENTS_ADD_ARTICLE_ISNULL(700003013),
ARTICLECOMMENTS_ADD_USER_ISNULL(700003014),
ARTICLE_PRAISE_ARTID_ISNULL(700003015),
ARTICLE_PRAISE_UDID_ISNULL(700003016),
ARTICLE_PRAISE_GET_FAIL(700003017),
ARTICLE_PRAISE_SET_FAIL(700003030),
SHAREBRAND_DETAIL_ID_ISNULL(700003018),
SHAREBRAND_DETAIL_BRANDRELATION_ISNULL(700003019),
SHAREBRAND_DETAIL_BRAND_ISNULL(700003020),
PLUSTAR_BRAND_TYPE_IS_NULL(700003021),
ARTICLE_AUTHOR_UID_NULL(700003022),
ARTICLE_AUTHOR_UID_PARAM_ERROR(700003023),
ARTICLE_AUTHOR_NOT_EXIST(700003024),
ARTICLE_CONTENT_ARTICLEID_NULL(700003025),
ARTICLE_CONTENT_ARTICLEID_ERROR(700003026),
ARTICLE_CONTENT_ARTICLE_NOT_EXIST(700003027),
ARTICLE_NEXT_PRE_NOT_EXIST(700003031),
BRAND_RELATION_NOT_EXIST(700003028),
ARTICLE_TAG_IS_EMPTY(700003029),
ARTICLE_PRAISE_CANCEL_FAIL(700003032),
//-------------PROMOTION促销优惠券模块------------------------/
PROMOTION_REQUEST_PAREMENT_ERROR(700001000),
PROMOTION_PARAM_IS_ERROR(700001001),
PROMOTION_COUPON_IS_INVAILD(700001002),
PROMOTION_COUPON_IS_CLOSED(700001003),
PROMOTION_COUPON_NOT_EXISTS(700001004),
PROMOTION_COUPONINFO_NOT_EXIST(700001005),
PROMOTION_COUPON_IS_NOT_VAILD(700001006),
PROMOTION_COUPON_CANNOT_USE(700001007),
PROMOTION_COUPON_USE_TYPE_NOT_ALLOW(700001008),
PROMOTION_COUPON_USED_MAX(700001009),
PROMOTION_COUPON_NOT_USE_DOUBLE(700001010),
PROMOTION_COUPON_NOT_ALLOW_OR_EXPIRE(700001011),
PROMOTION_COUPON_USE_MAX(700001012),
PROMOTION_COUPON_IS_NOT_YOUS(700001013),
PROMOTION_COUPON_HAS_RECEIVED(700001014),
PROMOTION_COUPON_HAS_NOT_EXISTS(700001015),
PROMOTION_COUPON_SEND_FAIL(700001016),
PROMOTION_COUPON_HAS_NO_VAILD(700001017),
PROMOTION_COUPON_CONFIG_NOT_EXISTS(700001018),
PROMOTION_YOHOBI_SEND_FAIL(700001019),
PROMOTION_COUPON_USER_BIRTH_IS_NULL(700001020),
PROMOTION_COUPON_USER_BIRTH_IS_NOT_ALLOW(700001021),
PROMOTION_COUPON_USER_BIRTH_ONE_YEAR_ONE(700001022),
PROMOTION_ACTIVITY_NOT_EXISTS(700001041),
PROMOTION_ACTIVITY_CONFIGURATION_NOT_EXISTS(700001042),
PROMOTION_COUPON_ONLY_NEW_USER_CAN_ACQUIRE(700001043),
PROMOTION_ACTIVITY_COUPON_HAS_ACQUIRED(700001044),
POROMTION_COUPON_USER_LEVEL_CAN_NOT_ACQUIRE(700001045),
ACTIVITY_STATUS_ERROR(700001046),
HAVE_NOT_EXISTS_SHARE_HISTORY(700001047),
REQUEST_PARAM_INVALID(700001048),
PROMOTION_PCOUPON_ARRIVED_MAX_TIMES(700001049),
PROMOTION_COUPON_BROADCAST_SEND_FAIL(700001051),
PROMOTION_COUPON_NOT_ARRIVE_GET_START_TIME(700001052),
PROMOTION_COUPON_TIME_OUT_CAN_NOT_GET(700001053),
PROMOTION_COUPON_VIP_LEVEL_NO_BIRTH_COUPON(700001054),
PROMOTION_COUPON_NO_BIRTH_COUPON_GET(700001055),
//限购码异常
LIMIT_CODE_NOT_EXIST(700001030),
LIMIT_CODE_INVALID(700001031),
LIMIT_CODE_EXPIRED(700001032),
LIMIT_CODE_NOT_AVAILABLE(700001033),
LIMIT_CODE_EXCEED_LIMIT_NUM(700001034),
LIMIT_CODE_UNFIT_CONDITION(700001035),
LIMIT_CODE_NOT_PRODUCT(700001036),
HAS_RECEIVE_LIMIT_CODE_PRODUCT(700001037),
LIMIT_CODE_BATCH_NOT_EXIST(700001038),
LIMIT_PRODUCT_TYPE_NOT_SHARE(700001039),
LIMIT_CODE_SKU_NOT_MATCH_PRODUCTSKU(700001040),
LIMIT_PRODUCT_TYPE_SPECIAL_NOT_SHARE(700001050),
//优惠码异常
PROMOTION_CODE_NOT_EXIST(700001023),
PROMOTION_CODE_INVALID(700001024),
PROMOTION_CODE_EXPIRED(700001025),
PROMOTION_CODE_EXCEED_LIMIT_NUM(700001026),
PROMOTION_CODE_UNFIT_CONDITION(700001027),
PROMOTION_CODE_NOT_AVAILABLE(700001028),
//----------------购物车异常码-------------------/
SHOPPING_REQUESTPARAMS_IS_NULL(200001001),
SHOPPING_PRODUCTSKU_IS_NULL(200001002),
SHOPPING_SHOPPINGKEY_IS_NULL(200001003),
SHOPPING_PRODUCTSKN_BUYNUMBER_OVER_MAX(200001004),
SHOPPING_CART_NUMBER_OVER_MAX(200001005),
SHOPPING_PROFILE_IS_EMPTY(200001006),
SHOPPING_CART_IS_EMPTY(200001007),
SHOPPING_BUSCHECK_STORAGE_NUM_NOT_SUPPORT(200001008),
SHOPPING_PRODUCT_ATTRIBUTE_NOT_SUPPORT(200001009),
SHOPPING_PRODUCT_NOT_EXIST(200001010),
SHOPPING_VRESION_NOT_SUPPORT_ADVANCE(200001011),
SHOPPING_CART_ONLY_ONE_PRODUCT(200001012),
SHOPPING_PRODUCT_SKU_LIST_IS_NULL(200001013),
SHOPPING_PACKAGE_FORMAT_IS_NULL(200001014),
SHOPPING_SWAP_DATA_IS_NULL(200001015),
SHOPPING_UID_IS_NULL(200001016),
SHOPPING_PRODUCT_NOT_BELONG_PROMOTION(200001017),
SHOPPING_GOODS_NUMBER_NOTMEET_COUPONS(200001018),
SHOPPING_GOODS_AMOUNT_NOTMEET_COUPONS(200001019),
SHOPPING_SHIPPINGCOST_IS_FREE_NEXTTEIME_USE_COUPONCODE(200001020),
SHOPPING_NON_USE_COUPONS_GOODS(200001021),
SHOPPING_COUPONCODE_IS_NULL(200001022),
SHOPPING_CART_IS_EMPTY_FOR_QUERY(200001023),
SHOPPING_CART_IS_EMPTY_FOR_INCREASE(200001024),
SHOPPING_CART_IS_EMPTY_FOR_DECREASE(200001025),
SHOPPING_CART_IS_EMPTY_FOR_REMOVE(200001026),
SHOPPING_CART_IS_EMPTY_FOR_SWAP(200001027),
SHOPPING_CART_IS_EMPTY_FOR_PAYMENT(200001028),
SHOPPING_CART_IS_EMPTY_FOR_COUNT(200001029),
SHOPPING_CART_IS_EMPTY_FOR_SELECTED(200001030),
SHOPPING_CART_IS_EMPTY_FOR_COMPUTE(200001031),
SHOPPING_CART_IS_EMPTY_FOR_USECOUPON(200001032),
SHOPPING_CART_IS_EMPTY_FOR_SUBMIT(200001033),
SHOPPING_CART_IS_EMPTY_FOR_ADDFAVORITE(200001034),
SHOPPING_CART_ORDER_TAG_IS_USED(200001040),
SHOPPING_CART_GET_ORDERCODE_ERROR(200001041),
SHOPPING_PROMOTION_NOT_EXIST(200001042),
SHOPPING_ERP_ORDER_GOODS_IS_EMPTY(200001043),
SHOPPING_BUSCHECK_ERP_ORDER_MISSING_FIELDS(200001044),
SHOPPING_BUSCHECK_ERP_ORDER_GOODS_MISSING_FIELDS(200001045),
SHOPPING_BUSCHECK_ERP_ORDER_RECEIVER_MISSING_FIELDS(200001046),
SHOPPING_ERP_ORDER_PROMOTION_MISSING_FIELDS(200001047),
SHOPPING_ERP_ORDER_CREATION_ERROR(200001048),
SHOPPING_BUSCHECK_LOCAL_ORDER_MISSING_FIELDS(200001049),
SHOPPING_YOHO_EXCEED_REAL_AMOUT(200001050),
SHOPPING_BUSCHECK_PRODUCT_EXCEED_BUYLIMIT(200001051),
SHOPPING_ERP_ORDER_STATUS_ERROR(200001052),
SHOPPING_ORDER_ADDRESS_IS_NULL(200001053),
SHOPPING_ORDER_PAYMENTTYPE_IS_NULL(200001054),
SHOPPING_ORDER_PAYBY_IS_NULL(200001055),
SHOPPING_BUSCHECK_ERP_STATUS_RETURN_CODE_NOT_200(200001056),
SHOPPING_CART_ADDFAVORITE_ACTION_ERROR(200001057),
SHOPPING_BUSCHECK_ERP_ORDER_CREATION_RETURN_CODE_NOT_200(200001058),
SHOPPING_ORDER_GOODS_IS_EMPTY(200001059),
SHOPPING_COUPONS_PROMOTIONCODE_BOTH_NOT_NULL(200001060),
SHOPPING_PROMOTIONCODE_NOTMEETING_CONDITION(200001061),
SHOPPING_PRMOTIONCODE_NOT_EXISTS(200001062),
SHOPPING_BLACK_LIST(200001063),
SHOPPING_CASH_PAYMENT_AMOUNT_OVER_LIMIT(200001064),
SHOPPING_SHOPPINGKEY_LENGTH_OVERLIMIT(200001065),
SHOPPING_PRODUCT_STORAGE_NUM_NOT_ENOUGH(200001066),
SHOPPING_CART_VERSION_NOT_SUPPORT(200001067),
SHOPPING_CART_ILLEGAL_PARAMETER(200001068),
SHOPPING_USE_YOHOCOIN_AMOUNT_OVER_ORDER_AMOUNT(200001069),
SHOPPING_USER_BLACK_LIST(200001070),
SHOPPING_ORDER_MUST_ONLINE_PAY(200001071),
SHOPPING_ORDER_AMOUNT_ERROR(200001072),
SHOPPING_ONLINE_PAY_ORDER_AMOUNT_OVERLIMIT(200001073),
SHOPPING_JIT_SUPPLIER_ERROR(200001074),
SHOPPING_CART_TYPE_NOT_SUPPORT(200001075),
SHOPPING_USER_MOBILE_IS_INVALID(200021001),
SHOPPING_PRODUCT_ATTRIBUTE_NOT_SUPPORT_TICKET(200021002),
SHOPPING_TICKET_SYSCONFIG_IS_NULL(200021003),
SHOPPING_TICKET_HAS_BUY(200021004),
SHOPPING_TICKET_SIZENAME_FORMST_IS_RIGHT(200021005),
SHOPPING_SUBMIT_ORDER_FAIL(200021006),
SHOPPING_ORDER_AMOUNT_INCORRECT(200021007),
SHOPPING_ORDER_REPEATABL_SUBMIT(200021008),
SHOPPING_TICKET_MUST_UPGRADE_VERSION(200021009),
SHOPPING_PRODUCT_NOT_SUPPORT_BUYNOW(200021010),
SHOPPING_CART_OFFLINE_PRODUCT_LOCK_ERROR(200021011),
SHOPPING_CART_OFFLINE_PRODUCT_UN_LOCK_ERROR(200021012),
SHOPPING_CART_OFFLINE_PRODUCT_CHECK_LOCK_ERROR(200021013),
SHOPPING_CART_OFFLINE_STOCK_QUERY_ERROR(200021014),
SHOPPING_CART_OFFLINE_QR_BIND_ERROR(200021015),
SHOPPING_CART_OFFLINE_QR_ACTIVATE_ERROR(200021016),
SHOPPING_CART_OFFLINE_QR_NOT_MATCH(200021017),
SHOPPING_CART_OFFLINE_PAYMENT_STORAGE_UNSATISFY(200021018),
SHOPPING_CART_OFFLINE_SUBMIT_STORAGE_UNSATISFY(200021019),
SHOPPING_CART_OFFLINE_PAYMENT_STORAGE_NOT_ENOUGH(200021020),
SHOPPING_CART_OFFLINE_SUBMIT_STORAGE_NOT_ENOUGH(200021021),
//秒杀
SHOPPING_PRODUCT_NOT_SUPPORT_SECKILL(200022010),
SHOPPING_SECKILL_NOT_SUPPORT_OPERATION(200022011),
SHOPPING_SECKILL_ONLY_BUY_ONE_GOODS(200022012),
SHOPPING_SECKILL_NOT_SUPPORT_ADD_SHOPPINGCART(200022013),
SHOPPING_SECKILL_ONLY_BUY_ONE(200022014),
SHOPPING_SECKILL_GOODS_SOLD_OUT(200022018),
SHOPPING_SECKILL_ACTIVITY_NOT_START(200022019),
SHOPPING_SECKILL_ACTIVITY_IS_OVER(200022020),
SHOPPING_PRODUCT_NOT_SUPPORT_DEPOSIT(200022021),
SHOPPING_DEPOSIT_ACTIVITY_IS_OUT(200022023),
SHOPPING_DEPOSIT_ACTIVITY_IS_OVER(200022025),
//线下店
SHOPPING_CART_OFFLINE_DONT_HAVE_PERMISSION_ACTIVATE(200022015),
SHOPPING_CART_OFFLINE_ILLEGAL_PARAMETER_FOR_DELETE(200022016),
SHOPPING_CART_OFFLINE_CANNT_CHANGE_NUM_FOR_SWAP(200022017),
SHOPPING_CART_OFFLINE_LOCK_STORAGE_FAILED(200022022),
SHOPPING_CART_OFFLINE_IS_INVALID(200022024),
SHOPPING_CART_OFFLINE_ACTIVATE_NOT_ENOUGH_STORAGE(200022026),
SHOPPING_PRODUCT_STORAGE_NUM_NOT_ENOUGH_SOLDOUT(200022027),
//套餐
SHOPPING_ACTIVITY_IS_INVALID(200022028),
SHOPPING_THE_SAME_SKN_ONLY_BUY_ONE_IN_AN_ACTIVITY(200022029),
SHOPPING_SKN_NOT_BELONG_TO_ACTIVITY(200022030),
SHOPPING_ACTIVITY_SKN_MUST_NEED_BUY(200022031),
SHOPPING_PRODUCT_BUNDLE_NOT_EXIST(200022032),
SHOPPING_CART_NOT_SUPPORT_ADD_THE_PRODUCT(200022033),
SHOPPING_PRODUCT_BUY_NUMBER_NOT_MEET_CONDITION(200022034),
SHOPPING_CART_PRODUCT_BUY_NUMBER_NOT_MEET_CONDITION(200022035),
SHOPPING_SYS_ERROR(200009999),
//----------------商品异常码 start-------------------/
//商品收藏服务接口
PRODUCT_TYPE_INCORRECT(500001001),
PRODUCT_ID_INCORRECT(500001002),
PRODUCT_NOT_EXIST(500001003),
PRODUCT_EXISTS(500001004),
PRODUCT_ADD_FAVORITE_SUCCESS(500001005),
PRODUCT_ADD_FAVORITE_FAIL(500001006),
PRODUCT_CANCLE_FAVORITE_SUCCESS(500001007),
PRODUCT_CANCLE_FAVORITE_FAIL(500001008),
FAVORITED_OVER_LIMIT(500001016),
//品牌收藏服务接口
UID_NOT_EXIST(500001009),
BRAND_NOT_EXISTS(500001010),
BRAND_ALREADY_FAVORITE(500001011),
//加价购服务接口
PRODUCTSKN_IS_NULL(500001012),
PROMOTIONID_IS_NULL(500001013),
PRODUCT_DATA_NOT_EXIST(500001014),
ACTIVITY_NOT_CONTAIN_PRODUCT(500001015),
// Outlets 专题
PRODUCT_ACTIVITY_PARAMS_PLATFORM(500001019),
PRODUCT_ACTIVITY_PARAMS_TYPE(500001020),
PRODUCT_ACTIVITY_PARAMS_ID(500001021),
PRODUCT_ACTIVITY_NOT_EXIST(500001022),
PRODUCT_ACTIVITY_NOT_START(500001023),
PRODUCT_ACTIVITY_IS_END(500001024),
//微信
WECHAT_USERFOLLOW_OPENID_ISBLANK(800001001),
WECHAT_USERFOLLOW_NO_UNIONID(800001002),
WECHAT_USERFOLLOW_NO_TOKEN(800001003),
WECHAT_USERFOLLOW_INVOKE_API_FAIL(800001004),
WECHAT_PARAM_ISNULL(800001005),
WECHAT_INTERFACE_ERROR(800001006),
WECHAT_NOTSUPPORT_INTERFACE(800001007),
//---------------社区异常码——————————————————————————/
POSTS_PRAISE_ID_ISNULL(900001001),
POSTS_PRAISE_UID_ISNULL(900001002),
POSTS_PRAISE_FAIL(900001003),
POSTS_PRAISE_GET_FAIL(900001004),
POSTS_ID_ISNULL(900001005),
POSTS_ISNULL(900001006),
POSTS_COMMENT_UID_IS_NULL(900001007),
POSTS_UID_IS_NULL(900001008),
SOCIAL_UID_IS_NULL(900001009),
SOCIAL_USERINFO_IS_NULL(900001010),
SOCIAL_INBOX_MSG_ID_IS_NULL(900001011),
SOCIAL_SSOUID_IS_NULL(900001012),
SOCIAL_INBOX_TYPE_NULL(900001013),
SOCIAL_APPTYPE_TYPE_NULL(900001014),
POSTS_AUTHOR_UID_NULL(900002002),
POSTS_AUTHOR_ISNOT_EXIST(900002003),
POSTS_FORUM_ISNOT_EXIST(900002004),
POSTS_INFO_IS_NULL(900002005),
POSTS_FORUM_CODE_IS_NULL(90000206),
POSTS_AUTHOR_ID_IS_NULL(90000207),
POSTS_CONTENT_IS_NULL(90000208),
POSTS_FORUM_GET_FAIL(900002009),
POSTS_ADVERT_CODE_ISNOT_EXIST(900002010),
POSTS_IMAGE_SIZE_ISNOT_SAME(900002011),
POSTS_COMMENT_IS_NULL(900003001),
POSTS_COMMENT_ID_IS_NULL(900003002),
POSTS_COMMENT_DEL_INVALID(900003003),
//----------------商品异常码 end-------------------/
//---- EPR-Stock CODE ---//
ERP_STOCK_ORDER_CODE_IS_EMPTY(70001002),
ERP_STOCK_CHANNEL_CODE_IS_EMPTY(70001003),
ERP_STOCK_ORDER_NOT_IN_MAP(70001004),
ERP_STOCK_SHIFT_LOG_NOT_PRODUCT_SKU(70001005),
ERP_STOCK_CHANGE_LOG_NOT_SKN_SKC_SKU(70001006),
ERP_STOCK_OCCUP_NOT_SKU(70001007),
ERP_STOCK_OCCUP_NOT_SHOPID(70001008),
ERP_STOCK_OCCUP_NOT_SHOPKEY(70001009),
ERP_STOCK_OCCUP_NOT_STOCKNUM(70001010),
ERP_STOCK_CANNOT_GET_ANY_ORDERS(70001011),
ERP_STOCK_CHECK_CAUSE_FAILURE(70001012),
ERP_STOCK_WRONG_STOREHOUSE_ID(70001013),
ERP_STOCK_IRREGULAR_PARAMETERS(70001014),
ERP_STOCK_INVALID_SEAT_CODE(70001015),
//################################################## ERP BEGIN ##############################
SERVICE_ID_NOT_AVAILBLE(20001002),//param is null
//----------------外采单异常码 begin-------------------/
ERP_WEBSERVICE_SUCCESS(90001000),
ERP_WEBSERVICE_EXCEPTION(90001001),
ERP_WEBSERVICE_PARAM_ERROR(90001002),
ERP_WEBSERVICE_SERVICE_NOT_AVAILABLE(90001003),
ERP_POP_SKU_EMPTY(60001002),
ERP_POP_EMPTY_JIT(60001003),
ERP_POP_PURCHASE_EMPTY(60001004),
ERP_POP_PURCHASE_GOODS_EMPTY(60001005),
ERP_POP_EMPTY_BRAND_ID(60001006),
ERP_POP_INVALID_BRAND_NAME(60001007),
ERP_POP_NO_OUTSTORAGE_RECORD(60001008),
ERP_POP_NO_REQUISITION_RECORD(60001009),
ERP_POP_NO_PRO_REQUISITION_RECORD(60001010),
ERP_POP_INPUT_FACTORYCODE_INVALID(60001011),
ERP_POP_NO_PRO_REQUISITION_GOODS(60001012),
ERP_POP_CASE_EXCEPTION(60001013),
ERP_POP_NO_SALE(60001014),
ERP_POP_ABNORMAL_INVENTORY(60001015),
ERP_POP_ABNORMAL_SKU(60001016),
ERP_POP_PARAM_ILLEGAL(60001017),
ERP_POP_NO_PRO_REQUISITION_ERROR(60001018),
ERP_POP_PRO_REQUISITION_COMMITTED(60001019),
ERP_POP_MAIN_PRO_REQUISITION_NOT_COMMITED(60001020),
ERP_POP_SUPPLY_PRO_REQ_FORBID(60001021),
ERP_POP_REQUISITION_AUDIT_STATUS_ERROR(60001022),
ERP_POP_NO_GOODS(60001023),
ERP_POP_REQUISITION_STATUS_ERROR(60001024),
ERP_POP_PRO_REQUISITION_STATUS_ERROR(60001025),
ERP_POP_UNCOMMITTED_SUPPLY_PRO_REQUISITON(60001026),
ERP_POP_IMPORT_NUM_GREATER_THAN(60001027),
ERP_POP_NOT_DISTRIBUTION(60001028),
ERP_POP_SYNC_VIR_STORAGE_ERROR(60001029),
ERP_POP_PRO_REQUISITION_FINISHED(60001030),
ERP_POP_DUPLICATE_KEY_OF_EXPRESS(60001031),
ERP_POP_INVOKE_FMS_PAYEDAMOUNT_ERROR(60001032),
ERP_POP_INVOKE_FMS_INSERTDEALERBALANCE_ERROR(60001033),
//----------------外采单异常码 end-------------------/
//----------------财务结算异常码 begin-------------------/
ERP_FMS_SUCCESS(30001000),
ERP_FMS_EXCEPTION(30001001),
ERP_FMS_OUTINSTORAGE_EMPTY(30001002),
ERP_FMS_REQUISITIONFORM_EMPTY(30001003),
ERP_FMS_CLAUSESETTLEMENT_EMPTY(30001004),
ERP_FMS_AGREEMENTClAUSE_EMPTY(30001005),
ERP_FMS_BASEPRODUCT_EMPTY(30001006),
ERP_FMS_SELL_TYPE_EXCEPTION(30001007),
ERP_FMS_PURCHASE_DISCOUNT_EXCEPTION(30001008),
ERP_FMS_BALANCE_DETAIL_INSERT_ERROR_EXCEPTION(30001009),
ERP_FMS_FINANCE_CLEARING_UPDATE_ERROR_EXCEPTION(30001010),
ERP_FMS_PAYINFO_INSERT_DUPLICATE(30001011),
ERP_FMS_PAYINFO_INSERT_ERROR(30001012),
ERP_FMS_PAYINFO_INSERT_INVALID(30001013),
ERP_FMS_USERRECEIVABLES_INSERT_DUPLICATE(30001013),
ERP_FMS_USERRECEIVABLES_INSERT_ERROR(30001014),
ERP_FMS_USERRECEIVABLES_INSERT_INVALID(30001015),
ERP_FMS_USERRECEIVABLESSPLIT_INSERT_DUPLICATE(30001016),
ERP_FMS_USERRECEIVABLESSPLIT_INSERT_ERROR(30001017),
ERP_FMS_USERRECEIVABLESSPLIT_INSERT_INVALID(30001018),
ERP_FMS_USER_PAYMENT_TOO_LARGE(30002006),
ERP_FMS_SPECIAL_RETURN_STATUS_NOT_AUDITED(30002007),
ERP_FMS_COSTCHANGE_NOT_EXISTED(30002008),
ERP_FMS_COSTCHANGE_HAS_AUDITED(30002009),
//----------------CRF分期付款异常码start-------------------/
ERP_FMS_INSTALLMENT_REFUND_NOTIFY_INSERT_ERROR(30002000),
ERP_FMS_INSTALLMENT_REFUND_NOTIFY_PARAMS_ERROR(30002001),
ERP_FMS_INSTALLMENT_PAYMENT_NOTIFY_HAS_EXIST_ERROR(30002002),
ERP_FMS_PARAMETER_ERROR(30002003),
ERP_FMS_NO_REPAY_PLAN_RECORD(30002004),
//----------------CRF分期付款异常码 end-------------------/
//----------------经销请款异常码start-------------------/
ERP_FMS_NO_SUPPLIER_INVOICE(30003000),
ERP_FMS_SUPPLIER_INVOICE_NO_ENOUGH_AMOUNT(30003001),
ERP_FMS_EMPTY_REQUISITION_INVOICE(30003002),
ERP_FMS_EMPTY_REQUISITION_INVOICE_LIST(30003003),
ERP_FMS_EMPTY_SUPPLIER_INVOICE(30003004),
ERP_FMS_SUPPLIER_BRAND_ERROR(30003005),
ERP_FMS_PRO_INVOICE_AMOUNT_ERROR(30003006),
ERP_FMS_NET_INVOICE_AMOUNT_ERROR(30003007),
ERP_FMS_NO_REQUISITION_GOODS(30003008),
ERP_FMS_NO_PRO_REQUISITION_GOODS(30003009),
ERP_FMS_SUPPLIER_INVOCIE_STATUS_ERROR(30003010),
ERP_FMS_NO_PRO_REQUISITION(30003011),
ERP_FMS_REQUISITION_INVOCIE_STATUS_ERROR(30003012),
ERP_FMS_NO_AGREEMENT(30003013),
ERP_FMS_NO_AGREEMENT_CLAUSE(30003014),
ERP_FMS_REJECT_REASON(30003015),
ERP_FMS_WORKFLOW_EMPTY(30003016),
ERP_FMS_REQUISITION_EMPTY(30003017),
ERP_FMS_CREATOR_NO_PERMISSION(30003018),
ERP_FMS_NODE_STATUS_NOT_CHECK_PENDING(30003019),
ERP_FMS_PID_IS_INVALID(30003020),
ERP_FMS_ROLE_ID_NOT_FOUND(30003021),
ERP_FMS_AMOUNT_GREATER_THAN_BALANCE_AMOUNT(30003022),
ERP_FMS_AUDIT_FLAG_INVALID(30003023),
ERP_FMS_PID_NOT_EXIST(30003024),
ERP_FMS_ROLE_ID_NOT_MATCHING_PID(30003025),
//----------------经销请款异常码end-------------------/
//----------------财务结算异常码 end-------------------/
//----------------基础公共bms begin-------------------/
ERP_BMS_SUCCESS(10001000),
ERP_BMS_EXCEPTION(10001001),
ERP_BMS_SMSBO_PARAMS_EMPTY(10001002),
ERP_BMS_ACCOUNT_NOT_EXISTS(10001003),
ERP_BMS_ACCOUNT_EXPIRED(10001004),
ERP_BMS_ACCOUNT_CLOSED(10001005),
ERP_BMS_ACCOUNT_NOT_AUTHORIZED(10001006),
ERP_BMS_PASSWORD_NOT_CORRECT(10001007),
ERP_BMS_ROLE_STATE_ERROR(10001008),
ERP_BMS_ACCOUNT_HAS_EXISTED(10001009),
ERP_BMS_SYN_ERP_PROFILE_EXCEPTION(10001010),
ERP_BMS_NO_RECORD(10001011),
ERP_BMS_PARAMS_EMPTY(10001012),
//----------------基础公共bms end-------------------/
//----------------权限系统ams begin start with 1100xxxx-------------------/
ERP_AMS_SUCCESS(11001000),
ERP_AMS_EXCEPTION(11001001),
ERP_AMS_SMSBO_PARAMS_EMPTY(11001002),
ERP_AMS_ACCOUNT_NOT_EXISTS(11001003),
ERP_AMS_ACCOUNT_EXPIRED(11001004),
ERP_AMS_ACCOUNT_CLOSED(11001005),
ERP_AMS_ACCOUNT_NOT_AUTHORIZED(11001006),
ERP_AMS_PASSWORD_NOT_CORRECT(11001007),
ERP_AMS_ROLE_STATE_ERROR(11001008),
ERP_AMS_ACCOUNT_HAS_EXISTED(11001009),
ERP_AMS_SYN_ERP_PROFILE_EXCEPTION(11001010),
ERP_AMS_NO_RECORD(11001011),
ERP_AMS_BLACK_ACCOUNT(11001012),
ERP_AMS_NO_LEGAL_PIDS(11001013),
//----------------权限系统ams end-------------------/
//----------------订单异常码 begin-------------------/
ERP_ORDER_SUCCESS(50001000),
ERP_ORDER_EXCEPTION(50001001),
ERP_ORDER_STATUS_DELIVERY_ERROR(50001002),
ERP_ORDER_STATUS_CANCEL_ERROR(50001003),
ERP_ORDER_STATUS_EMPTY(50001004),
ERP_ORDER_EMPTY(50001005),
ERP_ORDER_CODE_OR_STATUS_EMPTY(50001006),
ERP_ORDER_BO_PARAMS_INVALID(50001007),
ERP_ORDER_PARENT_ORDER_FAILED(50001008),
ERP_ORDER_PARENT_ORDER_EMPTY(50001009),
ERP_ORDER_COMPARE_AMOUNT_FAILED(50001010),
ERP_ORDER_UPDATE_PARENT_PAYMENT_FAILED(50001011),
ERP_ORDER_UPDATE_SUBORDERS_PAYINFO_FAILED(50001012),
ERP_ORDER_ORDER_CODE_INVALID(50001013),
ERP_ORDER_ORDER_TYPE_INVALID(50001014),
ERP_ORDER_CALL_ERROR(50001140),
ERP_ORDER_CHANGE_NOT_OPERATE(50001211),
ERP_ORDER_AMOUNT_INVALID(50001212),
ERP_ORDER_PARAM_INVALID(50001213),
ERP_ORDER_CREATE_ORDER_FAILD(50001230),
ERP_ORDER_INSERT_ERROR(50001226),
ERP_ORDER_INSERT_GOODS_ERROR(50001229),
ERP_ORDER_INSERT_COUPONS_ERROR(50001223),
ERP_ORDER_INSERT_SPLITINFO_ERROR(50001224),
ERP_ORDER_INSERT_PARENT_ORDER_ERROR(50001225),
ERP_ORDER_INSERT_PROMO_ERROR(50001227),
ERP_ORDER_NOT_EXISTS(50001217),
ERP_ORDER_PARENT_EXISTS(50001218),
ERP_ORDER_PARENT_NOT_EXISTS(50001219),
ERP_ORDER_PARENT_NOT_PAYMENT(50001221),
ERP_ORDER_IT_IS_PARENT_ORDER(50001228),
ERP_ORDER_CHANNELS_ORDER_EXIST(50001220),
ERP_ORDER_GOODS_IS_NULL(50001231),
ERP_ORDER_USER_RECEIVABLE_INVALIDATE(50001232),
ERP_ORDER_USER_RECEIVABLE_SPLIT_INVALIDATE(50001233),
ERP_ORDER_CHILD_ORDER_GOODS_INVALID(50001222),
ERP_ORDER_SET_PAYMENT_STATE_FAILD(50001215),
ERP_ORDER_CODE_INVALID(50001214),
ERP_ORDER_CANCEL_INSERT_USER_PAYMENT_FAILED(50001234),
ERP_ORDER_CANCEL_FAILED(50001235),
ERP_ORDER_CANCEL_REFUND_FAILED(50001236),
ERP_ORDER_REFUND_GOODS_NUMBER_ERROR(50001237),
ERP_ORDER_REFUND_CALC_MONEY_FAILED(50001238),
ERP_ORDER_REFUND_CANNOT_MATCH_GOODS(50001239),
ERP_ORDER_INSERT_PAYINFO_FAILED(50001240),
ERP_ORDER_INSERT_USER_RECEIVABLES_FAILED(50001241),
ERP_ORDER_INSERT_USER_RECEIVABLES_SPLIT_FAILED(50001242),
ERP_ORDER_CHEAT_ORDER(50001243),
ERP_ORDER_ORDER_STATUS_ERROR(50001244),
ERP_ORDER_STATUS_CALL_ERROR(50001245),
ERP_ORDER_INSERT_INVOICE_ERROR(50001246),
ERP_ORDER_INSERT_ORDER_DUPLICATE(50001247),
ERP_ORDER_RETURN_INSERT_USER_PAYMENT_FAILED(50001248),
ERP_ORDER_INSTALMENT_RETURN_CRF_RESP_NULL(50001249),
ERP_ORDER_INSTALMENT_HAS_RETURNED(50001250),
ERP_ORDER_INSTALMENT_RATE_EMPTY(50001251),
ERP_ORDER_INSTALMENT_NOT_EXIST(50001252),
ERP_ORDER_INSTALMENT_CRF_RESPONSE_ERROR(50001253),
ERP_ORDER_PAYMENT_INSTALLMENTRATES_INSERT_ERROR(50001254),
ERP_ORDER_PAYMENT_INSTALLMENTREPAYPLAN_INSERT_ERROR(50001255),
ERP_ORDER_INSTALMENT_CANCEL_SUCCESS(50001256),
ERP_ORDER_INSTALMENT_CANCEL_FAILED(50001257),
ERP_ORDER_STATUS_CANCEL_CODE_INVALID(50001258),
ERP_ORDER_UPDATE_ADDRESS_ORDERCODE_INVALID(50001259),
ERP_ORDER_UPDATE_ADDRESS_ORDERSTATUS_INVALID(50001260),
ERP_ORDER_UPDATE_ADDRESS_SUCCESS(50001261),
ERP_ORDER_PAYMENT_CHKACTINFO_ERROR(50001262),
ERP_ORDER_STOCK_ERROR(50001263),
ERP_ORDER_TYPE_ERROR(50001264),
ERP_ORDER_CANNOT_DELETE_USER_RETURN(50001265),
ERP_ORDER_NO_CHANGE_GOODS(50001266),
ERP_ORDER_REFUSE_USED(50001267),
ERP_ORDER_UPDATE_ORDERSTATUS_BYSKU_CANNOT_MATCH_ORDER(50001268),
ERP_ORDER_CANNOT_RETURN(50001276),
ERP_ORDER_NULL(50001277),
//亿起发
ORDER_EMAR_USER_EMPRY(50001269),
ORDER_EMAR_USER_KEY_ERROR(50001270),
ORDER_EMAR_CID_WI_NOT_FOUND(50001271),
ORDER_EMAR_NO_ORDERS(50001272),
ORDER_EMAR_PROPERTY_ERROR(50001273),
ORDER_MARK_ORDER_TOO_MANY_SKUS(50001274),
//----------------订单异常码 end-------------------/
//----------------WMS异常码 begin-------------------/
ERP_WMS_SUCCEED(80001000),
ERP_WMS_FAIL(80001001),
ERP_WMS_IMPERFECT_PARAM_ERROR(80001002),
ERP_WMS_IMPERFECT_ORIGINAL_SKU_NOT_EXIST(80001003),
ERP_WMS_IMPERFECT_ORIGINAL_SKC_NOT_EXIST(80001004),
ERP_WMS_IMPERFECT_ORIGINAL_SKN_NOT_EXIST(80001005),
ERP_WMS_IMPERFECT_ORIGINAL_SKUSKCSKN_NOT_EXIST(80001006),
ERP_WMS_IMPERFECT_OUTSTOCK_FAIL(80001007),
ERP_WMS_IMPERFECT_UPDATE_INSTOCK_NUM_FAIL(80001008),
ERP_WMS_IMPERFECT_BUILD_INSTORAGE_ORDER_FAIL(80001009),
ERP_WMS_IMPERFECT_SEAT_CODE_STRING_ERROR(80001010),
ERP_WMS_IMPERFECT_SKU_IS_IMPERFECT(80001011),
ERP_WMS_IMPERFECT_STORAGE_NOT_ENOUGH(80001012),
ERP_WMS_GET_OFFLINE_ALLOCATION_SN_FAIL(80001013),
ERP_WMS_OFFLINE_NO_APPROVAL_GOODS(80001014),
ERP_WMS_SUBMITTED_ALLOCATION(80001015),
ERP_WMS_NO_ALLOCATION_RECORD(80001016),
ERP_WMS_OPT_AUDITING_ALLOCATION(80001017),
ERP_WMS_OFFLINE_NO_SHOP_ID(80001018),
ERP_WMS_OFFLINE_PDA_NO_MOVED_GOODS(80001019),
ERP_WMS_OFFLINE_PDA_NOT_ENOUGH_GOODS(80001020),
ERP_WMS_GET_OFFLINE_INSTORE_PRODUCT_ERROR(80001021),
ERP_WMS_GET_PRODUCT_STOCK_NUM_ERROR(80001022),
ERP_WMS_OFFLINE_PDA_SEAT_SHIFT_PARAMETER_ERROR(80001023),
ERP_WMS_GET_STORE_SALE_PRODUCT_ERROR(80001024),
ERP_WMS_SKU_NOT_FOUND_IN_PICKING_ORDER_ERROR(80001025),
ERP_WMS_NO_GOODS_IN_PICKING_ORDER_ERROR(80001026),
ERP_WMS_SEATCODESTRING_NOT_EXISTED_ERROR(80001027),
ERP_WMS_SEATCODESTRING_PROPERTY_NOT_CORRECT_ERROR(80001028),
ERP_WMS_ALLOCATION_EMPTY(80001029),
ERP_WMS_ILLEGAL_OUT_STORAGE_TYPE(80001030),
ERP_WMS_QUERY_NJ_GOODS_ERROR(80001031),
ERP_WMS_QUERY_NJ_GOODS_EXCEPTION(80001032),
ERP_WMS_QUERY_AllOCATION_PARAM_EMPTY(80001033),
ERP_WMS_QUERY_AllOCATION_GOODS_PARAM_EMPTY(80001034),
ERP_WMS_QUERY_SHELF_GOODS_PARAM_EMPTY(80001035),
ERP_WMS_PARAM_ERROR(80001036),
ERP_WMS_OFFLINE_PDA_IN_STOREORDER_PARAMETER_ERROR(80001037),
ERP_WMS_OFFLINE_PDA_IN_STOREORDER_SEATSHIFT_ERROR(80001038),
ERP_WMS_OFFLINE_PDA_IN_STOREORDER_GENERATE_ERROR(80001039),
ERP_WMS_OFFLINE_UPDATE_OCCUPATION_ERROR(80001040),
ERP_WMS_OFFLINE_PDA_IN_OPERATETYPE_ERROR(80001041),
ERP_WMS_NOT_GOODS_TO_UPDATE(80001042),
ERP_WMS_NOT_ALLOCATION_BY_PICKINGID(80001043),
ERP_WMS_VIRTUAIL_OUTIN_FAIL(80001044),
ERP_WMS_VIRTUAL_PURCHASE_FORM_NOT_EXIST(80001045),
ERP_WMS_VIRTUAL_OUTIN_STATUS_ERROR(80001046),
ERP_WMS_VIRTUAL_OUTIN_GOODS_NOTFOUND(80001047),
ERP_WMS_VIRTUAL_OUTIN_SHIFTLOGS_NOTVALID(80001048),
ERP_WMS_OFFLINE_GOODS_ALREADY_EXIST(80001049),
ERP_WMS_TOTAL_ALLOCATION_CLOSED(80001050),
ERP_WMS_PURCHASE_FORM_NOT_EXIST(80001051),
ERP_WMS_OFFLINE_GOODS_NOT_EXIST(80001052),
ERP_WMS_VIRTUAL_OUT_GOODS_NOTFOUND(80001053),
ERP_WMS_VIRTUAL_OUT_SHIFTLOGS_NOTFOUND(80001054),
ERP_WMS_VIRTUAL_OUT_PURCHASE_FORM_NOT_EXIST(80001055),
ERP_WMS_VIRTUAL_OUTIN_CHECKLOCK_ERROR(80001056),
ERP_WMS_OFFLINE_ALLOCATION_DONOT_HAS_ANY_GOODS(80001057),
ERP_WMS_DEFECT_PICKING_PARAM_NULL(80001058),
ERP_WMS_DEFECT_PICKING_PARAM_HOUSEID_NULL(80001059),
ERP_WMS_DEFECT_PICKING_PARAM_CREATEBY_NULL(80001060),
ERP_WMS_DEFECT_PICKING_PARAM_DESTSHELFCODE_NULL(80001061),
ERP_WMS_DEFECT_PICKING_PARAM_GOODSLIST_EMPTY(80001062),
ERP_WMS_DEFECT_PICKING_PARAM_GOODSLIST_SKU_NULL(80001063),
ERP_WMS_DEFECT_PICKING_PARAM_GOODSLIST_NUM_LESS0(80001064),
ERP_WMS_DEFECT_PICKING_PARAM_GOODSLIST_SOURSESHELFCODE_NULL(80001065),
ERP_WMS_DEFECT_PICKING_PARAM_GOODSLIST_DEFECTSOURSE_NULL(80001066),
ERP_WMS_DEFECT_CREATE_ALLOCATION_PARAM_NULL(80001067),
ERP_WMS_DEFECT_CREATE_ALLOCATION_PARAM_CREATEBY_NULL(80001068),
ERP_WMS_DEFECT_CREATE_ALLOCATION_PARAM_SHELFCODE_NULL(80001069),
ERP_WMS_DEFECT_CREATE_ALLOCATION_PARAM_SHOPID_NULL(80001070),
ERP_WMS_DEFECT_CREATE_ALLOCATION_PARAM_SOURCE_NULL(80001071),
ERP_WMS_DEFECT_CREATE_ALLOCATION_PARAM_LIST_NULL(80001072),
ERP_WMS_DEFECT_CREATE_ALLOCATION_PARAM_LIST_SKU_NULL(80001073),
ERP_WMS_CONFIRM_OUTSTORE_PARAM_NULL(80001074),
ERP_WMS_CONFIRM_OUTSTORE_PARAM_ALLOCATION_ID_AND_CODE_NULL(80001075),
ERP_WMS_CONFIRM_OUTSTORE_PARAM_CREATEBY_NULL(80001076),
ERP_WMS_CONFIRM_OUTSTORE_PARAM_PICKINGORDERSID_NULL(80001077),
ERP_WMS_CONFIRM_OUTSTORE_PARAM_STOREID_NULL(80001078),
ERP_WMS_CONFIRM_OUTSTORE_PARAM_TYPE_NULL(80001079),
ERP_WMS_CONFIRM_OUTSTORE_PARAM_SOURCESHELFCODE_NULL(80001080),
ERP_WMS_CONFIRM_OUTSTORE_PARAM_DESTSHELFCODE_NULL(80001081),
ERP_WMS_CONFIRM_OUTSTORE_PARAM_OUTBOXLIST_NULL(80001082),
ERP_WMS_CONFIRM_OUTSTORE_PARAM_OUTBOXCODE_NULL(80001083),
ERP_WMS_CONFIRM_OUTSTORE_PARAM_GOODSLIST_NULL(80001084),
ERP_WMS_CONFIRM_OUTSTORE_PARAM_BRANDID_NULL(80001085),
ERP_WMS_CONFIRM_OUTSTORE_PARAM_NUM_LESS_0(80001086),
ERP_WMS_CONFIRM_OUTSTORE_PARAM_NUM_SKC_NULL(80001087),
ERP_WMS_CONFIRM_OUTSTORE_PARAM_NUM_SKN_NULL(80001088),
ERP_WMS_CONFIRM_OUTSTORE_PARAM_NUM_SKU_NULL(80001089),
ERP_WMS_DEFECT_CREATE_ALLOCATION_PARAM_LIST_NULL_LESS_0(80001090),
ERP_WMS_QUERY_OUTSTORE_DETAIL_PARAM_OUTSTOREORDERID_NULL(80001091),
ERP_WMS_QUERY_INSTORE_DETAIL_PARAM_INSTOREORDERID_NULL(80001092),
ERP_WMS_OUTSTOREORDER_NOT_EXIST(80001093),
ERP_WMS_INSTOREORDER_NOT_EXIST(80001094),
ERP_WMS_CONFIRM_OUTSTORE_PARAM_GOODS_NUM_NULL(80001095),
ERP_WMS_PICKINGORDER_NOT_EXISTED(80001096),
ERP_WMS_PICKINGORDER_FINISHED_OR_OUTED(80001097),
ERP_WMS_PICKINGNUM_GREATER_THAN_ALLOCATIONNUM_ERROR(80001098),
ERP_WMS_FOLLOW_GIFTS_BATCH_NO_ERROR(80001099),
ERP_WMS_BULID_PICKING_ORDER_ISEMPTY(80001100),
ERP_WMS_FOLLOW_GIFTS_STATUS_ERROR(80001101),
ERP_WMS_SEATCODESTRINGSTOREHOUSEID_NOT_EQUALS_STOREHOUSEID(80001102),
ERP_WMS_OUTSTOREORDER_HAS_BEEN_COMPLETED(80001103),
ERP_WMS_QUERY_NJ_SHIFT_SHELF_ERROR(80001104),
ERP_WMS_ALLOCATION_FINISHED_OR_OUTED(80001105),
ERP_WMS_PICKINGID_IS_NULL(80001106),
ERP_WMS_ALLOCATIONID_IS_NULL(80001107),
ERP_WMS_OUTSTORENUM_GREATER_THAN_ALLOCATIONNUM(80001108),
ERP_WMS_OUTSTORENUM_GREATER_THAN_PICKINGNUM(80001109),
ERP_WMS_INSTORENUM_GREATER_THAN_OUTSTORENUM(80001110),
ERP_WMS_SHELF_GOODS_EMPTY(80001111),
ERP_WMS_INVALID_OFFLINE_ALLOCATION_TYPE(80001112),
ERP_WMS_QUERY_NJ_USE_GOODS_ERROR(80001113),
ERP_WMS_QUERY_NJ_SHELFCODE_TO_SEATCODE_ERROR(80001114),
ERP_WMS_QUERY_STOCK_GETSTOCK_ERROR(80001115),
ERP_WMS_CALL_NJ_UPDATE_PRODUCT_RELPLENISHSWITCHES_ERROR(80001116),
ERP_WMS_NO_GOODS_NEED_BE_SHIFT(80001117),
ERP_WMS_CALL_NJ_SYNC_AUDIT_ALLOCATION_GOODS_FAILURE(80001118),
ERP_WMS_ALLOCATION_NUM_MUST_GT_ZERO(80001119),
ERP_WMS_ALLOCATION_NUM_MUST_LTET_STOCK_NUM(80001120),
ERP_WMS_GOODS_IS_NOT_SALABLE_FOR_SHOP(80001121),
ERP_WMS_CONFIRM_OUTSTORE_PARAM_OUTBOXCODE_IS_SAME(80001122),
ERP_WMS_BRAND_NOT_BINDING_SHELF(80001123),
ERP_WMS_NO_BRAND_AUTH(80001124),
ERP_WMS_NO_PICK_GOODS(80001125),
ERP_SCAN_SHELF_CODE_ERROR(80001126),
ERP_SCAN_SALE_SHELF_ERROR(80001127),
//----------------WMS异常码 end-------------------/
//----------------Invoice异常码 begin-------------------/
ERP_INVOICE_SUCCESS(13001000),
ERP_INVOICE_BO_PARAMS_INVALID(13001002),
ERP_INVOICE_CALL_ERROR(13001003),
ERP_INVOICE_ORDER_EMPTY(13001004),
ERP_INVOICE_MQ_FAILED(13001005),
ERP_INVOICE_RETURN_GOODS_UNSTORE(13001006),
ERP_INVOICE_RED_INVOICE_HAD_ISSUED(13001007),
ERP_INVOICE_RETURNED_GOODS_NUM_ERROR(13001008),
ERP_INVOICE_GOODSLIST_NULL(13001009),
ERP_INVOICE_PHONE_ILLEGAL(13001010),
ERP_INVOICE_LASTBLUEINVOICE_IS_NULL(13001011),
//----------------Invoice异常码 end-------------------/
//----------------Printer异常码 begin-------------------/
ERP_PRINTER_REQUEST_CONTENT_EMPTY(13010000),
ERP_PRINTER_REQUEST_PRINTERNO_EMPTY(13010001),
ERP_PRINTER_REQUEST_PRINTERNO_INVALID(13010002),
//----------------Printer异常码 end-------------------/
//----------------customerservice异常码 begin-------------------/
ERP_CS_PROFILE_ACCOUNT_ISNOT_EXIST(25001003),
ERP_CS_PROFILE_ACCOUNT_HAS_BEEN_BOUND(25001004),
ERP_CS_PROFILE_ACCOUNT_HAS_NOT_BEEN_BOUND(25001005),
ERP_CS_SETTING_HAS_BEEN_EXIST(25001006),
ERP_CS_SETTING_IS_NULL(25001007),
ERP_CS_SETTING_ENTERPRISE_TERMINAL_PARAMS_NULL(25001008),
ERP_CS_SETTING_WINDOWTITLE_TOO_LONG(25001009),
ERP_CS_SETTING_PCADLINK_TOO_LONG(25001010),
ERP_CS_SETTING_USERQUEUETIPS_TOO_LONG(25001011),
ERP_CS_SETTING_RECEIVETIPS_TOO_LONG(25001012),
ERP_CS_SETTING_OFFLINETIPS_TOO_LONG(25001013),
ERP_CS_SETTING_BREAKCOUNTDOWNTIPS_TOO_LONG(25001014),
ERP_CS_SETTING_BREAKCOUNTDOWNTIME_TOO_LONG(25001015),
ERP_CS_SETTING_BREAKTIME_TOO_LONG(25001016),
ERP_CS_SETTING_BREAKTIPS_TOO_LONG(25001017),
ERP_CS_SETTING_AUTOMATON_TERMINAL_PARAMS_NULL(25001018),
ERP_CS_ROLE_UNDEFINED(25001019),
ERP_CS_SETTING_ILLEGAL_DELETE(25001020),
//----------------customerservice异常码 end-------------------/
//----------------Ticket异常码 begin-------------------/
ERP_TICKET_VALIDATE_SUCCEED(12001000),
ERP_TICKET_VALIDATE_FAIL(12001001),
ERP_TICKET_VALIDATE_PARAM_ERROR(12001002),
ERP_TICKET_BEEN_USED(12001003),
ERP_TICKET_SHOW_UNFINDABLE(12001004),
ERP_TICKET_INVALIDATE(12001005),
ERP_TICKET_FAIL_UPDATE(12001006),
ERP_TICKET_TYPE_ERROR(12001007),
//----------------Ticket异常码 end-------------------/
//----------------全球购异常码 begin---------------------/
GLOBALBUY_ADDRESS_UID_NULL(16001001),
GLOBALBUY_ADDRESS_USERNAME_NULL(16001002),
GLOBALBUY_ADDRESS_MOBILE_INVALID(16001003),
GLOBALBUY_ADDRESS_ADDRESS_NULL(16001004),
GLOBALBUY_ADDRESS_IDCARD_INVALID(16001005),
//----------------全球购异常码 end-----------------------/
//sso异常码
//系统提示
SYSTEM(500),
MISSING_PARAMETER(500001),
ERROR_PARAMETER(500002),
//用户相关提示
USER_EXIST(50100),
USER_NOT_EXIST(50101),
USER_DISABLED(50102),
USER_NO_LOGIN(50103),
//密码相关提示
PWD_ERROR(50200),
PWD_FORMAT(50201),
//账号相关提示
ACCOUNT_FORMAT(50300),
ACCOUNT_TYPE(50301),
ACCOUNT_SET(50302),
ACCOUNT_ONLY_ONE(50303),
ACCOUNT_EXIST(50304),
//用户资料
USERINFO_SET(50400);
//################################################## ERP END ##############################
private final int code;
private String message;
//可选,映射到gateway的错误码
private String gwInfo;
ServiceError(int code) {
this.code = code;
}
@Override
public int getCode() {
return code;
}
/**
* 获取yml中定义的错误信息
*
* @return 错误信息
*/
public String getMessage() {
return message;
}
/**
* 获取错误信息,支持格式化。使用yml定义的模板,对参数进行 String.format
*
* @param params 格式化输入参数
* @return 格式化之后的错误消息
*/
public String getMessage(Object... params) {
return String.format(this.message, params);
}
@Override
public void setErrorContent(Map<String, Object> content) {
this.message = (String) content.get("message");
this.gwInfo = (String) content.get("gwError");
}
/**
* 获取映射的Gateway错误.
* 1. 如果配置了gw_info, 则直接映射为gw_info中的code和message
* 2. 如果没有配置gw_info, 直接返回service error 中定义的东西
*
* @return Getaway错误
*/
public Pair<Integer, String> getMappingGatewayError() {
Pair<Integer, String> gwError;
if (StringUtils.isEmpty(this.gwInfo)) {
gwError = Pair.of(GatewayError.DEFAULT_ERROR_CODE, GatewayError.DEFAULT_ERROR_MSG);
} else {
gwError = this.getGwErrorByMappingInfo();
}
return gwError;
}
private Pair<Integer, String> getGwErrorByMappingInfo() {
String[] codeMessage = this.gwInfo.split(":", 2);
int gwCode = Integer.parseInt(codeMessage[0]);
String gwMsg = codeMessage[1];
//如果gwInfo只配置了code,则需要去找message
if (StringUtils.isEmpty(gwMsg)) {
GatewayError error = GatewayError.getGatewayErrorByCode(gwCode);
if (error != null) {
gwMsg = error.getMessage();
} else { //默认的错误
gwMsg = GatewayError.DEFAULT_ERROR_MSG;
}
}
return Pair.of(gwCode, gwMsg);
}
/**
* 根据code 获取 error
*
* @param code
* @return
*/
public static ServiceError getServiceErrorByCode(int code) {
for (ServiceError error : values()) {
if (error.getCode() == code) {
return error;
}
}
return null;
}
}
... ...
package com.yoho.error.event;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.springframework.context.ApplicationEvent;
/**
*
* 通用的事件
*
* Created by chunhua.zhang@yoho.cn on 2016/2/3.
*/
public class CommonEvent extends ApplicationEvent {
/**
* @Fields serialVersionUID
*/
private static final long serialVersionUID = 2840308379764797160L;
// 事件名称,线程名称
protected final String name;
/**
* Create a new ApplicationEvent.
*
* @param name
* : 事件的名称
*/
public CommonEvent(String name) {
super(name);
this.name = name;
}
@Override
public String toString() {
return ReflectionToStringBuilder.toString(this);
}
public String getName() {
return name;
}
}
... ...
package com.yoho.error.event;
/**
* 数据库操作的事件
* Created by chunhua.zhang@yoho.cn on 2016/2/19.
*/
public class DatabaseAccessEvent extends CommonEvent {
/**
* @Fields serialVersionUID
*/
private static final long serialVersionUID = -2863457811659066198L;
private final Throwable throwable;
private final long cost;
private final String datasource;
private final String statement;
//服务的名称
private String serviceName= "UNKNOWN";
//最原始的服务名称,来自gateway
private String srcServiceName = "UNKNOWN";
/**
* Create a new ApplicationEvent.
*
* @param name : dao name : 例如: com.yoho.IProductDAO
* @param statement: 接口名称,例如 getAll
* @param throwable: 数据库操作的异常, 可能为null
* @param cost: 数据库操作的延迟
* @param datasource: 数据库名称
*
*/
public DatabaseAccessEvent(String name, String statement, Throwable throwable, long cost, String datasource) {
super(name);
this.statement = statement;
this.throwable = throwable;
this.cost = cost;
this.datasource = datasource;
}
/**
* 兼容之前的方法。
* @return args
*/
@Deprecated
public String getArgs(){
return this.datasource;
}
public Throwable getThrowable() {
return throwable;
}
public long getCost() {
return cost;
}
public String getDatasource() {
return datasource;
}
public String getStatement() {
return statement;
}
public String getServiceName() {
return serviceName;
}
public void setServiceName(String serviceName) {
this.serviceName = serviceName;
}
public String getSrcServiceName() {
return srcServiceName;
}
public void setSrcServiceName(String srcServiceName) {
this.srcServiceName = srcServiceName;
}
}
... ...
package com.yoho.error.event;
import java.util.Map;
/**
* Gateway Access 事件
* Created by chunhua.zhang@yoho.cn on 2016/2/3.
*/
public class GatewayAccessEvent extends CommonEvent {
/**
* @Fields serialVersionUID
*/
private static final long serialVersionUID = 5636937696455359734L;
//返回的响应码
private final int statusCode;
//时间
private final long cost;
//请求参数
private final Map<String, Object> requestParams;
//错误的异常栈
private String stack;
/**
* gateway 访问事件
* @param url URL或者method
* @param statusCode 状态码
* @param cost 延时
* @param requestParams http请求参数
*/
public GatewayAccessEvent(String url, int statusCode, long cost, Map<String, Object> requestParams) {
super(url);
this.statusCode = statusCode;
this.cost = cost;
this.requestParams = requestParams;
}
public int getStatusCode() {
return statusCode;
}
public long getCost() {
return cost;
}
public Map<String, Object> getRequestParams() {
return requestParams;
}
public String getStack() {
return stack;
}
public void setStack(String stack) {
this.stack = stack;
}
}
... ...
package com.yoho.error.event;
/**
* Gateway cache 命中统计
*
* Created by chunhua.zhang@yoho.cn on 2016/2/2.
*/
public class GatewayCacheEvent extends CommonEvent {
/**
* @Fields serialVersionUID
*/
private static final long serialVersionUID = -6095963872667322633L;
private final String key;
private final String status;
private final Throwable exception;
/**
* Create a new ApplicationEvent.
* @param methodName gateway方法
* @param key cache key
* @param status 命中状态
* @param exception 异常
*/
public GatewayCacheEvent(String methodName, String key, String status, Throwable exception) {
super(methodName);
this.key = key;
this.status = status;
this.exception = exception;
}
public String getKey() {
return key;
}
public String getStatus() {
return status;
}
public Throwable getException() {
return exception;
}
}
... ...
package com.yoho.error.event;
import java.util.HashMap;
import java.util.Map;
/**
* 日志事件
* Created by chunhua.zhang@yoho.cn on 2016/2/19.
*/
public class LogEvent extends CommonEvent {
/**
* @Fields serialVersionUID
*/
private static final long serialVersionUID = 620565801839108835L;
/**
* builder
*/
public static class Builder{
private LogEvent event;
/**
* 事件的名称,例如 "login", "register", 类似数据库的表名字
* @param name 事件的名称
*/
public Builder (String name){
event = new LogEvent(name);
}
/**
* 添加一个事件参数,不会索引key
* @param key key
* @param value value
* @return 事件的参数
*/
public Builder addArg(String key, Object value){
event.args.put(key, value);
return this;
}
/**
* 添加一个事件tags,会索引key
* @param key key
* @param value value
* @return 事件的tags
*/
public Builder addTag(String key, Object value){
if(value != null) {
event.tags.put(key, value);
}
return this;
}
/**
* 事件属于哪个serial,默认是“logs"
* @param catalog 事件的类别,例如”users“, ”messages"
* @return this
*/
public Builder catalog(String catalog){
event.catelog = catalog;
return this;
}
/**
* 构造一个event
* @return event
*/
public LogEvent build(){
return this.event;
}
}
private final Map<String, Object> tags = new HashMap<>();
private final Map<String, Object> args = new HashMap<>();
private String catelog;
/**
* Create a new ApplicationEvent.
*
* @param name : 事件的名称
*
*/
private LogEvent(String name) {
super(name);
this.catelog = "yh_logs";
}
public Map<String, Object> getTags() {
return tags;
}
public Map<String, Object> getArgs() {
return args;
}
public String getCatelog() {
return catelog;
}
}
... ...
package com.yoho.error.event;
import com.alibaba.fastjson.JSONObject;
/**
* 消息中心事件
*
* @author hugufei
*/
public class MessageCenterEvent extends CommonEvent {
private static final long serialVersionUID = -7033940407683264120L;
private String sendScene;// 场景
private String sendSceneKey;// 场景key
private JSONObject params;// 关键参数,需要和消息中心约定参数格式【如订单已发货场景中的订单号】
private String uid;// uid
public MessageCenterEvent(String sendScene, String sendSceneKey, JSONObject params, String uid) {
super(sendScene);
this.sendScene = sendScene;
this.sendSceneKey = sendSceneKey;
this.params = params;
this.uid = uid;
}
public String getSendScene() {
return sendScene;
}
public void setSendScene(String sendScene) {
this.sendScene = sendScene;
}
public String getSendSceneKey() {
return sendSceneKey;
}
public void setSendSceneKey(String sendSceneKey) {
this.sendSceneKey = sendSceneKey;
}
public String getUid() {
return uid;
}
public void setUid(String uid) {
this.uid = uid;
}
public JSONObject getParams() {
return params;
}
public void setParams(JSONObject params) {
this.params = params;
}
}
... ...
package com.yoho.error.event;
/**
* 支付事件: 支持支付宝和银联支付
*
* Created by chunhua.zhang@yoho.cn on 2016/2/19.
*/
public class PaymentEvent extends CommonEvent {
/**
* @Fields serialVersionUID
*/
private static final long serialVersionUID = 1519723141207084976L;
private final String payType;
private final String out_trade_no;
private final String trade_no;
private final String total_fee;
private final String trade_status;
private String status;
/**
* Create a new ApplicationEvent.
* @param payType 支付类型: alipay or unionpay
* @param out_trade_no 订单号
* @param trade_no 平台相关的交易号
* @param total_fee 总金额
* @param trade_status 处理状态
*
*/
public PaymentEvent(String payType, String out_trade_no, String trade_no, String total_fee, String trade_status) {
super("payment");
this.out_trade_no = out_trade_no;
this.trade_no = trade_no;
this.total_fee = total_fee;
this.payType = payType;
this.trade_status = trade_status;
this.status = "INIT";
}
public void setStatus(String status) {
this.status = status;
}
public String getPayType() {
return payType;
}
public String getOut_trade_no() {
return out_trade_no;
}
public String getTrade_no() {
return trade_no;
}
public String getTotal_fee() {
return total_fee;
}
public String getTrade_status() {
return trade_status;
}
public String getStatus() {
return status;
}
}
... ...
package com.yoho.error.event;
/**
* 推送事件
*
* @author hugufei
*
*/
public class PushEvent extends CommonEvent {
private static final long serialVersionUID = 5805800371910913724L;
private String project;// 项目名称
private String type;// 事件类型
private String taskId;// 任务id
private String content;// 上报的内容
private String paramStr;// 具体参数
public PushEvent(String name, String project, String type, String taskId, String content, String paramStr) {
super(name);
this.project = project;
this.type = type;
this.taskId = taskId;
this.content = content;
this.paramStr = paramStr;
}
public void setProject(String project) {
this.project = project;
}
public void setType(String type) {
this.type = type;
}
public void setTaskId(String taskId) {
this.taskId = taskId;
}
public void setParamStr(String paramStr) {
this.paramStr = paramStr;
}
public String getProject() {
return project;
}
public String getType() {
return type;
}
public String getTaskId() {
return taskId;
}
public String getParamStr() {
return paramStr;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
}
... ...
package com.yoho.error.event;
import java.util.Map;
/**
* rabbitmq 发送事件
*
* Created by chunhua.zhang@yoho.cn on 2016/2/2.
*/
public class RabbitmqSentEvent extends CommonEvent {
/**
* @Fields serialVersionUID
*/
private static final long serialVersionUID = -7120188904547178276L;
private final Object message;
private final Map<String, Object> pros;
/**
* 服务调用事件
*/
public RabbitmqSentEvent(String topic, Object message, Map<String, Object> pros) {
super(topic);
this.message = message;
this.pros = pros;
}
public Object getMessage() {
return message;
}
public Map<String, Object> getPros() {
return pros;
}
}
... ...
package com.yoho.error.event;
/**
* 推送事件
*
* @author hugufei
*
*/
public class RegisterEvent extends CommonEvent {
private static final long serialVersionUID = 5805800371910913724L;
private String phone;// 手机号
private String type;// 来源
public RegisterEvent(String name, String phone, String type) {
super(name);
this.phone = phone;
this.type = type;
}
public static long getSerialVersionUID() {
return serialVersionUID;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
}
... ...
package com.yoho.error.event;
/**
* 搜索事件
* @author gemingdan
*
*/
public class SearchEvent extends CommonEvent {
/**
*
*/
private static final long serialVersionUID = 2429826704229980752L;
private final String functionName;
private final String moudleName;
private final String type;
private final Throwable exception;
private final String paramStr;
public SearchEvent(String name,String functionName,String moudleName,String type,Throwable exception,String paramStr) {
super(name);
// TODO Auto-generated constructor stub
this.functionName = functionName;
this.moudleName = moudleName;
this.type = type;
this.exception = exception;
this.paramStr = paramStr;
}
public String getFunctionName() {
return functionName;
}
public String getMoudleName() {
return moudleName;
}
public String getType() {
return type;
}
public Throwable getException() {
return exception;
}
public String getParamStr() {
return paramStr;
}
}
... ...
package com.yoho.error.event;
public class SearchLogsEvent extends CommonEvent {
/**
*
*/
private static final long serialVersionUID = 475826348138220151L;
private final String moudleName;
private final String type;
private final String paramStr;
public SearchLogsEvent(String name,String moudleName,String type,String paramStr) {
super(name);
// TODO Auto-generated constructor stub
this.moudleName = moudleName;
this.type = type;
this.paramStr = paramStr;
}
public String getMoudleName() {
return moudleName;
}
public String getType() {
return type;
}
public String getParamStr() {
return paramStr;
}
}
... ...
package com.yoho.error.event;
/**
* 服务提供的restful接口访问事件
*
* Created by chunhua.zhang@yoho.cn on 2016/2/2.
*/
public class ServiceAccessEvent extends CommonEvent {
/**
* @Fields serialVersionUID
*/
private static final long serialVersionUID = 2370305262095540320L;
private final long cost;
private final long response_code;
private final String stack;
//来源于gateway的哪个接口?
private String srcService;
/**
* Create a new ApplicationEvent.
*
* @param url : 服务提供的URL
* @param cost: http服务响应时间
* @param response_code: 响应吗
* @param stack: 如果时间超过500ms,调用耗用时间堆栈
*/
public ServiceAccessEvent(String url, long cost, long response_code, String stack) {
super(url);
this.cost = cost;
this.response_code = response_code;
this.stack = stack;
}
public long getCost() {
return cost;
}
public long getResponse_code() {
return response_code;
}
public String getStack() {
return stack;
}
public void setSrcService(String srcService) {
this.srcService = srcService;
}
public String getSrcService() {
return srcService;
}
}
... ...
package com.yoho.error.event;
/**
* 服务调用事件
*
* Created by chunhua.zhang@yoho.cn on 2016/2/2.
*/
public class ServiceCallEvent extends CommonEvent {
/**
* @Fields serialVersionUID
*/
private static final long serialVersionUID = 6769811962872763165L;
/**
* 请求url
*/
private final String path;
/**
* gateway的method,比如app.search.li
*/
private final String callSource;
//异常
private final Throwable exception;
//耗时
private long cost;
/**
* 服务调用事件
* @param name : 服务名称
* @param path: 服务地址
* @param callSource: 调用来源,对gateway调用服务有值
* @param exception: 异常信息
*/
public ServiceCallEvent(String name, String path, String callSource, Throwable exception) {
this(name, path, callSource, exception, 0);
}
/**
* 服务调用事件
* @param name : 服务名称
* @param path: 服务地址
* @param callSource: 调用来源,对gateway调用服务有值
* @param exception: 异常信息
*/
public ServiceCallEvent(String name, String path, String callSource, Throwable exception, long cost) {
super(name);
this.path = path;
this.callSource = callSource;
this.exception = exception;
this.cost = cost;
}
public String getPath() {
return path;
}
public Throwable getException() {
return exception;
}
public String getCallSource() {
return callSource;
}
public long getCost() {
return cost;
}
public void setCost(long cost) {
this.cost = cost;
}
}
... ...
package com.yoho.error.event;
/**
* 服务模块,对外提供http服务,出现异常的事件
* <p/>
* Created by chunhua.zhang@yoho.cn on 2016/2/2.
*/
public class ServiceServerExceptionEvent extends CommonEvent {
/**
* @Fields serialVersionUID
*/
private static final long serialVersionUID = -6906935866415083159L;
/**
* RequestURI
*/
private final String serviceName;
private final Throwable exception;
/**
* Create a new ApplicationEvent.
*
* @param name : requestURI
* @param exception: 异常
*/
public ServiceServerExceptionEvent(String name, Throwable exception) {
super(name);
this.serviceName = name;
this.exception = exception;
}
public String getServiceName() {
return serviceName;
}
public Throwable getException() {
return exception;
}
}
... ...
package com.yoho.error.event;
import java.util.Map;
/**
*
* @ClassName: WebServiceAccessEvent
* @Description: webservice事件
* @author gaoren.huang
* @email gaoren.huang@yoho.cn
* @date 2016年11月3日 下午4:09:26
*
*/
public class WebServiceAccessEvent extends CommonEvent {
/**
* @Fields serialVersionUID
*/
private static final long serialVersionUID = 5636937696455359734L;
//返回的响应码
private final int statusCode;
//时间
private final long cost;
//请求参数
private final Map<String, Object> requestParams;
//错误的异常栈
private String stack;
/**
* webservice 访问事件
* @param url URL或者method
* @param statusCode 状态码
* @param cost 延时
* @param requestParams http请求参数
*/
public WebServiceAccessEvent(String url, int statusCode, long cost, Map<String, Object> requestParams) {
super(url);
this.statusCode = statusCode;
this.cost = cost;
this.requestParams = requestParams;
}
public int getStatusCode() {
return statusCode;
}
public long getCost() {
return cost;
}
public Map<String, Object> getRequestParams() {
return requestParams;
}
public String getStack() {
return stack;
}
public void setStack(String stack) {
this.stack = stack;
}
}
... ...
package com.yoho.error.exception;
import com.yoho.error.ServiceError;
/**
* 服务调用的异常
* Created by chunhua.zhang@yoho.cn on 2015/11/18.
*/
public class ServiceException extends RuntimeException{
/**
* @Fields serialVersionUID
*/
private static final long serialVersionUID = -3434467003214522941L;
//服务错误码
private final ServiceError serviceError;
private final int code;
private final String errorMessage;
private String[] params;
//是否输出堆栈
private boolean printStack = false;
/**
* 服务异常。建议用 {@link #ServiceException(ServiceError)} 来构造
* @param code 错误码
* @param message 错误消息
*/
public ServiceException(int code, String message) {
this(code,message,false);
}
public ServiceException(int code, String message, boolean printStack) {
this.code = code;
this.errorMessage = message;
this.printStack = printStack;
ServiceError found = ServiceError.getServiceErrorByCode(code);
this.serviceError = found == null ? ServiceError.OTHER_ERROR : found;
}
/**
* 设置params。
* @param params
*/
public void setParams(String ... params){
this.params = params;
}
public String[] getParams() {
return params;
}
/**
* 服务异常
* @param serviceError 服务异常
*/
public ServiceException(ServiceError serviceError) {
this(serviceError,false);
}
/**
* 服务异常
* @param serviceError 服务异常
*/
public ServiceException(ServiceError serviceError, boolean printStack) {
this.serviceError = serviceError;
this.code = serviceError.getCode();
this.errorMessage = serviceError.getMessage();
this.printStack = printStack;
}
/**
* 服务异常
* @param serviceError 服务异常
* @param cause 服务异常
*/
public ServiceException(ServiceError serviceError, Throwable cause) {
super(serviceError.getMessage(), cause);
this.serviceError = serviceError;
this.code = serviceError.getCode();
this.errorMessage = serviceError.getMessage();
}
/**
* 服务异常
*
* @param serviceError 服务异常
*/
public ServiceException(ServiceError serviceError, boolean printStack, Object... params) {
this.serviceError = serviceError;
this.code = serviceError.getCode();
this.errorMessage = serviceError.getMessage(params);
this.printStack = printStack;
}
/**
* 如果使用ServiceException(int code, String message)构造,可能会找不到ServiceError
* @return
*/
public ServiceError getServiceError() {
return serviceError;
}
public int getCode() {
return code;
}
@Override
public String getMessage() {
return "[" + this.code + ":" + this.errorMessage + "]";
}
public String getErrorMessage() {
return errorMessage;
}
public boolean isPrintStack(){
return this.printStack;
}
}
... ...
package com.yoho.error.exception.handler;
import com.alibaba.fastjson.support.spring.FastJsonJsonView;
import com.yoho.error.event.ServiceServerExceptionEvent;
import com.yoho.error.exception.ServiceException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.context.ApplicationEventPublisherAware;
import org.springframework.web.servlet.HandlerExceptionResolver;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.Map;
/**
*
* 服务的全局异常处理
* spring mvc server 通用的异常处理。 2种响应:
* 1. 返回200,并且用json作为消息体,并且设置消息头(方便resttemplate处理)
* 2. 返回500,设置消息头
* Created by chunhua.zhang@yoho.cn on 2015/11/19.
*/
public class ServiceGlobalExceptionHandler implements HandlerExceptionResolver, ApplicationEventPublisherAware {
private final Logger logger = LoggerFactory.getLogger(getClass());
private ApplicationEventPublisher publisher;
private static final String SPLIT_ADD = "%%";
//如果服务异常,需要把异常信息加入到头中
public static String HEADER_ERROR_CODE = "x-yh-service-error-code";
public static String HEADER_ERROR_MESSAGE = "x-yh-service-error-message";
public static String HEADER_ERROR_ADD = "x-yh-service-error-addon";
@Override
public ModelAndView resolveException(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object handler, Exception exception) {
//publish event
publisher.publishEvent(new ServiceServerExceptionEvent(httpServletRequest.getRequestURI(), exception));
//如果不是服务异常,直接返回500,并且打印异常
if (!(exception instanceof ServiceException)) {
logger.error("unknown exception happened at:{}", httpServletRequest.getRequestURI());
logger.error("unknown exception is ", exception);
httpServletResponse.setStatus(500);
httpServletResponse.addHeader(HEADER_ERROR_MESSAGE, exception.getMessage());
return new ModelAndView();
}
//处理服务异常。 需要添加异常信息到头中,并且返回json
ServiceException se = (ServiceException) exception;
int code = se.getCode();
String message = se.getErrorMessage();
//add header
httpServletResponse.addHeader(HEADER_ERROR_CODE, String.valueOf(code));
httpServletResponse.addHeader(HEADER_ERROR_MESSAGE, message);
String params[] = se.getParams(); //添加其他的参数,用于重组ServiceException
if (params != null) {
try {
httpServletResponse.addHeader(HEADER_ERROR_ADD, URLEncoder.encode(String.join(SPLIT_ADD, params), "UTF-8"));
} catch (UnsupportedEncodingException e) {
logger.error("encode exception.", e);
}
}
ModelAndView mv = getErrorJsonView(code, message);
return mv;
}
public static String[] getParams(String headerValue) {
return headerValue.split(SPLIT_ADD);
}
/**
* 使用FastJson提供的FastJsonJsonView视图返回,不需要捕获异常
*/
public static ModelAndView getErrorJsonView(int code, String message) {
ModelAndView modelAndView = new ModelAndView();
FastJsonJsonView jsonView = new FastJsonJsonView();
Map<String, Object> errorInfoMap = new HashMap<>();
errorInfoMap.put("code", code);
errorInfoMap.put("message", message);
jsonView.setAttributesMap(errorInfoMap);
modelAndView.setView(jsonView);
return modelAndView;
}
@Override
public void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) {
this.publisher = applicationEventPublisher;
}
}
... ...
package com.yoho.error.internel;
import com.yoho.error.ErrorCode;
import com.yoho.error.GatewayError;
import com.yoho.error.ServiceError;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Map;
/**
* 读取配置文件,并且设置枚举类型。 注意配置文件 gateway-error.yml 使用UTF-8格式
* <p>
* Created by chang@yoho.cn on 2015/11/3.
*/
public class ConfigLoader {
private final Logger logger = LoggerFactory.getLogger(ConfigLoader.class);
private Map<String, Object> serviceErrorMap;
private Map<String, Object> gatewayErrorMap;
/**
* 初始化error code. 由spring 初始化
*/
public void init() {
logger.info("start to init error code info");
for (ServiceError service_error : ServiceError.values()) {
this.initErrorContent(service_error, this.serviceErrorMap);
}
for (GatewayError gateway_error : GatewayError.values()) {
this.initErrorContent(gateway_error, this.gatewayErrorMap);
}
logger.info("init error code success. gateway error size {}, service error size {}",
this.gatewayErrorMap.size(), this.serviceErrorMap.size());
}
@SuppressWarnings("unchecked")
private void initErrorContent(ErrorCode errorCode, Map<String, Object> map) {
int code = errorCode.getCode();
String key = "[" + code + "]"; //yml读取的map,key为[422]
Object messageObj = map.get(key);
if (messageObj != null) {
Map<String, Object> errorInfo = (Map<String, Object>) messageObj;
errorCode.setErrorContent(errorInfo);
}
}
public void setServiceErrorMap(Map<String, Object> serviceErrorMap) {
this.serviceErrorMap = serviceErrorMap;
}
public void setGatewayErrorMap(Map<String, Object> gatewayErrorMap) {
this.gatewayErrorMap = gatewayErrorMap;
}
}
... ...
package com.yoho.error.utils;
import java.net.DatagramSocket;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
/**
* 获取本地IP地址
* Created by chunhua.zhang@yoho.cn on 2016/2/1.
*/
public class LocalhostIpFetcher {
public static String fetchLocalIP() {
String localIP = "127.0.0.1";
DatagramSocket sock = null;
try {
SocketAddress socket_addr = new InetSocketAddress( InetAddress.getByName("1.2.3.4"), 1);
sock = new DatagramSocket();
sock.connect(socket_addr);
localIP = sock.getLocalAddress().getHostAddress();
} catch (Exception e) {
e.printStackTrace();
}
finally {
sock.disconnect();
sock.close();
sock = null;
}
return localIP;
}
}
... ...
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<!-- gateway 错误码 -->
<bean id="gatewayErrorMap" class="org.springframework.beans.factory.config.YamlMapFactoryBean">
<property name="resources">
<list>
<value>classpath:gateway-error.yml</value>
<value>classpath:erp/erp-gateway-error.yml</value>
</list>
</property>
</bean>
<!-- 服务内部 错误码 -->
<bean id="serviceErrorMap" class="org.springframework.beans.factory.config.YamlMapFactoryBean">
<property name="resources">
<list>
<value>classpath:service-error.yml</value>
<value>classpath:service-error-common.yml</value>
<value>classpath:service-error-product.yml</value>
<value>classpath:service-error-resources.yml</value>
<value>classpath:service-error-orders.yml</value>
<value>classpath:service-error-sns.yml</value>
<value>classpath:service-error-user.yml</value>
<value>classpath:service-error-message.yml</value>
<value>classpath:service-error-promotion.yml</value>
<value>classpath:service-error-shopping.yml</value>
<value>classpath:service-error-union.yml</value>
<value>classpath:service-error-shops.yml</value>
<value>classpath:service-error-social.yml</value>
<value>classpath:service-error-wechat.yml</value>
<value>classpath:service-error-globalbuy.yml</value>
<!-- ERP BEGIN -->
<value>classpath:erp/erp-service-error.yml</value>
<value>classpath:erp/erp-service-error-bms.yml</value>
<value>classpath:erp/erp-service-error-dashboard.yml</value>
<value>classpath:erp/erp-service-error-fms.yml</value>
<value>classpath:erp/erp-service-error-webService.yml</value>
<value>classpath:erp/erp-service-error-job.yml</value>
<value>classpath:erp/erp-service-error-order.yml</value>
<value>classpath:erp/erp-service-error-pop.yml</value>
<value>classpath:erp/erp-service-error-stock.yml</value>
<value>classpath:erp/erp-service-error-wms.yml</value>
<value>classpath:erp/erp-service-error-tickets.yml</value>
<value>classpath:erp/erp-service-error-invoice.yml</value>
<value>classpath:erp/erp-service-error-ams.yml</value>
<value>classpath:erp/erp-service-error-printer.yml</value>
<value>classpath:erp/erp-service-error-cs.yml</value>
<!-- ERP END -->
</list>
</property>
</bean>
<bean id="configLoader" class="com.yoho.error.internel.ConfigLoader" init-method="init">
<property name="gatewayErrorMap" ref="gatewayErrorMap"/>
<property name="serviceErrorMap" ref="serviceErrorMap" />
</bean>
</beans>
\ No newline at end of file
... ...
200:
message: "成功"
400:
message: "不接受此平台"
998:
message: 操作失败
999:
message: Service {0} is not available!
1000:
message: "ID不能为空或者小于等于0"
... ...
# ams code 范围 1100xxxx
11001000:
message: "succeed"
gwError: 200:成功
11001001:
message: "fail"
gwError: 500:失败
11001002:
message: "smsBo param is not valid"
gwError: 402:无有效的参数
11001003:
message: "account doesn't exists"
gwError: 201:账号不存在
11001004:
message: "account has expired"
gwError: 201:账号已过期
11001005:
message: "account has closed"
gwError: 201:账号已关闭
11001006:
message: "account not authorized"
gwError: 201:无权登陆此站点
11001007:
message: "password not correct"
gwError: 407:密码错误!
11001008:
message: "role doesn't exists or expired or closed"
gwError: 201:角色不存在、已过期或已关闭
11001009:
message: "account has existed"
gwError: 201:账号已存在
11001010:
message: "synchronize ERP profile fail"
gwError: 501:同步ERP账号失败
11001011:
message: "record is not exist"
gwError: 504:记录不存在
11001012:
message: "account has entered black list"
gwError: 201:黑名单账户无法登录
11001013:
message: "no legal account pids"
gwError: 504:无存在的pids
... ...
# bms code 范围 1000xxxx
10001000:
message: "succeed"
gwError: 200:成功
10001001:
message: "fail"
gwError: 500:失败
10001002:
message: "smsBo param is not valid"
gwError: 402:无有效的参数
10001003:
message: "account doesn't exists"
gwError: 201:账号不存在
10001004:
message: "account has expired"
gwError: 201:账号已过期
10001005:
message: "account has closed"
gwError: 201:账号已关闭
10001006:
message: "account not authorized"
gwError: 201:无权登陆此站点
10001007:
message: "password not correct"
gwError: 407:密码错误!
10001008:
message: "role doesn't exists or expired or closed"
gwError: 201:角色不存在、已过期或已关闭
10001009:
message: "account has existed"
gwError: 201:账号已存在
10001010:
message: "synchronize ERP profile fail"
gwError: 501:同步ERP账号失败
10001011:
message: "record is not exist"
gwError: 504:记录不存在
10001012:
message: "param is not valid"
gwError: 402:无有效的参数
... ...
# cs code 范围 2500xxxx
25001000:
message: "succeed"
gwError: 200:成功
25001001:
message: "fail"
gwError: 500:"失败"
25001002:
message: "service id is null or 0"
gwError: 1000:"id is null or 0"
25001003:
message: "profile_account is not exist"
gwError: 402:填写的平台端账号不存在!
25001004:
message: "profile_account has been bound"
gwError: 402:填写的平台端账号已经被绑定!
25001005:
message: "profile_account has not been bound"
gwError: 402:填写的平台端账号还没被绑定客服账号!
25001006:
message: "customer_service_setting has been exist"
gwError: 402:插入的客服设置已经存在!
25001007:
message: "customer_service_setting is null"
gwError: 402:客服配置入参为空!
25001008:
message: "customer service enterprise setting params is null"
gwError: 402:客服企业端配置入参为空!
25001009:
message: "customer service setting window title is too long"
gwError: 402:客服配置窗口标题超出长度限制!
25001010:
message: "customer service setting pcAdLink is too long"
gwError: 402:客服配置pc广告位链接超出长度限制!
25001011:
message: "customer service setting userQueueTips is too long"
gwError: 402:客服配置用户队列提示超出长度限制!
25001012:
message: "customer service setting receiveTips is too long"
gwError: 402:客服配置客服接待提示超出长度限制!
25001013:
message: "customer service setting offlineTips is too long"
gwError: 402:客服配置客服离线提示超出长度限制!
25001014:
message: "customer service setting breakCountdownTips is too long"
gwError: 402:客服配置断线倒计时提示超出长度限制!
25001015:
message: "customer service setting breakCountdownTime is too long"
gwError: 402:客服配置断线倒计时时间超出长度限制!
25001016:
message: "customer service setting breakTime is too long"
gwError: 402:客服配置断线时间超出长度限制!
25001017:
message: "customer service setting breakTips is too long"
gwError: 402:客服配置断线提示超出长度限制!
25001018:
message: "customer service setting automation params is null"
gwError: 402:客服机器人端配置入参为空!
25001019:
message: "customer service role undefined"
gwError: 402:未定义的角色!
25001020:
message: "customer service setting illegal delete cause this is the last setting of this type"
gwError: 402:该记录是此类型最后一条设置,不能删除!
\ No newline at end of file
... ...
# dashboard code 范围 2000xxxx
20001000:
message: "succeed"
gwError: 200:成功
20001001:
message: "fail"
gwError: 500:"失败"
20001002:
message: "service id is null or 0"
gwError: 1000:"id is null or 0"
... ...
# fms code 范围 3000xxxx
30001000:
message: "succeed"
gwError: 200:成功
30001001:
message: "fail"
gwError: 500:失败
30001002:
message: "outInStorageBo is null"
gwError: 402:无有效的出入库记录
30001003:
message: "requisitionForm is null"
gwError: 402:无有效的到货记录
30001004:
message: "clauseSettlementBo is null"
gwError: 402:无有效的结算条款
30001005:
message: "agreementClauseBo is null"
gwError: 402:无有效的合同条款
30001006:
message: "baseProduct is null"
gwError: 402:无有效的基础产品库
30001007:
message: "sellType is not sale by proxy"
gwError: 400:销售类型不是代销
30001008:
message: "purchaseDiscount is null"
gwError: 400:固定折扣时获取折扣值为空
30001009:
message: "balance detail insert error"
gwError: 409:插入对账单明细错误
30001010:
message: "finance clearing update error"
gwError: 410:更新结算数据发生错误
30001011:
message: "payinfo insert duplicate key error"
gwError: 501:支付信息(pay_info)数据已经存在,不能重复插入
30001012:
message: "payinfo insert error"
gwError: 502:支付信息(pay_info)插入失败
30001013:
message: "payinfo insert invalid"
gwError: 503:支付信息(pay_info)插入失败,数据不完整
30001014:
message: "user_receivables insert duplicate key error"
gwError: 504:订单到款信息(user_receivables)数据已经存在,不能重复插入
30001015:
message: "user_receivables insert error"
gwError: 505:订单到款(user_receivables)插入失败
30001016:
message: "user_receivables insert invalid"
gwError: 506:订单到款(user_receivables)插入失败,数据不完整
30001017:
message: "user_receivables_split insert duplicate key error"
gwError: 507:父订单到款(user_receivables_split)数据已经存在,不能重复插入
30001018:
message: "user_receivables_split insert error"
gwError: 508:父订单到款(user_receivables_split)插入失败
30001019:
message: "user_receivables_split insert invalid"
gwError: 509:父订单到款(user_receivables_split)插入失败,数据不完整
30002000:
message: "installment_refund_notify insert invalid"
gwError: 509:退款通知(installment_refund_notify)插入失败
30002001:
message: "installment_refund_notify params error"
gwError: 509:退款通知(installment_refund_notify)参数错误
30002002:
message: "InstallmentCrfBillNotify object has existed"
gwError: 501:订单的打款记录已经存在
30002003:
message: "params incorrect"
gwError: 400:参数不正确
30002004:
message: "no installment repay plan record"
gwError: 510:无还款计划与传入订单编码和分期号对应
30002006:
message: "The return amount is greater than the order amount"
gwError: 511:失败,退款金额超过订单金额
30002007:
message: "The current status is not the pending audit"
gwError: 511:失败,当前状态不是待审核(已提交)
30002008:
message: "cost change is not existed"
gwError: 501:款信息不存在
30002009:
message: "cost change has audited"
gwError: 501:款信息已审核
30003000:
message: "no supplier invoice record!"
gwError: 601:未找到发票信息!
30003001:
message: "supplier invoice no enough amount!"
gwError: 602:发票余额不足!
30003002:
message: "no requisition invoice record!"
gwError: 603:未找到到票信息!
30003003:
message: "no requisition invoice list record!"
gwError: 604:未找到到票详细信息!
30003004:
message: "no supplier invoice record!"
gwError: 605:未找到发票信息!
30003005:
message: "ProRequisitionForm's brand and supplier doesn't match with the RequsisitionInvoice's!"
gwError: 606:供应商|品牌不匹配!
30003006:
message: "remain invoice amount of pro_requsition_form is not enough for applying!"
gwError: 607:请购单到票金额大于未到票余额!
30003007:
message: "net remain invoice amount error!"
gwError: 608:发票不含税金额误差大于0.1!
30003008:
message: "no requisition form goods record!"
gwError: 603:未找到到货单商品信息!
30003009:
message: "no pro requisition form goods record!"
gwError: 603:未找到请购单商品信息!
30003010:
message: "supplier invoice exsited, you must submit it before using it!"
gwError: 603:发票已存在,再次使用之前请提交!
30003011:
message: "no pro requisition form record!"
gwError: 603:未找到请购单记录!
30003012:
message: "you can't modify or delete requsition invoice!"
gwError: 603:到票已提交,不允许修改或者删除!
30003013:
message: "no available agreement!"
gwError: 603:未找到可用的合同!
30003014:
message: "no available agreement clauses!"
gwError: 603:未找到可用的合同条款!
30003015:
message: "reason is not empty!"
gwError: 501:驳回操作,驳回原因不能为空
30003016:
message: "requisitionpaymentworkflow is empty!"
gwError: 501:请款单ID无效,未查询到相应的请款工作流
30003017:
message: "no available agreement clauses!"
gwError: 501:请款单ID无效,未查询到相应的请款单
30003018:
message: "creator no permission!"
gwError: 502:角色ID无效,创建人无审核权限
30003019:
message: "current node status not check pending!"
gwError: 502:角色ID无效,获取到流程节点非待审核状态,可能重复审核或跳级审核!
30003020:
message: "pid is invalid!"
gwError: 503:用户ID无效,与当前流程节点记录的用记ID不匹配!
30003021:
message: "role id not found!"
gwError: 502:角色ID无效,流程节点未匹配到当前角色ID!
30003022:
message: "requisitionPayment amount greater than balanceAmount!"
gwError: 504:请款金额不能大于结余金额!
30003023:
message: "audit flag invalid!"
gwError: 505:审核操作标识无效!
30003024:
message: "pid not exist!"
gwError: 501:用户ID无效,未查询到相应的用户!
30003025:
message: "role id not matching pid!"
gwError: 501:用户ID无效或角色ID无效,用户ID与当前角色ID不匹配!
... ...
# invoice code 范围 1300xxxx
13001000:
message: "succeed"
gwError: 200:成功!
13001001:
message: "fail"
gwError: 500:失败
13001002:
message: "mqInvoiceBo parameters invalid"
gwError: 513:电子发票MQ数据无效
13001003:
message: "call server error"
gwError: 422:服务异常
13001004:
message: "order is null"
gwError: 513:订单不存在
13001005:
message: "MQ send failed"
gwError: 513:发MQ给商城失败
13001006:
message: "returned goods have not in storage"
gwError: 413:仍有退货商品未入库
13001007:
message: "red invoice had issued"
gwError: 513:该订单红票已开过
13001008:
message: "returned goods num error"
gwError: 513:该订单退货商品数大于订单所有商品数
13001009:
message: "goodsList is null"
gwError: 413:goodsList为空
13001010:
message: "phone is illegal"
gwError: 513:手机号不合法
13001011:
message: "last blue invoice is null"
gwError: 513:上一次蓝票的数据不能为空!
\ No newline at end of file
... ...
# job code 范围 4000xxxx
40001000:
message: "succeed"
gwError: 200:成功
40001001:
message: "fail"
gwError: 500:失败
\ No newline at end of file
... ...
# order code 范围 5000xxxx
50001000:
message: "succeed"
gwError: 200:成功
50001001:
message: "fail"
gwError: 500:失败
50001002:
message: "order of cash on delivery can't update delivery status"
gwError: 400:货到付款订单不能确认收货
50001003:
message: "order can't cancel or had canceled"
gwError: 400:该订单不能取消或者已经取消
50001004:
message: "can't find this order status"
gwError: 513:找不到该状态码
50001005:
message: "can't find this order"
gwError: 400:没有这个订单
50001006:
message: "can't find order code or status"
gwError: 513:订单号或状态为空
50001007:
message: "orderBo parameters invalid"
gwError: 513:订单到款数据无效
50001008:
message: "get parent order failed"
gwError: 404:获取父订单信息失败
50001009:
message: "no parent order"
gwError: 405:没有这个父订单
50001010:
message: "order compare amount with last order amount failed"
gwError: 406:订单支付金额和应付金额对比时出错
50001011:
message: "order update parent payment failed"
gwError: 407:更新父订单支付数据失败
50001012:
message: "update subOrders payinfo by parentOrderCode failed"
gwError: 408:根据父订单号修改子订单的支付信息失败
50001013:
message: "orderCode is not valid"
gwError: 409:orderCode不合法!
50001014:
message: "order is null or orderType is not valid"
gwError: 410:order不存在或orderType不合法!
50001120:
message: "param invalid"
gwError: 411:缺少字段或字段不合法
50001130:
message: "server error"
gwError: 510:Server异常
50001140:
message: "call server error"
gwError: 600:服务异常
50001219:
message: "parent order not exists"
gwError: 601:父订单不存在
50001150:
message: "data error"
gwError: 700:数据错误
50001201:
message: "validate success"
gwError: 202:验证成功
50001211:
message: "change source order not operate"
gwError: 211:换货订单不处理
50001212:
message: "last order amount invalid"
gwError: 411:实付订单金额无效
50001213:
message: "order param invalid"
gwError: 412:订单参数无效
50001214:
message: "orderCode invalid"
gwError: 420:订单号不正确,不存在此订单
50001215:
message: "set payment state faild"
gwError: 511设置支付状态失败
50001216:
message: "order already exists"
gwError: 711:此订单已存在
50001217:
message: "order not exists"
gwError: 712:此订单不存在
50001218:
message: "parent order already exists"
gwError: 713:父订单已存在
50001220:
message: "channels order already exists"
gwError: 715:此渠道订单已存在
50001221:
message: "parent order not payment"
gwError: 602:未接收到父订单到款数据,延迟处理子订单
50001222:
message: "child order goods invalid"
gwError: 717:子订单商品和父订单商品数据不一致
50001223:
message: "insert order coupons error"
gwError: 718:插入订单优惠券信息失败
50001224:
message: "insert order splitInfo error"
gwError: 719:插入订单拆单信息失败
50001225:
message: "insert parent orders error"
gwError: 720:插入父订单错误
50001226:
message: "insert orders error"
gwError: 721:订单入库错误
50001227:
message: "insert orders goods promo error"
gwError: 718:插入订单促销信息错误
50001228:
message: "this order has existed,and it is parent"
gwError: 722:该订单号已作为父订单号在订单表中存在
50001229:
message: "insert order goods error"
gwError: 723:插入订单商品失败
50001230:
message: "create order faild"
gwError: 511:创建订单失败
50001231:
message: "order goods is null"
gwError: 421:订单商品不能为空
50001232:
message: "insert UserReceivables error, invalidate bo"
gwError: 724:到款数据不完整,保存失败
50001233:
message: "insert UserReceivables error, invalidate bo"
gwError: 725:到款拆分数据不完整,保存失败
50001234:
message: "insert UserPayment error"
gwError: 726:取消订单,插入退款失败
50001235:
message: "cancel order failed"
gwError: 727:取消订单失败
50001236:
message: "cancel order refund failed"
gwError: 728:取消订单退款失败
50001237:
message: "invalid return order goods number"
gwError: 729:退货商品数量错误
50001238:
message: "calculate refund money failed"
gwError: 730:计算退款数据失败,可能是该商品已退,无法匹配退货商品
50001239:
message: "cannot match refund goods"
gwError: 731:该商品已退,无法匹配退货商品
50001240:
message: "insert pay_info failed"
gwError: 401:插入支付信息失败
50001241:
message: "insert user_receivables failed"
gwError: 402:插入用户到款信息失败
50001242:
message: "insert user_receivables_split failed"
gwError: 403:插入父订单用户到款信息失败
50001243:
message: "this is a cheat order"
gwError: 601:作弊订单
50001244:
message: "order status error"
gwError: 601:订单状态信息异常,不能插入到款信息
50001245:
message: "call server error"
gwError: 422:服务异常
50001246:
message: "insert order invoice service error"
gwError: 732:订单发票信息插入失败
50001247:
message: "order insert duplicate key error"
gwError: 501:订单相关数据已经存在,不能重复插入
50001248:
message: "instalment return order insert UserPayment error"
gwError: 736:退货,插入退款失败
50001249:
message: "instalment return CRF response is null"
gwError: 737:退货,信而富返回为空
50001250:
message: "instalment has been returned"
gwError: 738:已经成功退货
50001251:
message: "InstallmentRates is null"
gwError: 739:查询不到订单分期费率
50001252:
message: "Installment cancel order can't find"
gwError: 605:查不到此分期订单
50001253:
message: "instalment cancel CRF response is wrong"
gwError: 606:取消订单调用信而富接口返回结果不正确,请检查调用日志!
50001254:
message: "insert installment_rates error"
gwError: 514:插入分期利率数据失败
50001255:
message: "insert installment_repay_plan error"
gwError: 515:插入分期还款数据失败
50001256:
message: "installment_order_cancel successful!"
gwError: 200:分期订单取消操作成功!
50001257:
message: "installment_order_cancel failed!"
gwError: 601:分期订单取消操作失败!
50001258:
message: "invalid status code!"
gwError: 501:无效的订单状态码!
50001259:
message: "update order address invalid order code!"
gwError: 602:修改订单地址ordercode有误,未匹配到记录!
50001260:
message: "update order address invalid order status!"
gwError: 503:订单状态未匹配,无需修改订单地址信息!
50001261:
message: "update order address invalid order code!"
gwError: 200:更新订单地址信息完成!
50001262:
message: "save check_account_info fail!"
gwError: 500:保存对账信息失败!
50001263:
message: "stock error!"
gwError: 501:库存不足!
50001264:
message: "order type error!"
gwError: 502:订单类型错误!
50001265:
message: "You can not delete the user requested Return Goods!"
gwError: 602:该退货申请不是客服发起的,不能删除!
50001266:
message: "All the goods of the order already returned or exchanged.!"
gwError: 603:该订单所有商品已退货或已换货!
50001267:
message: "This refuse reason already used. You cannot delete it!"
gwError: 605:该拒绝原因已使用,不能删除!
50001268:
message: "update order status by sku can not match any order!"
gwError: 721:通过SKU未匹配到订单信息,无法更新订单状态!
50001269:
message: "emar user empty!"
gwError: 501:无此用户记录!
50001270:
message: "emar user key error!"
gwError: 502:用户key错误!
50001271:
message: "can't find compaignId or feedback!"
gwError: 503:compaignId|feedback缺失!
50001272:
message: "can't find any orders!"
gwError: 504:找不到任何订单!
50001273:
message: "property of order is lost !"
gwError: 505:属性缺失!
50001276:
message: "This goods cannot be returned or exchanged. For more information, you can contact the customer service!"
gwError: 606:该商品非质量问题不支持退换货,如有疑问,请联系在线客服。
50001277:
message: "can't find this order"
gwError: 600:没有这个订单
50001278:
message: "can't find mark order"
gwError: 600:sku记录太多,请分多次处理
\ No newline at end of file
... ...
# pop code 范围 6000xxxx
60001000:
message: "succeed"
gwError: 200:成功
60001001:
message: "fail"
gwError: 500:失败
60001002:
message: "invalid factory code"
gwError: 401:厂家编号无效
60001003:
message: "empty jit sku"
gwError: 402:无有效的JIT商品
60001004:
message: "empty purchase"
gwError: 401:未查询到采购单
60001005:
message: "empty purchase goods"
gwError: 402:未查询到采购单商品
60001006:
message: "empty brandid"
gwError: 401:未查询到对应的品牌ID
60001007:
message: "invalid brandname"
gwError: 402:无效的品牌名称
60001008:
message: "no out storage record between the time"
gwError: 407:在传入时间段内无出入库记录
60001009:
message: "no requisition form for the vendor"
gwError: 407:无到货单记录
60001010:
message: "no pro requisition form by condition"
gwError: 408:没有传入的采购单记录
60001011:
message: "input factory code don't associate with sku"
gwError: 409:传入的厂家编号无效
60001012:
message: "no pro requisition form goods"
gwError: 409:请购单下无商品记录
60001013:
message: "process saveDefectivenessRequisitionForm has exception"
gwError: 500:残次品入库异常
60001014:
message: "curretn supplier has no sale goods"
gwError: 201:无上架的商品
60001015:
message: "abnormal inventory data"
gwError: 501:库存数据异常
60001016:
message: "abnormal sku data"
gwError: 502:SkU数据异常
60001017:
message: "parameters illegal"
gwError: 201:参数错误
60001018:
message: "no pro requisition form"
gwError: 504:请购单不存在
60001019:
message: "pro requisition form has commited"
gwError: 501:请购单已提交
60001020:
message: "main pro requisition form has not commited"
gwError: 501:主请购单未提交
60001021:
message: "supply pro requisition form can't do this operation"
gwError: 501:补充请购单不能进行此操作
60001022:
message: "requisition form audit status error"
gwError: 501:当前状态不允许操作到货单
60001023:
message: "no goods"
gwError: 409:无商品或未设置商品数量
60001024:
message: "requisition form status is incorrect"
gwError: 501:到货单状态不允许进行款操作
60001025:
message: "pro requisition form is not commited or finished"
gwError: 501:请购单未提交或已完成
60001026:
message: "some supply pro_requisition_form is't committed"
gwError: 501:存在未提交的补充请购单
60001027:
message: "import nums can't greater than 1000"
gwError: 501:一次最多导入1000条
60001028:
message: "sell type doesn't belong to disitribution!"
gwError: 501:业务类型非经销!
60001029:
message: "sync vitual storage error!"
gwError: 库存同步失败
60001030:
message: "pro requisition form has finished"
gwError: 501:请购单已完成
60001031:
message: "duplicate key of express"
gwError: 500:存在已导入过的物流信息,导入失败!
60001032:
message: "invoke service error"
gwError: 501:调用获取已付款金额服务出错
60001033:
message: "invoke service error"
gwError: 501:调用写入结余微服务异常
\ No newline at end of file
... ...
# Printer code 范围 1301xxxx
13010000:
message: "request print content is empty"
gwError: 410:请求打印的内容为空!
13010001:
message: "request print printerNo is empty"
gwError: 415:制定的打印机编码为空!
13010002:
message: "request print printerNo is invalid"
gwError: 420:请求的打印机编码错误!
\ No newline at end of file
... ...
# stock code 范围 7000xxxx
70001000:
message: "succeed"
gwError: 200:成功
70001001:
message: "fail"
gwError: 500:失败
70001002:
message: "order code is empty"
gwError: 501:订单号不能为空
70001003:
message: "channel code is empty"
gwError: 501:渠道号不能为空
70001004:
message: "channel code not in map."
gwError: 501:渠道号不在渠道列表中
70001005:
message: "shift log Not Product SKU."
gwError: 501:货位转移中没有此SKU
70001006:
message: "stock change, sku or skc or skn is null."
gwError: 501:库存变更,SKU、SKN、SKC不能为空
70001007:
message: "productSku is null."
gwError: 501:库存占用及解锁,productSku不能为空
70001008:
message: "shopId is null."
gwError: 501:本地库存占用及解锁,shopId不能为空
70001009:
message: "shoppingKey is null."
gwError: 501:库存占用及解锁,shoppingKey不能为空
70001010:
message: "stock num is null."
gwError: 501:库存占用及解锁,num不能为空
70001011:
message: "cannot get any orders by this code"
gwError: 401:传入订单号未匹配到任何订单
70001012:
message: "changeCause is not correct!"
gwError: 501:同步库存,changeCause不存在!
70001013:
message: "storehouseId is null or wrong."
gwError: 401:仓库ID为空或不存在
70001014:
message: "irregular parameters."
gwError: 401:传入参数不符合业务规则
70001015:
message: "invalid seat code."
gwError: 401:传入的货位号无效
\ No newline at end of file
... ...
# ticket code 范围 1200xxxx
12001000:
message: "succeed"
gwError: 200:验票成功!
12001001:
message: "fail"
gwError: 500:失败
12001002:
message: "Request params error"
gwError: 601:参数错误!
12001003:
message: "Ticket has been used!"
gwError: 602:门票已验过!
12001004:
message: "Ticket's show is unfindable! "
gwError: 603:门票场次错误!
12001005:
message: "Ticket invalidate!"
gwError: 604:非YO'HOOD门票!
12001006:
message: "Fail to update!"
gwError: 510:更新失败!
12001007:
message: "Ticket type error!"
gwError: 603:门票类型错误!
\ No newline at end of file
... ...
# webService code 范围 9000xxxx
90001000:
message: "succeed"
gwError: 200:成功
90001001:
message: "fail"
gwError: 500:失败
90001002:
message: "fail"
gwError: 400:参数无效
90001003:
message: "fail"
gwError: 503:服务不可用
\ No newline at end of file
... ...
# wms code 范围 8000xxxx
80001000:
message: "succeed"
gwError: 200:成功
80001001:
message: "fail"
gwError: 500:失败
80001002:
message: "Request params error"
gwError: 401:参数错误!
80001003:
message: "Original sku doesn't exist."
gwError: 401:原sku错误!
80001004:
message: "Skc doesn't exist, searching by original sku "
gwError: 401:原sku错误,没有查询到对应的skc
80001005:
message: "Skn doesn't exist, searching by original sku"
gwError: 401:原sku错误,没有查询到对应的skn
80001006:
message: "Request params error, sku|skn|skc doesn't exist."
gwError: 401:参数错误,没有查询到对应的sku|skn|skc
80001007:
message: "excute outStock action failure"
gwError: 500:执行出库操作失败
80001008:
message: "excute update inStock num action failure"
gwError: 500:执行更新新入库库存数量操作失败
80001009:
message: "excute build instorage order action failure"
gwError: 500:生成入库单失败
80001010:
message: "seatCodeString is not imperfect"
gwError: 500:不是残次货位
80001011:
message: "Original sku is imperfect"
gwError: 500:原SKU不能为残次品
80001012:
message: "Storage not enough"
gwError: 500:库存不足
80001013:
message: "increment offline sn returned error."
gwError: 500:获取线下店调拨单流水号失败
80001014:
message: "no approval goods"
gwError: 402:无待审核、暂停的商品
80001015:
message: "submitted allocation"
gwError: 500:已经被提交过的调拨单
80001016:
message: "no allocation record"
gwError: 500:没有与传入ID匹配的调拨单
80001017:
message: "can not delete auditing allocation"
gwError: 500:调拨单已进入审核流程,不能再进行此操作
80001018:
message: "offshopId is not exist"
gwError: 402:线下店仓库id不存在
80001019:
message: "no goods store can be moved"
gwError: 405:无可转移的库存
80001020:
message: "remained goods store is not enough"
gwError: 406:剩余库存不足
80001021:
message: "get offline instore product error"
gwError: 500:获取线下店可卖的上架商品失败
80001022:
message: "get product stock num error"
gwError: 500:获取商品库存信息失败
80001023:
message: "seat shift parameters error:storehouseId[int]|createBy[int]|goods[List]|outSeatCodeString[null or 01-01-100-01-0001(is must when opType=1,2,3,4)]|opType[1~7]|inSeatCodeString[01-01-100-01-0001]"
gwError: 401:货位转移入参错误
80001024:
message: "get store sale product error"
gwError: 500:获取商品在门店的可卖状态失败
80001025:
message: "sku is not found in picking order"
gwError: 402:商品未在拣货单中找到
80001026:
message: "no goods is found in picking order"
gwError: 500:捡货单中无商品
80001027:
message: "seatCodeString is not existed"
gwError: 500:货位不存在
80001028:
message: "seatCodeString property is not correct"
gwError: 405:货位属性不正确,不允许调拨
80001029:
message: "allocation empty"
gwError: 401:未查询到需调拨的商品信息
80001030:
message: "illegal outStorage type"
gwError: 402:非法的出库单类型
80001031:
message: "query goods by nj has error"
gwError: 403:调用南京接口获取商品信息失败
80001032:
message: "query goods by nj has exception"
gwError: 501:调用南京查询货架商品,获取异常
80001033:
message: "query allocation param is empty"
gwError: 406:[库房ID]或[出库单类型]不能为空
80001034:
message: "query allocation goods param is empty"
gwError: 407:[拨单ID]或[出库单类型]不能为空
80001035:
message: "query shelf goods param is empty"
gwError: 408:[调拨单ID]或[出库单类型]或[货架编码]不能为空
80001036:
message: "create defect allocation param error"
gwError: 406:创建残次调拨单传入参数错误
80001037:
message: "query inStoreHouseId param is empty"
gwError: 406:[入库门店id]不能为空
80001038:
message: "excute build instoreorder action seatshift failure "
gwError: 500:生成入库单时货位转移失败
80001039:
message: "excute build instoreorder action failure "
gwError: 500:生成入库单保存入库信息失败
80001040:
message: "update occupation status error!"
gwError: 406:货位转移完成更新订单状态时发生异常
80001041:
message: "create storeorderlog param error"
gwError: 406:[操作类型]不在指定范围
80001042:
message: "no need to update goods"
gwError: 406:没有商品信息需要更新
80001043:
message: "no allocation by pickingid"
gwError: 406:通过捡货单id未找到调拨单信息
80001044:
message: "fail to virtually out in storage"
gwError: 500:虚拟出入库失败!
80001045:
message: "virtual purchase form not exist"
gwError: 406:虚拟请购单不存在!
80001046:
message: "virtual out in storage status error"
gwError: 407:虚拟出入库状态错误!
80001047:
message: "virtual out in storage can't find any goods"
gwError: 408:虚拟请购单下无商品信息!
80001048:
message: "virtual out in storage can't find any shiftlogs"
gwError: 409:货位转移异常,无有效货架!
80001049:
message: "allocation goods already exist"
gwError: 400:调拨商品已存在
80001050:
message: "total allocation has been closed,can't audit"
gwError: 405:总调拨单已被关闭,不允许审核
80001051:
message: "purchase form not exist"
gwError: 406:请购单不存在!
80001052:
message: "allocation goods isn't exist"
gwError: 400:该调拨单中不存在此商品信息
80001053:
message: "virtual out in storage can't find any goods"
gwError: 408:虚拟出库请购单下无商品信息!
80001054:
message: "virtual out in storage can't find any shiftlogs"
gwError: 409:虚拟出库货位转移异常,找不到货位!
80001055:
message: "purchase form not exist"
gwError: 406:虚拟出库请购单不存在!
80001056:
message: "sku has been locked by other people."
gwError: 450:当前商品已被锁定,您无法操作!
80001057:
message: "allocation don't has any goods"
gwError: 400:调拨单中不存在任何商品,无法提交
80001058:
message: "defect picking param not is null"
gwError: 400:残次捡货的参数不能为空
80001059:
message: "defect picking param houseId not is null"
gwError: 400:残次捡货的参数中的仓库id不能为空
80001060:
message: "defect picking param createby not is null"
gwError: 400:残次捡货的参数中的创建者不能为空
80001061:
message: "defect picking param destShelfCode not is null"
gwError: 400:残次捡货的参数中的目标货架不能为空
80001062:
message: "defect picking param goodslist not is empty"
gwError: 400:残次捡货的参数中的残次商品列表不能为空
80001063:
message: "defect picking param goodslist goodssku not is null"
gwError: 400:残次捡货的参数中的残次商品列表中的商品SKU不能为空
80001064:
message: "defect picking param goodslist num not less 0"
gwError: 400:残次捡货的参数中的残次商品列表中的商品数量错误,必须大于0
80001065:
message: "defect picking param goodslist sourseShelfCode not is null"
gwError: 400:残次捡货的参数中的残次商品列表中的商品源货架不能为空
80001066:
message: "defect picking param goodslist defectSourse not is null"
gwError: 400:残次捡货的参数中的残次商品列表中的商品的残次原因不能为空
80001067:
message: "create defect allocation param not is null"
gwError: 400:创建残次调拨单的参数不能为空
80001068:
message: "create defect allocation param createby not is null"
gwError: 400:创建残次调拨单的参数中的创建者不能为空
80001069:
message: "create defect allocation param shelfcode not is null"
gwError: 400:创建残次调拨单的参数中的货架号不能为空
80001070:
message: "create defect allocation param houseId not is null"
gwError: 400:创建残次调拨单的参数中的门店仓id不能为空
80001071:
message: "create defect allocation param source not is null"
gwError: 400:创建残次调拨单的参数中的来源不能为空
80001072:
message: "create defect allocation param list not is empty"
gwError: 400:创建残次调拨单的参数中的商品列表不能为空
80001073:
message: "create defect allocation param list sku not is null"
gwError: 400:创建残次调拨单的参数中的商品列表中的商品SKU不能为空
80001074:
message: "confirm outstore param not is null"
gwError: 400:确认出库参数不能为空
80001075:
message: "confirm outstore param allocation id and code not is null"
gwError: 400:确认出库参数中的调拨单id和code不能都为空
80001076:
message: "confirm outstore param createby not is null"
gwError: 400:确认出库参数中的创建人不能为空
80001077:
message: "confirm outstore param pickingOrdersId not is null"
gwError: 400:确认出库参数中的捡货单id不能为空
80001078:
message: "confirm outstore param storeId not is null"
gwError: 400:确认出库参数中的仓库id不能为空
80001079:
message: "confirm outstore param type not is null"
gwError: 400:确认出库参数中的类型不能为空
80001080:
message: "confirm outstore param sourceShelfCode not is null"
gwError: 400:确认出库参数中的源货架不能为空
80001081:
message: "confirm outstore param destShelfCode not is null"
gwError: 400:确认出库参数中的目标货架不能为空
80001082:
message: "confirm outstore param outboxList not is null"
gwError: 400:确认出库参数中的外箱信息列表不能为空
80001083:
message: "confirm outstore param outBoxCode not is null"
gwError: 400:确认出库参数中的外箱编码不能为空
80001084:
message: "confirm outstore param goodList not is null"
gwError: 400:确认出库参数中的外箱商品信息列表不能为空
80001085:
message: "confirm outstore param brandId not is null"
gwError: 400:确认出库参数中的品牌id不能为空
80001086:
message: "confirm outstore param goods num less 0"
gwError: 400:确认出库参数中的商品数错误,必须大于0
80001087:
message: "confirm outstore param goods skc not is null"
gwError: 400:确认出库参数中的商品SKC不能为空
80001088:
message: "confirm outstore param goods skn not is null"
gwError: 400:确认出库参数中的商品SKN不能为空
80001089:
message: "confirm outstore param goods sku not is null"
gwError: 400:确认出库参数中的商品SKU不能为空
80001090:
message: "create defect allocation param list num not less 0"
gwError: 400:创建残次调拨单的参数中的商品列表中的商品数错误,必须大于0
80001091:
message: "query outstore order detail param inStoreOrderId not is null"
gwError: 400:查询出库单详情出库单号不能为空
80001092:
message: "query instore order detail param outStoreOrderId not is null"
gwError: 400:查询入库单详情入库单号不能为空
80001093:
message: "outstore order is not existed"
gwError: 500:出库单不存在
80001094:
message: "instore order is not existed"
gwError: 500:入库单不存在
80001095:
message: "confirm outstore param goods num not less 0"
gwError: 400:确认出库参数中的商品数错误,必须大于0
80001096:
message: "pickingOrders is not existed"
gwError: 404:拣货单不存在
80001097:
message: "pickingOrders has finished or has outed"
gwError: 402:拣货单已完成拣货或者已经出库
80001098:
message: "pickingNum can't greater than allocationNum"
gwError: 402:拣货数量不能大于应拣数量
80001099:
message: "follow gifts create batch no error!"
gwError: 500:随机赠品创建批次号发生错误
80001100:
message: "picking order is emtpy"
gwError: 402:捡货单生成失败,返回结果为空
80001101:
message: "follow gifts update status error"
gwError: 402:随机赠品状态不能被操作
80001102:
message: "seatCodeString's storehouseId is not equals storehouseId"
gwError: 402:货位对应的仓库id与当前仓库id不相同
80001103:
message: "The outStoreOrder has been completed "
gwError: 405:此出库单已经完成入库,不能进行再入库
80001104:
message: "Query NJ interface process shift shelf error"
gwError: 405:线下店出入库调用南京接口进行货架转移时出错
80001105:
message: "The allocation has finished or has outed"
gwError: 405:调拨单已完成拣货或者已经出库
80001106:
message: "The pickingId is not null"
gwError: 401:拣货单id不能为空
80001107:
message: "The allocationId is not null"
gwError: 402:调拨id不能为空
80001108:
message: "OutStoreNum greater than allocationNum"
gwError: 402:出库数量不能大于调拨数量
80001109:
message: "OutStoreNum greater than pickingNum"
gwError: 402:出库数量不能大于拣货数量
80001110:
message: "InStoreNum greater than OutStoreNum"
gwError: 402:入库数量不能大于出库数量
80001111:
message: "query goods by shelfCode is empty"
gwError: 406:残次货架编号无效,未查询到对应的已拣商品
80001112:
message: "invalid type of offline allocation"
gwError: 400:传入线下店调拨单类型无效
80001113:
message: "Query NJ interface process query goods error"
gwError: 405:调用南京接口获取上架的并且线下店可卖商品查询为空
80001114:
message: "Query NJ interface process shelfCode to seatCode error"
gwError: 405:调用南京接口货架转货位出错
80001115:
message: "Query stock:erp_stock.getStock interface process error"
gwError: 405:根据仓库id和商品sku查本地仓库库存数结果为空
80001116:
message: "Call NJ interface process updateProductReplenishSwitches error"
gwError: 405:调用南京接口关闭自动补货开关失败
80001117:
message: "No goods would be shift"
gwError: 201:无需要进行货位转移的商品
80001118:
message: "call NJ interface from audited allocation goods failure"
gwError: 405:调用南京同步审核通过商品的接口失败
80001119:
message: "allocation-num[%d] must <greater than> zero."
gwError: 400:调拨数量应该大于零
80001120:
message: "allocation-num[%d] must <less than or equal to> stock-num[%d]"
gwError: 400:调拨数量应该小于或等于库存数量
80001121:
message: "goods[skn:%d] is not salable for shop[storehouse:%d]"
gwError: 400:商品在门店不可卖或未上架
80001122:
message: "confirm outstore param outBoxCode is same"
gwError: 400:确认出库参数中的外箱编码不能有相同值
80001123:
message: "brand is not binding shelf"
gwError: 400:商品对应的品牌未绑定货架
80001124:
message: "no brand auth"
gwError: 400:无品牌操作权限
80001125:
message: "no new pick goods"
gwError: 411:拣货日志及上一次调拨单未查询到任何商品
80001126:
message: "scan shelf code error"
gwError: 410:请扫描调拨返仓货架
80001127:
message: "scan shelf code error"
gwError: 410:请扫描销售返仓货架
... ...
100200300:
message: "user %s not find"
100200301:
message: "user is not validate"
\ No newline at end of file
... ...
200:
message: "成功"
500:
message: "不接受此平台"
501:
message: "Open ID Is Null."
502:
message: "Source Type Is Null or is error."
503:
message: "登录失败"
412:
message: "%s"
201:
message: "未绑定"
421:
message: "账号不能为空."
422:
message: "密码不能为空."
423:
message: "密码不符合规则."
425:
message: "发送失败"
400:
message: "请输入手机号"
402:
message: "手机号码格式错误"
401:
message: "不存在的第三方"
403:
message: "绑定失败,该帐号已经注册过,请更换"
411:
message: "更新手机号失败"
420:
message: "更新密码失败"
413:
message: "请输入密码"
424:
message: "绑定失败"
414:
message: "注册失败"
10001:
message: "账户必须是手机号或者邮箱"
10012:
message: "用户名或者密码错误"
10010:
message: "用户名或者密码错误"
404:
message: "该手机号已经绑定过账号,请更换手机号码!"
450:
message: "请使用第三方登录"
451:
message: "请选择登录方式"
452:
message: "要修改的地址ID不正确."
453:
message: "用户ID不正确."
454:
message: "收货人姓名不正确."
455:
message: "请填写详细地址."
456:
message: "省市必须选择."
457:
message: "手机或者电话必须填写一个."
458:
message: "添加失败."
459:
message: "要修改的地址ID或者用户ID为空."
460:
message: "删除失败."
461:
message: "id 不存在!"
462:
message: "设置失败!"
463:
message: "请输入验证码!"
464:
message: "修改手机号失败!"
465:
message: "手机号码错误"
601:
message: "获取SSO用户信息错误."
602:
message: "SSO用户登录信息为空."
603:
message: "用户UID、邮件、手机号不能为空."
604:
message: "获取SSO用户信息错误."
605:
message: "SSO更新错误"
998:
message: 操作失败
999:
message: Service {0} is not available!
... ...
100000000:
message: "成功"
gwError: 200:成功
100000010:
message: "out of range"
gwError: 500:out of range
\ No newline at end of file
... ...
16001001:
message: "uid is null"
gwError: 400:请传入uid
16001002:
message: "username is null"
gwError: 400:用户名不可为空
16001003:
message: "mobile is invalid"
gwError: 400:手机号格式不正确
16001004:
message: "address is null"
gwError: 400:地址信息不可为空
16001005:
message: "idcard is invalid"
gwError: 400:请填写正确的身份证号码
\ No newline at end of file
... ...
600001001:
message: "Request parameter is null"
gwError: 500:sms parameter is null
600001002:
message: "IP request over 1000 times in an hour"
gwError: 500:IP request over 1000 times in an hour
600001003:
message: "Mobile request over 100 times in a minuter"
gwError: 500:Mobile request over 100 times in a minuter
600001004:
message: "Redis error, please check and send message continue."
gwError: 500:Redis error
600001005:
message: "SMS template id is null"
gwError: 500:null template
600001006:
message: "SMS template not exist"
gwError: 500:template error
600001007:
message: "SMS template has no fit user"
gwError: 500:template user error
600001008:
message: "SMS template fit user not exist"
gwError: 500:template user error
600001009:
message: "Send message failed"
gwError: 500:Send message failed
600001010:
message: "uid is null"
gwError: 500:uid is null
600001011:
message: "mobile is in black list"
gwError: 500:mobile is in black list
600001012:
message: "IP is in black list"
gwError: 500:IP is in black list
600001013:
message: "send message num is out of limit"
gwError: 500:send message num is out of limit
600001014:
message: "SMS template project is null"
gwError: 201:项目参数不能为空!
600001015:
message: "SMS template message is null"
gwError: 204:消息不能为空!
600001016:
message: "SMS template token is null"
gwError: 207:token不能为空!
600001017:
message: "SMS template token is error"
gwError: 208:签名错误
600002001:
message: "param task_key can not be empty"
gwError: 400:请传入task_key
600002002:
message: "recycle_task_define not exist"
gwError: 500:recycle_task_define不存在
600002003:
message: "param user_id can not be empty"
gwError: 400:请传入user_id
... ...