服务发布(无redis版)

This commit is contained in:
2025-05-20 16:33:07 +08:00
parent eee91c212a
commit 3599a052a3
12 changed files with 274 additions and 1 deletions

View File

@ -0,0 +1,41 @@
package com.bipt.intelligentapplicationorchestrationservice.controller;
import com.bipt.intelligentapplicationorchestrationservice.pojo.OptResult;
import com.bipt.intelligentapplicationorchestrationservice.pojo.ServicePublishDTO;
import com.bipt.intelligentapplicationorchestrationservice.pojo.ServicePublishVO;
import com.bipt.intelligentapplicationorchestrationservice.service.PublishService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Tag(name ="服务发布相关接口")
@RestController
@RequestMapping("/publish")
@Slf4j
public class publishController {
@Autowired
private PublishService publishService;
/**
* 新增请求发布
* @param servicePublishDTO
* @return
*/
@PostMapping
@Operation(summary ="新增发布请求")
public OptResult<ServicePublishVO> save(@RequestBody ServicePublishDTO servicePublishDTO){
log.info("模型发布请求:{}", servicePublishDTO);
publishService.save(servicePublishDTO);
ServicePublishVO servicePublishVO = publishService.getByModelId(servicePublishDTO);
return OptResult.success(servicePublishVO);
}
}