Commit db2763e4 authored by zhuxiang's avatar zhuxiang
Browse files

增加更新节点接口

parent 05bcfa64
......@@ -97,4 +97,9 @@ public class CaseController extends BaseController {
public Result updateMerchantToPerson(@RequestBody UserDTO userDTO) {
return Result.data(caseService.updateMerchantToPerson(userDTO));
}
@PutMapping("/detail/updateNode")
public Result updateNode(@RequestBody CaseDTO caseDTO) {
return toAjax(caseService.updateNode(caseDTO));
}
}
package com.platform.model.dto;
import com.platform.model.entity.CasesEntity;
import com.platform.model.entity.NodeEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
import java.util.List;
/**
* @author : wujipeng
......@@ -45,4 +47,6 @@ public class CaseDTO extends CasesEntity {
private String label;
private String nodeType;
private List<NodeEntity> nodeList;
}
......@@ -15,4 +15,8 @@ public class NodeEntity {
private int caseId;
private String node;
private String x;
private String y;
}
......@@ -80,4 +80,6 @@ public interface CasesService extends IService<CasesEntity> {
boolean updateUserUse(ExcelDataDTO excelDataDTO);
boolean updateMerchantToPerson(UserDTO userDTO);
boolean updateNode(CaseDTO caseDTO);
}
......@@ -450,6 +450,19 @@ public class CaseServiceImpl extends ServiceImpl<CaseMapper, CasesEntity> implem
return false;
}
@Override
public boolean updateNode(CaseDTO caseDTO) {
//查看案例信息
CasesEntity casesEntity = getById((caseDTO.getId()));
if (casesEntity == null) {
return false;
}
nodeService.updateBatchById(caseDTO.getNodeList());
//更新案例画布
casesEntity.setDrawFlag(true);
return updateById(casesEntity);
}
@Override
public List<NodeVO> info(CaseDTO caseDTO) {
// 使用Set去重
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment