srms接口修改

This commit is contained in:
梁琦涛
2024-01-29 19:23:33 +08:00
parent 23240f3f49
commit 05d00a906a
6 changed files with 135 additions and 82 deletions
@@ -45,12 +45,12 @@ public class ResponsesUtil {
}
public static JSONObject getJsonErrUpper() {
return getJsonErrUpper("");
return getJsonErrUpper("",CommonConstant.SC_INTERNAL_SERVER_ERROR_500);
}
public static JSONObject getJsonErrUpper(String message) {
public static JSONObject getJsonErrUpper(String message,Integer code) {
JSONObject jsonResponses = new JSONObject();
jsonResponses.put("SrmsCode",CommonConstant.SC_INTERNAL_SERVER_ERROR_500);
jsonResponses.put("SrmsCode",code);
jsonResponses.put("Message",message);
jsonResponses.put("Success",false);
jsonResponses.put("Timestamp",System.currentTimeMillis());
@@ -58,12 +58,12 @@ public class ResponsesUtil {
}
public static JSONObject getJsonErr() {
return getJsonErr("");
return getJsonErr("",CommonConstant.SC_INTERNAL_SERVER_ERROR_500);
}
public static JSONObject getJsonErr(String message) {
public static JSONObject getJsonErr(String message,Integer code) {
JSONObject jsonResponses = new JSONObject();
jsonResponses.put("srmsCode",CommonConstant.SC_INTERNAL_SERVER_ERROR_500);
jsonResponses.put("srmsCode",code);
jsonResponses.put("message",message);
jsonResponses.put("success",false);
jsonResponses.put("timestamp",System.currentTimeMillis());