srms接口修改

This commit is contained in:
梁琦涛
2024-01-29 09:52:27 +08:00
parent fba591ea38
commit ffe778306d
6 changed files with 160 additions and 35 deletions
@@ -9,7 +9,7 @@ import com.jero.common.constant.CommonConstant;
* @date 2024/1/18 14:45
*/
public class ResponsesUtil {
private ResponsesUtil(){}
public static JSONObject getJsonResult(Object jsonMessageHeader,JSONObject jsonResponses) {
JSONObject json = new JSONObject();
@@ -22,6 +22,19 @@ public class ResponsesUtil {
return getJsonOk("");
}
public static JSONObject getJsonOkUpper() {
return getJsonOkUpper("");
}
public static JSONObject getJsonOkUpper(String message) {
JSONObject jsonResponses = new JSONObject();
jsonResponses.put("SrmsCode",CommonConstant.SC_OK_200);
jsonResponses.put("Message",message);
jsonResponses.put("Success",true);
jsonResponses.put("Timestamp",System.currentTimeMillis());
return jsonResponses;
}
public static JSONObject getJsonOk(String message) {
JSONObject jsonResponses = new JSONObject();
jsonResponses.put("srmsCode",CommonConstant.SC_OK_200);
@@ -31,6 +44,19 @@ public class ResponsesUtil {
return jsonResponses;
}
public static JSONObject getJsonErrUpper() {
return getJsonErrUpper("");
}
public static JSONObject getJsonErrUpper(String message) {
JSONObject jsonResponses = new JSONObject();
jsonResponses.put("SrmsCode",CommonConstant.SC_INTERNAL_SERVER_ERROR_500);
jsonResponses.put("Message",message);
jsonResponses.put("Success",false);
jsonResponses.put("Timestamp",System.currentTimeMillis());
return jsonResponses;
}
public static JSONObject getJsonErr() {
return getJsonErr("");
}