青羊经侦大队-数据平台
11
baizonghao
2023-05-25 7ea5eece501c98a91555a5358931367e78e9d23b
src/main/java/com/example/jz/enums/BusinessHttpStatus.java
@@ -3,41 +3,33 @@
public enum BusinessHttpStatus {
    // 未登录
    UNAUTHORIZED(401, "未授权");
    UNAUTHORIZED(401, "未登录"),
    // 未知异常
    BAD_EXCEPTION(10000, "系统异常"),
    // 成功
    SUCCESS(200, "成功");
    private final int value;
    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);