添加srms接口

This commit is contained in:
梁琦涛
2024-01-19 17:15:07 +08:00
parent 652bcab8e4
commit 160c6266d3
18 changed files with 851 additions and 0 deletions
@@ -0,0 +1,48 @@
package com.jero.modules.docking.utils;
import com.alibaba.fastjson.JSONObject;
import com.jero.common.constant.CommonConstant;
/**
* @author lqt
* @version 1.0
* @date 2024/1/18 14:45
*/
public class ResponsesUtil {
public static JSONObject getJsonResult(Object jsonMessageHeader,JSONObject jsonResponses) {
JSONObject json = new JSONObject();
json.put("MessageHeader",jsonMessageHeader);
json.put("Responses",jsonResponses);
return json;
}
public static JSONObject getJsonOk() {
return getJsonOk("");
}
public static JSONObject getJsonOk(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 getJsonErr() {
return getJsonErr("");
}
public static JSONObject getJsonErr(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;
}
}