44323
2024-05-29 fe3b034bfcb263336667bac9d4a002360533951b
ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/R.java
@@ -14,9 +14,20 @@
    /** 成功 */
    public static final int SUCCESS = Constants.SUCCESS;
    public static final int VIPERROR = Constants.VIP_ERROR;
    /** 失败 */
    public static final int FAIL = Constants.FAIL;
    /** 积分商城兑换失败 */
    public static final int EXCHANGECODE = Constants.EXCHANGECODE;
    /**
     * 账号被冻结
     */
    public static final int FREEZE = Constants.FREEZE;
    /**
     * 短信验证码无效
     */
    public static final int ERRORCODE = Constants.ERRORCODE;
    /**
     * 登陆失效
     */
@@ -37,6 +48,10 @@
    {
        return restResult(data, SUCCESS, null);
    }
    public static <T> R<T> vipError(String msg)
    {
        return restResult(null, VIPERROR, msg);
    }
    public static <T> R<T> ok(T data, String msg)
    {
@@ -57,6 +72,29 @@
        return restResult(null, FAIL, msg);
    }
    /**
     * 商城兑换失败code
     * @param msg
     * @return
     * @param <T>
     */
    public static <T> R<T> exchangeError(String msg)
    {
        return restResult(null, EXCHANGECODE, msg);
    }
    public static <T> R<T> freeze(String msg)
    {
        return restResult(null, FREEZE, msg);
    }
    public static <T> R<T> errorCode(String msg)
    {
        return restResult(null, ERRORCODE, msg);
    }
    public static <T> R<T> errCode(String msg)
    {
        return restResult(null, FREEZE, msg);
    }
    public static <T> R<T> fail(T data)
    {
        return restResult(data, FAIL, null);