All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.leftins.tools.result.ResultCode Maven / Gradle / Ivy

package com.leftins.tools.result;


/**
 * ========================
 * 通用响应状态
 * Created with IntelliJ IDEA.
 * User:pyy
 * Date:2019/6/6
 * Time:10:10
 * Version: v1.0
 * ========================
 */
public enum ResultCode {

    /* 成功状态码 */
    _200(200, "成功"),
    /* 错误状态码 */
    _400(400, "系统错误,请稍后重试!"),
    _401(401,"该操作未授权"),
    _403(403,"重定向错误"),
    _404(404,"资源未找到"),
    _402(402,"当前版本过低,请升级后再试"),
    _500(500,"服务器错误"),
    TENANT_ACCOUNT_NOT_FOUND(-1001,"租户信息[{0}]不存在"),
    DATABASE_CONFIG_NOT_EXIST(-1002,"数据库配置文件不存在"),
    PERMISSION_TOKEN_EXPIRED(-1003,"验证token不存在或无效,原因:[{0}]"),
    PERMISSION_SIGNATURE_ERROR(-1004,"token生成失败,原因:[{0}]");

    //操作代码
    int code;
    //提示信息
    String message;

    ResultCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int code() {
        return code;
    }

    public String message() {
        return message;
    }

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

    public void setMessage(String message) {
        this.message = message;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy