青羊经侦大队-数据平台
安瑾然
2022-07-12 fe55254e84cce4f92062f48fc4d1840dfdfdc02a
src/main/java/com/example/jz/enums/BusinessHttpStatus.java
@@ -4,6 +4,7 @@
    // 未登录
    UNAUTHORIZED(401, "未登录"),
    // 未知异常
    BAD_EXCEPTION(10000, "系统异常"),
    // 成功
    SUCCESS(200, "成功");
@@ -12,35 +13,23 @@
    private final String msg;
    BusinessHttpStatus(int value, String msg) {
        this.value = value;
        this.msg = msg;
    }
    /**
     * Return the integer value of this status code.
     */
    public int value() {
        return this.value;
    }
    /**
     * Return the msg of this status code.
     */
    public String getMsg() {
        return msg;
    }
    /**
     * Return a string representation of this status code.
     */
    @Override
    public String toString() {
        return this.value + " " + name();
    }
    public static BusinessHttpStatus valueOf(int statusCode) {
        BusinessHttpStatus status = resolve(statusCode);