数据集新增及修改功能版本1.0
This commit is contained in:
@ -0,0 +1,43 @@
|
||||
package com.bipt.intelligentapplicationorchestrationservice.controller;
|
||||
|
||||
import com.bipt.intelligentapplicationorchestrationservice.pojo.DatasetDTO;
|
||||
import com.bipt.intelligentapplicationorchestrationservice.pojo.DatasetEntity;
|
||||
import com.bipt.intelligentapplicationorchestrationservice.pojo.OptResult;
|
||||
import com.bipt.intelligentapplicationorchestrationservice.service.DatasetService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/dataset")
|
||||
@Slf4j
|
||||
public class DatasetController {
|
||||
@Autowired
|
||||
private DatasetService datasetService;
|
||||
|
||||
/**
|
||||
* 新增数据集
|
||||
* @param datasetDTO
|
||||
* @return
|
||||
*/
|
||||
@PostMapping
|
||||
public OptResult save(@RequestBody DatasetDTO datasetDTO) {
|
||||
log.info("新增数据集:{}", datasetDTO);
|
||||
datasetService.save(datasetDTO);
|
||||
return OptResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据集
|
||||
* @param datasetEntity
|
||||
* @return
|
||||
*/
|
||||
@PutMapping
|
||||
public OptResult update(@RequestBody DatasetEntity datasetEntity){
|
||||
log.info("修改数据集",datasetEntity);
|
||||
datasetService.update(datasetEntity);
|
||||
return OptResult.success();
|
||||
}
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user