package com.platform.yijia.utils;

public class CodeMsg {
    private int retCode;
    private String message;
    // 按照模块定义CodeMsg
    // 通用异常
    public static CodeMsg SUCCESS = new CodeMsg(0,"success");
    public static CodeMsg SERVER_EXCEPTION = new CodeMsg(500100,"服务端异常");
    public static CodeMsg USER_NOT_EXSIST = new CodeMsg(-1,"用户不存在");
    public static CodeMsg USER_EXSIST_CARD = new CodeMsg(-1,"该用户暂无此卡");
    public static CodeMsg USER_EXSIST = new CodeMsg(-1,"用户已存在");
    public static CodeMsg NO_ORDER = new CodeMsg(-2,"暂无此订单");
    public static CodeMsg SELECT_ORDER_ERROR = new CodeMsg(-1,"此订单已完成支付，请重新下单");
    public static CodeMsg BALANCE_NOT_EENOUGH = new CodeMsg(-2,"电子卡余额不足");
    public static CodeMsg PASSWORD_ERROR = new CodeMsg(-2,"密码错误");
    public static CodeMsg ACCOUNT_DISABLE = new CodeMsg(-3,"该账号已被停用");
    public static CodeMsg NO_FollowGzh = new CodeMsg(-4,"未关注公众号");
    public static CodeMsg USERGZHINFO_EXSIST = new CodeMsg(-5,"系统暂无此用户公众号信息");
    public static CodeMsg CHECK_DATA_ERROR = new CodeMsg(-6,"数据不一致");
    public static CodeMsg SEARCH_FAIL = new CodeMsg(001,"查询失败");
    public static CodeMsg INSERT_FAIL = new CodeMsg(001,"添加失败");
    public static CodeMsg SEARCH_APPID_FAIL = new CodeMsg(-1,"油站公众号配置不完善");
    public static CodeMsg DELETE_FAIL = new CodeMsg(003,"删除失败");
    public static CodeMsg UPDATE_FAIL = new CodeMsg(004,"修改失败");
    public static CodeMsg REQUEST_FAIL = new CodeMsg(005,"传参失败");
    public static CodeMsg YEWU_FAIL = new CodeMsg(006,"业务失败");
    public static CodeMsg NO_CARDENABLEFLAG = new CodeMsg(-2,"未启用电会员卡");

    public static CodeMsg CHECK_DATA = new CodeMsg(007,"与后台检验不一致，请联系……");
    public static CodeMsg PARAMS_NUll = new CodeMsg(010,"请求失败，参数缺失");
    public static CodeMsg WARSECOUNT_FAIL = new CodeMsg(-1,"库存不足");
    public static CodeMsg INTEGRAL_INSUFFICIENT = new CodeMsg(-2,"您的积分不足");
    private CodeMsg(int retCode, String message) {
        this.retCode = retCode;
        this.message = message;
    }
    public int getRetCode() {
        return retCode;
    }
    public String getMessage() {
        return message;
    }
    public void setMessage(String message) {
        this.message = message;
    }
}
