package com.ks.app.util;
|
|
import com.ks.app.pojo.VO.Result;
|
|
public class ResultUtils {
|
|
public static Result loadTrue() {
|
Result object = new Result();
|
object.setCode(0);
|
return object;
|
}
|
|
public static Result loadTrue(Object data) {
|
Result object = new Result();
|
object.setCode(0);
|
object.setData(data);
|
return object;
|
}
|
|
public static Result loadTrue(int code, String msg) {
|
Result object = new Result();
|
object.setCode(0);
|
object.setMsg(msg);
|
return object;
|
}
|
|
public static Result loadTrue(int code, Object data) {
|
Result object = new Result();
|
object.setCode(code);
|
object.setData(data);
|
return object;
|
}
|
|
public static Result loadTrue(int code, Object data, String msg) {
|
Result object = new Result();
|
object.setCode(0);
|
object.setData(data);
|
object.setMsg(msg);
|
return object;
|
}
|
|
|
public static Result loadFalse(String msg) {
|
Result object = new Result();
|
object.setCode(1);
|
object.setMsg(msg);
|
return object;
|
}
|
|
public static Result loadFalse(int code, String msg) {
|
Result object = new Result();
|
object.setCode(code);
|
object.setMsg(msg);
|
return object;
|
}
|
|
public static Result loadFalse(int code, Object data, String msg) {
|
Result object = new Result();
|
object.setCode(0);
|
object.setData(data);
|
object.setMsg(msg);
|
return object;
|
}
|
|
|
}
|