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 = new CodeMsg(-1,"用户已存在");
    public static CodeMsg SEARCH_FAIL = new CodeMsg(001,"查询失败");
    public static CodeMsg INSERT_FAIL = new CodeMsg(001,"添加失败");

    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 CHECK_DATA = new CodeMsg(007,"与后台检验不一致，请联系……");
    public static CodeMsg PARAMS_NUll = new CodeMsg(010,"请求失败，参数缺失");
    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;
    }
}
