服务发布(无redis版)
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user