[冲突]:解决合并冲突
# Conflicts: # src/main/java/com/bipt/intelligentapplicationorchestrationservice/constant/MessageConstant.java # src/main/resources/application.properties
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
package com.bipt.intelligentapplicationorchestrationservice.controller;
|
||||
|
||||
import com.bipt.intelligentapplicationorchestrationservice.pojo.ModelDTO;
|
||||
import com.bipt.intelligentapplicationorchestrationservice.pojo.OptResult;
|
||||
import com.bipt.intelligentapplicationorchestrationservice.pojo.*;
|
||||
import com.bipt.intelligentapplicationorchestrationservice.service.ModelService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
@ -9,10 +8,13 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/model")
|
||||
@Tag(name = "模型部分相关接口")
|
||||
@CrossOrigin(origins = "http://localhost:3000") // 生产环境指定具体域名
|
||||
public class ModelController {
|
||||
@Autowired
|
||||
private ModelService modelService;
|
||||
@ -32,4 +34,46 @@ public class ModelController {
|
||||
return OptResult.success();
|
||||
}
|
||||
|
||||
@Operation(summary = "查询模型列表")
|
||||
@GetMapping("list")
|
||||
public OptResult list(){
|
||||
log.info("查询模型列表");
|
||||
List<ModelVO> modelVOList = modelService.list();
|
||||
return OptResult.success(modelVOList);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询模型详情")
|
||||
@GetMapping("detail")
|
||||
public OptResult detail(Long id){
|
||||
log.info("查询模型详情");
|
||||
ModelVersion modelVersion = modelService.detail(id);
|
||||
return OptResult.success(modelVersion);
|
||||
}
|
||||
|
||||
@Operation(summary = "模型更新")
|
||||
@PutMapping("/updateModel")
|
||||
public OptResult updateModel(@RequestBody ModelVersionDTO dto){
|
||||
log.info("模型更新");
|
||||
modelService.updateModel(dto);
|
||||
return OptResult.success();
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "模型版本删除")
|
||||
@DeleteMapping("/deleteModelVersion")
|
||||
public OptResult deleteModelVersion(Long id){
|
||||
log.info("模型版本删除");
|
||||
modelService.deleteModelVersion(id);
|
||||
return OptResult.success();
|
||||
}
|
||||
|
||||
@Operation(summary = "更新生命周期")
|
||||
@PutMapping("/updateLifeCycle")
|
||||
public OptResult updateLifeCycle(Long id,String lifeCycle){
|
||||
log.info("更新生命周期");
|
||||
modelService.updateLifeCycle(id,lifeCycle);
|
||||
return OptResult.success();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user