src/main/java/com/xcong/excoin/common/response/Result.java
@@ -18,6 +18,8 @@ private static final int SUCCESS = 0; private static final String SUCCESS_MSG = "success"; private static final int FAIL = -1; private static final int LOGIN_FAIL = -2; @@ -45,6 +47,13 @@ result.data = data; return result; } public static Result ok(Object data) { Result result = new Result(); result.code = SUCCESS; result.msg = SUCCESS_MSG; result.data = data; return result; } public static Result fail(String msg) { Result result = new Result();