|
|
@@ -89,6 +89,10 @@ public class Ret extends HashMap {
|
|
|
return ok().set(key, value);
|
|
|
}
|
|
|
|
|
|
+ public static Ret ok(String msg) {
|
|
|
+ return ok().set("msg", msg);
|
|
|
+ }
|
|
|
+
|
|
|
public static Ret fail() {
|
|
|
return new Ret().setFail();
|
|
|
}
|
|
|
@@ -97,6 +101,10 @@ public class Ret extends HashMap {
|
|
|
return fail().set(key, value);
|
|
|
}
|
|
|
|
|
|
+ public static Ret fail(String msg) {
|
|
|
+ return fail().set("msg", msg);
|
|
|
+ }
|
|
|
+
|
|
|
public Ret setOk() {
|
|
|
super.put(STATE, STATE_OK);
|
|
|
return this;
|