feat(数据集): 添加DB,DB curd

This commit is contained in:
junjie
2021-02-23 18:23:56 +08:00
parent 318ff15944
commit 73bf229464
18 changed files with 1448 additions and 28 deletions

View File

@@ -0,0 +1,45 @@
package io.dataease.controller.dataset;
import io.dataease.base.domain.DatasetTable;
import io.dataease.controller.request.dataset.DataSetTableRequest;
import io.dataease.service.dataset.DataSetTableService;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* @Author gin
* @Date 2021/2/20 8:29 下午
*/
@RestController
@RequestMapping("dataset/table")
public class DataSetTableController {
@Resource
private DataSetTableService dataSetTableService;
@PostMapping("batchAdd")
public void batchAdd(@RequestBody List<DatasetTable> datasetTable) {
dataSetTableService.batchInsert(datasetTable);
}
@PostMapping("update")
public DatasetTable save(@RequestBody DatasetTable datasetTable) {
return dataSetTableService.save(datasetTable);
}
@PostMapping("delete/{id}")
public void delete(@PathVariable String id) {
dataSetTableService.delete(id);
}
@PostMapping("list")
public List<DatasetTable> list(@RequestBody DataSetTableRequest dataSetTableRequest) {
return dataSetTableService.list(dataSetTableRequest);
}
@PostMapping("get/{id}")
public DatasetTable get(@PathVariable String id) {
return dataSetTableService.get(id);
}
}