package com.gic.haoban.manage.service.errorcode;

/**
 * Created by fudh on 2018/3/4.
 */
public enum HaoBanErrCode {

    ERR_0001("10100001", "参数没有传"),
    ERR_10012("10012","企业微信不存在"),
    ERR_OTHER("9999","业务异常"),
    ERR_100033("100033", "活码分组已经被关联,不可删除"),
    ERR_2000("2000", "企微接口调用次数限制-月"),
    ERR_2001("2001", "企微接口调用次数限制-天"),
    ERR_2002("2002", "企微接口调用次数限制-小时"),
    ERR_2010("2010", "pending接口调用限制")
    ;

    private String code;
    private String msg;

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

    public static HaoBanErrCode getValue(String code) {
        for (HaoBanErrCode sec : HaoBanErrCode.values()) {
            if (code == sec.getCode()) {
                return sec;
            }
        }
        return null;
    }

    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;
    }
}
