package cn.com.countrygarden.bi.main.core;

import com.github.pagehelper.PageRowBounds;

import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.RoundingMode;

/**
 * 响应结果生成工具
 */
public class Response {
    private static final String DEFAULT_SUCCESS_MESSAGE = "";

    public static Result response() {
        return new Result()
                .setResultCode(ResultCode.OK)
                .setResultMsg(DEFAULT_SUCCESS_MESSAGE);
    }

    public static Result response(Object data) {
        return new Result()
                .setResultCode(ResultCode.OK)
                .setResultMsg(DEFAULT_SUCCESS_MESSAGE)
                .setData(data);
    }


    public static Result responseFail(String message) {
        return new Result()
                .setResultCode(ResultCode.NOK)
                .setResultMsg(message);
    }
}
