添加字段和表
parent
74a444de38
commit
ece2b0c5ac
|
@ -31,7 +31,7 @@ public class TaskInput extends BaseEntity {
|
|||
/**
|
||||
* 节点id
|
||||
*/
|
||||
private Integer nodeId;
|
||||
private Long nodeId;
|
||||
|
||||
/**
|
||||
* 节点名称
|
||||
|
|
|
@ -18,7 +18,7 @@ public class InputAddReq {
|
|||
/**
|
||||
* 节点id
|
||||
*/
|
||||
private Integer nodeId;
|
||||
private Long nodeId;
|
||||
|
||||
/**
|
||||
* 节点名称
|
||||
|
|
|
@ -15,7 +15,7 @@ public class TaskInputUpdReq {
|
|||
/**
|
||||
* 节点id
|
||||
*/
|
||||
private Integer nodeId;
|
||||
private Long nodeId;
|
||||
|
||||
/**
|
||||
* 节点名称
|
||||
|
|
|
@ -20,7 +20,7 @@ public class TaskInputResp {
|
|||
/**
|
||||
* 节点id
|
||||
*/
|
||||
private Integer nodeId;
|
||||
private Long nodeId;
|
||||
|
||||
/**
|
||||
* 节点名称
|
||||
|
|
|
@ -16,12 +16,12 @@ public class TableVo {
|
|||
/**
|
||||
* 表字段
|
||||
*/
|
||||
private String tableFieId;
|
||||
private String columnName;
|
||||
|
||||
/**
|
||||
* 表字段别名
|
||||
*/
|
||||
private String tableAsFieId;
|
||||
private String tableAsName;
|
||||
/**
|
||||
* 字段规则
|
||||
*/
|
||||
|
|
|
@ -14,21 +14,19 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Administrator
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("node")
|
||||
@RequestMapping("TaskInput")
|
||||
public class TaskInputController {
|
||||
|
||||
@Autowired
|
||||
private TaskInputService taskInputService;
|
||||
|
||||
@Autowired
|
||||
private StructureService structureService;
|
||||
|
||||
/**
|
||||
* 获取所有的任务信息
|
||||
*
|
||||
|
@ -50,7 +48,10 @@ public class TaskInputController {
|
|||
*/
|
||||
@PostMapping()
|
||||
@Operation(summary = "添加节点", description = "添加任务信息表")
|
||||
public Result save(@RequestBody @Validated InputAddReq req) {
|
||||
public Result save(@RequestBody InputAddReq req) {
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("node_id",req.getNodeId());
|
||||
taskInputService.removeByMap(map);
|
||||
List<TableVo> list = req.getList();
|
||||
List<TaskInput> inputs = list.stream().map(inputAddReq -> {
|
||||
TaskInput build = TaskInput.builder()
|
||||
|
@ -60,8 +61,8 @@ public class TaskInputController {
|
|||
.databaseId(req.getDatabaseId())
|
||||
.tableName(req.getTableName())
|
||||
.tableAsName(req.getTableAsName())
|
||||
.tableFieId(inputAddReq.getTableFieId())
|
||||
.tableAsFieId(inputAddReq.getTableAsFieId())
|
||||
.tableFieId(inputAddReq.getColumnName())
|
||||
.tableAsFieId(inputAddReq.getTableAsName())
|
||||
.fieIdAsEngineId(inputAddReq.getFieIdAsEngineId())
|
||||
.build();
|
||||
return build;
|
||||
|
|
Loading…
Reference in New Issue