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

com.hecloud.runtime.common.utils.ResultTools Maven / Gradle / Ivy

package com.hecloud.runtime.common.utils;


import com.hecloud.runtime.common.model.HoteamResult;

/**
 * 返回结果工具类
 *
 * @author LoveinBJ
 */
public class ResultTools {

    public static HoteamResult formatErrResult() {
        return new HoteamResult(false, "参数格式错误", "400", "修改参数格式");
    }

    public static HoteamResult queryErrResult(String message, String solution) {
        return new HoteamResult(false, message, "404", solution);
    }

    public static HoteamResult noImplementedResult() {
        return new HoteamResult(false, "暂未实现", "450", "等待开发完成");
    }

    public static HoteamResult serverErrorResult() {
        return new HoteamResult(false, "服务器异常!", "505", "请查看服务器日志!");
    }

    public static HoteamResult timeoutResult() {
        return new HoteamResult(false, "请求时间失效", "505", "");
    }

    public static HoteamResult noPermissionResult() {
        return new HoteamResult(false, "您没有访问权限", "401", "");
    }

    public static HoteamResult sessionTimeoutResult() {
        return new HoteamResult(false, "会话失效!", "509", "请重新登录!");
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy