linfutong лет назад: 2
Родитель
Сommit
9412d9aa21

+ 1 - 1
release/sql/db_sql_v2.1-hotfix.sql

@@ -32,5 +32,5 @@ ALTER TABLE lab_algorithm ADD original_img varchar(255) DEFAULT NULL COMMENT '
 /*     添加时间:2023-3-8                ****/
 /************************************************/
 ALTER TABLE lab_algorithm ADD resp_code bigint(20) DEFAULT NULL COMMENT '算法请求状态码';
-ALTER TABLE lab_algorithm ADD resp_data text DEFAULT NULL COMMENT '算法请求返回的json串';
+ALTER TABLE lab_algorithm ADD resp_data varchar(2000) DEFAULT NULL COMMENT '算法请求返回实体';
 ALTER TABLE lab_algorithm ADD update_time datetime DEFAULT NULL COMMENT '更新时间';

+ 7 - 6
zd-modules/zd-algorithm/src/main/java/com/zd/alg/forward/serivce/CheckService.java

@@ -255,12 +255,13 @@ public class CheckService {
         //存原始数据
         AnalysisReturnData respData = send != null?send.getData():null;
         if (respData != null) {
-            respData.setRet_image(null);
-            respData.setSrc_image(null);
-            algorithm.setRespData(JSONObject.toJSONString(send));
-            ImgPostResponse<AnalysisReturnData> dataImgPostResponse = new ImgPostResponse<>();
-            dataImgPostResponse.setData(respData);
-            algorithm.setRespData(JSONObject.toJSONString(dataImgPostResponse));
+            respData.setRet_image("Removed to save respBody");
+            respData.setSrc_image("Removed to save respBody");
+            ImgPostResponse<AnalysisReturnData> response = new ImgPostResponse<>();
+            response.setData(respData);
+            response.setStatus_code(send.getStatus_code());
+            response.setMessage(send.getMessage());
+            algorithm.setRespData(JSONObject.toJSONString(response));
             algorithm.setRespCode(send.getStatus_code());
         }
         algorithm.setUpdateTime(new Date());