package com.hfkj.common.exception;

/**
 * 
 * @ClassName:  ErrorCode   
 * @Description:
 * 代码code规则：	
 * 		0000-0999   系统异常 
 * 		1000-1999 app异常
 * 		2000-2999 biz异常
 * 		999999	      未知异常
 * @author: 机器猫 
 * @date:   2018年8月12日 上午11:43:30   
 *     
 * @Copyright: 2018 www.shinwoten.com Inc. All rights reserved.
 */
public enum ErrorCode {
	
    //////////////////sys////////////////
	DB_CONNECT_ERROR("0000","数据库连接异常"),
	FTP_CONNECT_ERROR("0001","FTP服务器连接失败"),
	FTP_CONFIG_NOT_FOUND("0002","FTP服务地址路径配置缺失"),
	
	//////////////////APP///////////////
    WECHAT_DECRYPT_ERROR("3001","微信解密错误->%s"),
    WECHAT_LOGIN_ERROR("3002","微信登录失败"),
    WECHAT_LOGIN_TEACHER_ERROR("3003","当前微信用户不是老师，请联系管理员"),
    SERVER_BUSY_ERROR("3004","服务器繁忙，请稍后重试"),

    //////////////////业务异常/////////////
    COMMON_ERROR("2000",""),
    REQ_PARAMS_ERROR("2001","请求参数校验失败"),
    ACCOUNT_LOGIN_EXPIRE("2002","登录账户已过期"),
    ACCOUNT_LOGIN_NOT("2003","账户未登录"),
    ROLE_NOT_PERMISSIONS("2004","该角色没有权限"),



    //////////////////openapi业务异常/////////////
	MSG_EVENT_NULL("2999","消息类型为空"),
    OPEN_API_COMMON("4000",""),
    OPEN_API_REQ_PARAMS_ERR("4001","请求参数校验失败"),
    OPEN_API_SIGN_ERR("4002","签名错误"),
    OPEN_API_REQ_ID_ERR("4003","请求id重复"),

	USE_VISIT_ILLEGAL("4001","用户身份错误"),
	RC_VISIT_ERROR("2998",""),
	UNKNOW_ERROR("999999","未知异常"),
	EXCEL_ERROR("80000","Excel处理异常"),
    ;//注意：上面为逗号，此次为分号


    private String code;
    private String msg;
    ErrorCode(String code, String msg){
        this.code = code;
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }

//    public void setCode(String code) {
//        this.code = code;
//    }

    public String getMsg() {
        return msg;
    }

//    public void setMsg(String msg) {
//        this.msg = msg;
//    }
}
