|
|
|
@ -7,22 +7,32 @@
|
|
|
|
|
package lsgwr.exam.utils;
|
|
|
|
|
|
|
|
|
|
import lsgwr.exam.vo.ResultVO;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 封装返回结果
|
|
|
|
|
*/
|
|
|
|
|
public class ResultVOUtil {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 成功返回结果
|
|
|
|
|
*/
|
|
|
|
|
public static ResultVO success(Integer code, String msg, Object object) {
|
|
|
|
|
return new ResultVO(code, msg, object);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 成功返回结果
|
|
|
|
|
*/
|
|
|
|
|
public static ResultVO success(Object object) {
|
|
|
|
|
return new ResultVO(0, "成功", object);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 成功返回结果
|
|
|
|
|
*/
|
|
|
|
|
public static ResultVO success() {
|
|
|
|
|
return new ResultVO(0, "成功", null);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 失败返回结果
|
|
|
|
|
*/
|
|
|
|
|
public static ResultVO error(Integer code, String msg) {
|
|
|
|
|
return new ResultVO(code, msg, null);
|
|
|
|
|
}
|
|
|
|
|