|
@@ -3,6 +3,8 @@ package com.taais.biz.controller;
|
|
|
import java.util.List;
|
|
|
|
|
|
import com.taais.biz.service.impl.AlgorithmModelServiceImpl;
|
|
|
+import com.taais.system.domain.vo.SysOssVo;
|
|
|
+import com.taais.system.service.ISysOssService;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import jakarta.servlet.http.HttpServletResponse;
|
|
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
@@ -69,6 +71,9 @@ public class AlgorithmModelController extends BaseController {
|
|
|
return CommonResult.success(algorithmModelService.getModelByAlgorithmId(id));
|
|
|
}
|
|
|
|
|
|
+ @Resource
|
|
|
+ private ISysOssService sysOssService;
|
|
|
+
|
|
|
/**
|
|
|
* 新增算法模型配置
|
|
|
*/
|
|
@@ -77,6 +82,9 @@ public class AlgorithmModelController extends BaseController {
|
|
|
@RepeatSubmit()
|
|
|
@PostMapping
|
|
|
public CommonResult<Void> add(@Validated @RequestBody AlgorithmModelBo algorithmModelBo) {
|
|
|
+ String modelAddress = algorithmModelBo.getModelAddress();
|
|
|
+ SysOssVo vo = sysOssService.getById(Long.parseLong(modelAddress));
|
|
|
+ algorithmModelBo.setModelAddress("/profile" + vo.getUrl().split("/profile")[1]);
|
|
|
boolean inserted = algorithmModelService.insert(algorithmModelBo);
|
|
|
if (!inserted) {
|
|
|
return CommonResult.fail("新增算法模型配置记录失败!");
|