From a8f2f4e6f1a9173d7eb9779c7879674015c8cda0 Mon Sep 17 00:00:00 2001 From: dengzedong <dengzedong@email> Date: 星期四, 10 十月 2024 14:07:31 +0800 Subject: [PATCH] 项目启动加载已发布的dll和jar 先判断文件是否存在 --- iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/MdkApiImpl.java | 25 ++++++++++++------------- 1 files changed, 12 insertions(+), 13 deletions(-) diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/MdkApiImpl.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/MdkApiImpl.java index 40a2600..e4ae4ab 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/MdkApiImpl.java +++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/MdkApiImpl.java @@ -22,10 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.CollectionUtils; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; - -import javax.validation.Valid; import java.util.ArrayList; import java.util.HashMap; @@ -74,7 +71,7 @@ * @return */ @Override - public CommonResult<MdkPredictModuleRespDTO> predictModule(MdkPredictReqDTO reqDTO) { + public MdkPredictModuleRespDTO predictModule(MdkPredictReqDTO reqDTO) { MdkPredictModuleRespDTO resp = new MdkPredictModuleRespDTO(); Map<String, MdkPredictItemRespDTO> predictItemRespMap = new HashMap<>(); try { @@ -112,10 +109,11 @@ } log.info("预测计算结束: " + System.currentTimeMillis()); } catch (Exception ex) { - return error(999, ex.getMessage()); + ex.printStackTrace(); + return resp; } resp.setPredictItemRespMap(predictItemRespMap); - return success(resp); + return resp; } /** @@ -125,7 +123,7 @@ * @return */ @Override - public CommonResult<MdkPredictItemRespDTO> predictItem(@Valid @RequestBody MdkPredictReqDTO reqDTO) { + public MdkPredictItemRespDTO predictItem(MdkPredictReqDTO reqDTO) { MdkPredictItemRespDTO resp = new MdkPredictItemRespDTO(); try { @@ -146,10 +144,10 @@ log.info("预测计算结束: " + System.currentTimeMillis()); } catch (Exception ex) { log.info("预测计算异常: " + System.currentTimeMillis()); - ex.printStackTrace(); + return resp; } - return success(resp); + return resp; } /** @@ -159,10 +157,10 @@ * @return */ @Override - public CommonResult<Boolean> predictAutoAdjust(@Valid @RequestBody MdkPredictReqDTO reqDTO) { + public Boolean predictAutoAdjust(MdkPredictReqDTO reqDTO) { - return success(true); + return true; } /** @@ -172,7 +170,7 @@ * @return */ @Override - public CommonResult<MdkScheduleRespDTO> doSchedule(@Valid @RequestBody MdkScheduleReqDTO reqDTO) { + public MdkScheduleRespDTO doSchedule(MdkScheduleReqDTO reqDTO) { MdkScheduleRespDTO resp = new MdkScheduleRespDTO(); resp.setScheduleCode(reqDTO.getScheduleCode()); resp.setScheduleTime(reqDTO.getScheduleTime()); @@ -184,7 +182,8 @@ } catch (Exception ex) { log.info("调度计算异常: " + System.currentTimeMillis()); ex.printStackTrace(); + return resp; } - return success(resp); + return resp; } } \ No newline at end of file -- Gitblit v1.9.3