From 66782b7ba787a92b54640cbab0ebd201f0ad9e51 Mon Sep 17 00:00:00 2001 From: dengzedong <dengzedong@email> Date: 星期四, 09 一月 2025 10:29:25 +0800 Subject: [PATCH] chartParamList --- iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/controller/admin/MdkController.java | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/controller/admin/MdkController.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/controller/admin/MdkController.java index bd527a4..7b75ee9 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/controller/admin/MdkController.java +++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/controller/admin/MdkController.java @@ -110,6 +110,10 @@ } try { + if (dto.getModelSettings().stream().noneMatch(e -> e.getSettingKey().equals(MdkConstant.PY_FILE_KEY))) { + return error(GlobalErrorCodeConstants.BAD_REQUEST.getCode(),"模型设置参数缺少必要信息【" + MdkConstant.PY_FILE_KEY + "】,请重新上传模型!"); + } + if (dto.getHasModel()) { paramsValueArray[uuids.size()] = dto.getModel(); paramsValueArray[uuids.size() + 1] = handleModelSettings(dto.getModelSettings()); @@ -197,7 +201,7 @@ return CommonResult.error(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode(),"模型运行失败!"); } } - return CommonResult.success(); + return CommonResult.success(""); } @PostMapping("/import") -- Gitblit v1.9.3