| | |
| | | } |
| | | |
| | | 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()); |
| | |
| | | return CommonResult.error(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode(),"模型运行失败!"); |
| | | } |
| | | } |
| | | return CommonResult.success(); |
| | | return CommonResult.success(""); |
| | | } |
| | | |
| | | @PostMapping("/import") |