无忧付支付订单
This commit is contained in:
@@ -11,20 +11,20 @@ import java.util.Map;
|
||||
*/
|
||||
public class Result extends HashMap<String, Object> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
public Result () {
|
||||
put("code", 0);
|
||||
put("msg", "success");
|
||||
}
|
||||
|
||||
|
||||
public static Result error() {
|
||||
return error(HttpStatus.SC_INTERNAL_SERVER_ERROR, "未知异常,请联系管理员");
|
||||
}
|
||||
|
||||
|
||||
public static Result error(String msg) {
|
||||
return error(HttpStatus.SC_INTERNAL_SERVER_ERROR, msg);
|
||||
}
|
||||
|
||||
|
||||
public static Result error(int code, String msg) {
|
||||
Result r = new Result();
|
||||
r.put("code", code);
|
||||
@@ -37,13 +37,13 @@ public class Result extends HashMap<String, Object> {
|
||||
r.put("msg", msg);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
public static Result success(Map<String, Object> map) {
|
||||
Result r = new Result();
|
||||
r.putAll(map);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
public static Result success() {
|
||||
return new Result();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user