话术修改
This commit is contained in:
parent
3bd440f3ea
commit
901776ce41
@ -9,6 +9,7 @@ import com.xinelu.common.enums.BusinessType;
|
||||
import com.xinelu.common.utils.poi.ExcelUtil;
|
||||
import com.xinelu.manage.domain.scriptInfo.ScriptInfo;
|
||||
import com.xinelu.manage.service.scriptInfo.IScriptInfoService;
|
||||
import com.xinelu.manage.vo.scriptInfo.ScriptVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@ -70,7 +71,7 @@ public class ScriptInfoController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增话术信息
|
||||
* 新增话术列表信息
|
||||
*/
|
||||
@ApiOperation("新增话术信息")
|
||||
@PreAuthorize("@ss.hasPermi('manage:script:add')")
|
||||
@ -80,6 +81,11 @@ public class ScriptInfoController extends BaseController {
|
||||
return toAjax(scriptInfoService.insertScriptInfo(scriptInfo));
|
||||
}
|
||||
|
||||
@PostMapping("/insertScriptEdgeNode")
|
||||
public AjaxResult insertScriptEdgeNode(@RequestBody ScriptVO scriptVO) {
|
||||
return scriptInfoService.insertScriptEdgeNode(scriptVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改话术信息
|
||||
*/
|
||||
|
||||
@ -0,0 +1,91 @@
|
||||
package com.xinelu.manage.controller.scriptinfoedge;
|
||||
|
||||
import com.xinelu.common.annotation.Log;
|
||||
import com.xinelu.common.core.controller.BaseController;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.core.page.TableDataInfo;
|
||||
import com.xinelu.common.enums.BusinessType;
|
||||
import com.xinelu.common.utils.poi.ExcelUtil;
|
||||
import com.xinelu.manage.domain.scriptinfoedge.ScriptInfoEdge;
|
||||
import com.xinelu.manage.service.scriptinfoedge.IScriptInfoEdgeService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 话术信息分支Controller
|
||||
*
|
||||
* @author xinelu
|
||||
* @date 2024-06-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/edge")
|
||||
public class ScriptInfoEdgeController extends BaseController {
|
||||
@Resource
|
||||
private IScriptInfoEdgeService scriptInfoEdgeService;
|
||||
|
||||
/**
|
||||
* 查询话术信息分支列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:edge:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ScriptInfoEdge scriptInfoEdge) {
|
||||
startPage();
|
||||
List<ScriptInfoEdge> list = scriptInfoEdgeService.selectScriptInfoEdgeList(scriptInfoEdge);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出话术信息分支列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:edge:export')")
|
||||
@Log(title = "话术信息分支", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ScriptInfoEdge scriptInfoEdge) {
|
||||
List<ScriptInfoEdge> list = scriptInfoEdgeService.selectScriptInfoEdgeList(scriptInfoEdge);
|
||||
ExcelUtil<ScriptInfoEdge> util = new ExcelUtil<>(ScriptInfoEdge.class);
|
||||
util.exportExcel(response, list, "话术信息分支数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取话术信息分支详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:edge:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(scriptInfoEdgeService.selectScriptInfoEdgeById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增话术信息分支
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:edge:add')")
|
||||
@Log(title = "话术信息分支", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ScriptInfoEdge scriptInfoEdge) {
|
||||
return toAjax(scriptInfoEdgeService.insertScriptInfoEdge(scriptInfoEdge));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改话术信息分支
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:edge:edit')")
|
||||
@Log(title = "话术信息分支", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ScriptInfoEdge scriptInfoEdge) {
|
||||
return toAjax(scriptInfoEdgeService.updateScriptInfoEdge(scriptInfoEdge));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除话术信息分支
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:edge:remove')")
|
||||
@Log(title = "话术信息分支", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(scriptInfoEdgeService.deleteScriptInfoEdgeByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,91 @@
|
||||
package com.xinelu.manage.controller.scriptinfonode;
|
||||
|
||||
import com.xinelu.common.annotation.Log;
|
||||
import com.xinelu.common.core.controller.BaseController;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.core.page.TableDataInfo;
|
||||
import com.xinelu.common.enums.BusinessType;
|
||||
import com.xinelu.common.utils.poi.ExcelUtil;
|
||||
import com.xinelu.manage.domain.scriptinfonode.ScriptInfoNode;
|
||||
import com.xinelu.manage.service.scriptinfonode.IScriptInfoNodeService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 话术信息节点Controller
|
||||
*
|
||||
* @author xinelu
|
||||
* @date 2024-06-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/node")
|
||||
public class ScriptInfoNodeController extends BaseController {
|
||||
@Resource
|
||||
private IScriptInfoNodeService scriptInfoNodeService;
|
||||
|
||||
/**
|
||||
* 查询话术信息节点列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:node:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ScriptInfoNode scriptInfoNode) {
|
||||
startPage();
|
||||
List<ScriptInfoNode> list = scriptInfoNodeService.selectScriptInfoNodeList(scriptInfoNode);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出话术信息节点列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:node:export')")
|
||||
@Log(title = "话术信息节点", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ScriptInfoNode scriptInfoNode) {
|
||||
List<ScriptInfoNode> list = scriptInfoNodeService.selectScriptInfoNodeList(scriptInfoNode);
|
||||
ExcelUtil<ScriptInfoNode> util = new ExcelUtil<>(ScriptInfoNode.class);
|
||||
util.exportExcel(response, list, "话术信息节点数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取话术信息节点详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:node:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(scriptInfoNodeService.selectScriptInfoNodeById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增话术信息节点
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:node:add')")
|
||||
@Log(title = "话术信息节点", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ScriptInfoNode scriptInfoNode) {
|
||||
return toAjax(scriptInfoNodeService.insertScriptInfoNode(scriptInfoNode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改话术信息节点
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:node:edit')")
|
||||
@Log(title = "话术信息节点", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ScriptInfoNode scriptInfoNode) {
|
||||
return toAjax(scriptInfoNodeService.updateScriptInfoNode(scriptInfoNode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除话术信息节点
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:node:remove')")
|
||||
@Log(title = "话术信息节点", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(scriptInfoNodeService.deleteScriptInfoNodeByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -133,6 +133,7 @@ public class ScriptInfo extends BaseEntity {
|
||||
@ApiModelProperty(value = "话术图片文件路径")
|
||||
private String scriptFilePath;
|
||||
|
||||
private String flowScheme;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
@ -0,0 +1,109 @@
|
||||
package com.xinelu.manage.domain.scriptinfoedge;
|
||||
|
||||
import com.xinelu.common.annotation.Excel;
|
||||
import com.xinelu.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 话术信息分支对象 script_info_edge
|
||||
*
|
||||
* @author xinelu
|
||||
* @date 2024-06-12
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "话术信息分支对象", description = "script_info_edge")
|
||||
public class ScriptInfoEdge extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 话术信息表id
|
||||
*/
|
||||
@ApiModelProperty(value = "话术信息表id")
|
||||
@Excel(name = "话术信息表id")
|
||||
private Long scriptInfoId;
|
||||
|
||||
/**
|
||||
* 分支名称
|
||||
*/
|
||||
@ApiModelProperty(value = "分支名称")
|
||||
@Excel(name = "分支名称")
|
||||
private String scriptEdgeName;
|
||||
|
||||
/**
|
||||
* 开始节点id
|
||||
*/
|
||||
@ApiModelProperty(value = "开始节点id")
|
||||
@Excel(name = "开始节点id")
|
||||
private Long startNodeId;
|
||||
|
||||
/**
|
||||
* 开始节点名称
|
||||
*/
|
||||
@ApiModelProperty(value = "开始节点名称")
|
||||
@Excel(name = "开始节点名称")
|
||||
private String startNodeName;
|
||||
|
||||
/**
|
||||
* 结束节点id
|
||||
*/
|
||||
@ApiModelProperty(value = "结束节点id")
|
||||
@Excel(name = "结束节点id")
|
||||
private Long endNodeId;
|
||||
|
||||
/**
|
||||
* 结束节点名称
|
||||
*/
|
||||
@ApiModelProperty(value = "结束节点名称")
|
||||
@Excel(name = "结束节点名称")
|
||||
private String endNodeName;
|
||||
|
||||
/**
|
||||
* 条件
|
||||
*/
|
||||
@ApiModelProperty(value = "条件")
|
||||
@Excel(name = "条件")
|
||||
private String condition;
|
||||
|
||||
/**
|
||||
* 回答关键词,多个用逗号隔开
|
||||
*/
|
||||
@ApiModelProperty(value = "回答关键词,多个用逗号隔开")
|
||||
@Excel(name = "回答关键词,多个用逗号隔开")
|
||||
private String keywords;
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("scriptInfoId", getScriptInfoId())
|
||||
.append("scriptEdgeName", getScriptEdgeName())
|
||||
.append("startNodeId", getStartNodeId())
|
||||
.append("startNodeName", getStartNodeName())
|
||||
.append("endNodeId", getEndNodeId())
|
||||
.append("endNodeName", getEndNodeName())
|
||||
.append("condition", getCondition())
|
||||
.append("keywords", getKeywords())
|
||||
.append("remark", getRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,77 @@
|
||||
package com.xinelu.manage.domain.scriptinfonode;
|
||||
|
||||
import com.xinelu.common.annotation.Excel;
|
||||
import com.xinelu.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 话术信息节点对象 script_info_node
|
||||
*
|
||||
* @author xinelu
|
||||
* @date 2024-06-12
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "话术信息节点对象", description = "script_info_node")
|
||||
public class ScriptInfoNode extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 话术信息表id
|
||||
*/
|
||||
@ApiModelProperty(value = "话术信息表id")
|
||||
@Excel(name = "话术信息表id")
|
||||
private Long scriptInfoId;
|
||||
|
||||
/**
|
||||
* 话术节点名称
|
||||
*/
|
||||
@ApiModelProperty(value = "话术节点名称")
|
||||
@Excel(name = "话术节点名称")
|
||||
private String scriptNodeName;
|
||||
|
||||
/**
|
||||
* 话术内容
|
||||
*/
|
||||
@ApiModelProperty(value = "话术内容")
|
||||
@Excel(name = "话术内容")
|
||||
private String scriptContent;
|
||||
|
||||
/**
|
||||
* 话术节点类型(起点:START_NODE,终点:END_NODE)
|
||||
*/
|
||||
@ApiModelProperty(value = "话术节点类型")
|
||||
@Excel(name = "话术节点类型", readConverterExp = "起=点:START_NODE,终点:END_NODE")
|
||||
private String scriptNodeType;
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("scriptInfoId", getScriptInfoId())
|
||||
.append("scriptNodeName", getScriptNodeName())
|
||||
.append("scriptContent", getScriptContent())
|
||||
.append("scriptNodeType", getScriptNodeType())
|
||||
.append("remark", getRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,63 @@
|
||||
package com.xinelu.manage.mapper.scriptinfoedge;
|
||||
|
||||
import com.xinelu.manage.domain.scriptinfoedge.ScriptInfoEdge;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 话术信息分支Mapper接口
|
||||
*
|
||||
* @author xinelu
|
||||
* @date 2024-06-12
|
||||
*/
|
||||
public interface ScriptInfoEdgeMapper {
|
||||
/**
|
||||
* 查询话术信息分支
|
||||
*
|
||||
* @param id 话术信息分支主键
|
||||
* @return 话术信息分支
|
||||
*/
|
||||
ScriptInfoEdge selectScriptInfoEdgeById(Long id);
|
||||
|
||||
/**
|
||||
* 查询话术信息分支列表
|
||||
*
|
||||
* @param scriptInfoEdge 话术信息分支
|
||||
* @return 话术信息分支集合
|
||||
*/
|
||||
List<ScriptInfoEdge> selectScriptInfoEdgeList(ScriptInfoEdge scriptInfoEdge);
|
||||
|
||||
/**
|
||||
* 新增话术信息分支
|
||||
*
|
||||
* @param scriptInfoEdge 话术信息分支
|
||||
* @return 结果
|
||||
*/
|
||||
int insertScriptInfoEdge(ScriptInfoEdge scriptInfoEdge);
|
||||
|
||||
/**
|
||||
* 修改话术信息分支
|
||||
*
|
||||
* @param scriptInfoEdge 话术信息分支
|
||||
* @return 结果
|
||||
*/
|
||||
int updateScriptInfoEdge(ScriptInfoEdge scriptInfoEdge);
|
||||
|
||||
/**
|
||||
* 删除话术信息分支
|
||||
*
|
||||
* @param id 话术信息分支主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteScriptInfoEdgeById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除话术信息分支
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteScriptInfoEdgeByIds(Long[] ids);
|
||||
|
||||
int insertScriptInfoEdgeList(List<ScriptInfoEdge> scriptInfoEdges);
|
||||
}
|
||||
@ -0,0 +1,64 @@
|
||||
package com.xinelu.manage.mapper.scriptinfonode;
|
||||
|
||||
import com.xinelu.manage.domain.scriptinfonode.ScriptInfoNode;
|
||||
import com.xinelu.manage.vo.scriptInfo.Node;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 话术信息节点Mapper接口
|
||||
*
|
||||
* @author xinelu
|
||||
* @date 2024-06-12
|
||||
*/
|
||||
public interface ScriptInfoNodeMapper {
|
||||
/**
|
||||
* 查询话术信息节点
|
||||
*
|
||||
* @param id 话术信息节点主键
|
||||
* @return 话术信息节点
|
||||
*/
|
||||
ScriptInfoNode selectScriptInfoNodeById(Long id);
|
||||
|
||||
/**
|
||||
* 查询话术信息节点列表
|
||||
*
|
||||
* @param scriptInfoNode 话术信息节点
|
||||
* @return 话术信息节点集合
|
||||
*/
|
||||
List<ScriptInfoNode> selectScriptInfoNodeList(ScriptInfoNode scriptInfoNode);
|
||||
|
||||
/**
|
||||
* 新增话术信息节点
|
||||
*
|
||||
* @param scriptInfoNode 话术信息节点
|
||||
* @return 结果
|
||||
*/
|
||||
int insertScriptInfoNode(ScriptInfoNode scriptInfoNode);
|
||||
|
||||
/**
|
||||
* 修改话术信息节点
|
||||
*
|
||||
* @param scriptInfoNode 话术信息节点
|
||||
* @return 结果
|
||||
*/
|
||||
int updateScriptInfoNode(ScriptInfoNode scriptInfoNode);
|
||||
|
||||
/**
|
||||
* 删除话术信息节点
|
||||
*
|
||||
* @param id 话术信息节点主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteScriptInfoNodeById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除话术信息节点
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteScriptInfoNodeByIds(Long[] ids);
|
||||
|
||||
int insertScriptInfoNodeList(List<Node> scriptInfoNodes);
|
||||
}
|
||||
@ -2,6 +2,7 @@ package com.xinelu.manage.service.scriptInfo;
|
||||
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.manage.domain.scriptInfo.ScriptInfo;
|
||||
import com.xinelu.manage.vo.scriptInfo.ScriptVO;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
@ -37,6 +38,8 @@ public interface IScriptInfoService {
|
||||
*/
|
||||
public int insertScriptInfo(ScriptInfo scriptInfo);
|
||||
|
||||
AjaxResult insertScriptEdgeNode(ScriptVO scriptVO);
|
||||
|
||||
/**
|
||||
* 修改话术信息
|
||||
*
|
||||
|
||||
@ -9,8 +9,14 @@ import com.xinelu.common.utils.file.FileUploadUtils;
|
||||
import com.xinelu.common.utils.file.MimeTypeUtils;
|
||||
import com.xinelu.common.utils.uuid.IdUtils;
|
||||
import com.xinelu.manage.domain.scriptInfo.ScriptInfo;
|
||||
import com.xinelu.manage.domain.scriptinfoedge.ScriptInfoEdge;
|
||||
import com.xinelu.manage.mapper.scriptInfo.ScriptInfoMapper;
|
||||
import com.xinelu.manage.mapper.scriptinfoedge.ScriptInfoEdgeMapper;
|
||||
import com.xinelu.manage.mapper.scriptinfonode.ScriptInfoNodeMapper;
|
||||
import com.xinelu.manage.service.scriptInfo.IScriptInfoService;
|
||||
import com.xinelu.manage.vo.scriptInfo.Edge;
|
||||
import com.xinelu.manage.vo.scriptInfo.Node;
|
||||
import com.xinelu.manage.vo.scriptInfo.ScriptVO;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@ -18,7 +24,9 @@ import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 话术信息Service业务层处理
|
||||
@ -34,6 +42,12 @@ public class ScriptInfoServiceImpl implements IScriptInfoService {
|
||||
@Resource
|
||||
private SystemBusinessConfig systemBusinessConfig;
|
||||
|
||||
@Resource
|
||||
private ScriptInfoEdgeMapper scriptInfoEdgeMapper;
|
||||
|
||||
@Resource
|
||||
private ScriptInfoNodeMapper scriptInfoNodeMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 查询话术信息
|
||||
@ -78,6 +92,52 @@ public class ScriptInfoServiceImpl implements IScriptInfoService {
|
||||
return scriptInfoMapper.insertScriptInfo(scriptInfo);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public AjaxResult insertScriptEdgeNode(ScriptVO scriptVO) {
|
||||
ScriptInfo scriptInfo = new ScriptInfo();
|
||||
scriptInfo.setId(scriptVO.getScriptInfoId());
|
||||
scriptInfo.setFlowScheme(scriptVO.getFlowScheme());
|
||||
scriptInfo.setUpdateBy(SecurityUtils.getUsername());
|
||||
scriptInfo.setUpdateTime(LocalDateTime.now());
|
||||
int i = scriptInfoMapper.updateScriptInfo(scriptInfo);
|
||||
if (i <= 0) {
|
||||
return AjaxResult.error("新增话术图失败!");
|
||||
}
|
||||
List<Node> scriptInfoNodes = scriptVO.getNodes();
|
||||
List<ScriptInfoEdge> scriptInfoEdges = new ArrayList<>();
|
||||
for (Node node : scriptVO.getNodes()) {
|
||||
node.setScriptInfoId(scriptVO.getScriptInfoId());
|
||||
node.setScriptNodeName(node.getLabel());
|
||||
node.setScriptContent(node.getLabel());
|
||||
node.setScriptNodeType(node.getType());
|
||||
node.setCreateBy(SecurityUtils.getUsername());
|
||||
node.setCreateTime(LocalDateTime.now());
|
||||
}
|
||||
int i1 = scriptInfoNodeMapper.insertScriptInfoNodeList(scriptInfoNodes);
|
||||
if (i1 <= 0) {
|
||||
return AjaxResult.error("新增话术图失败!");
|
||||
}
|
||||
for (Edge edge : scriptVO.getEdges()) {
|
||||
ScriptInfoEdge scriptInfoEdge = new ScriptInfoEdge();
|
||||
scriptInfoEdge.setKeywords(edge.getKeyword());
|
||||
Node node = scriptInfoNodes.stream().filter(Objects::nonNull).filter(item -> Objects.nonNull(item.getCode()) && edge.getSource().equals(item.getCode())).findFirst().orElse(new Node());
|
||||
scriptInfoEdge.setStartNodeId(node.getId());
|
||||
scriptInfoEdge.setStartNodeName(node.getLabel());
|
||||
Node node2 = scriptInfoNodes.stream().filter(Objects::nonNull).filter(item -> Objects.nonNull(item.getCode()) && edge.getTarget().equals(item.getCode())).findFirst().orElse(new Node());
|
||||
scriptInfoEdge.setEndNodeId(node2.getId());
|
||||
scriptInfoEdge.setEndNodeName(node2.getLabel());
|
||||
scriptInfoEdge.setScriptInfoId(scriptVO.getScriptInfoId());
|
||||
scriptInfoEdge.setScriptEdgeName(edge.getLabel());
|
||||
scriptInfoEdges.add(scriptInfoEdge);
|
||||
}
|
||||
int i2 = scriptInfoEdgeMapper.insertScriptInfoEdgeList(scriptInfoEdges);
|
||||
if (i2 <= 0) {
|
||||
return AjaxResult.error("新增话术图失败!");
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改话术信息
|
||||
*
|
||||
|
||||
@ -0,0 +1,61 @@
|
||||
package com.xinelu.manage.service.scriptinfoedge;
|
||||
|
||||
import com.xinelu.manage.domain.scriptinfoedge.ScriptInfoEdge;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 话术信息分支Service接口
|
||||
*
|
||||
* @author xinelu
|
||||
* @date 2024-06-12
|
||||
*/
|
||||
public interface IScriptInfoEdgeService {
|
||||
/**
|
||||
* 查询话术信息分支
|
||||
*
|
||||
* @param id 话术信息分支主键
|
||||
* @return 话术信息分支
|
||||
*/
|
||||
ScriptInfoEdge selectScriptInfoEdgeById(Long id);
|
||||
|
||||
/**
|
||||
* 查询话术信息分支列表
|
||||
*
|
||||
* @param scriptInfoEdge 话术信息分支
|
||||
* @return 话术信息分支集合
|
||||
*/
|
||||
List<ScriptInfoEdge> selectScriptInfoEdgeList(ScriptInfoEdge scriptInfoEdge);
|
||||
|
||||
/**
|
||||
* 新增话术信息分支
|
||||
*
|
||||
* @param scriptInfoEdge 话术信息分支
|
||||
* @return 结果
|
||||
*/
|
||||
int insertScriptInfoEdge(ScriptInfoEdge scriptInfoEdge);
|
||||
|
||||
/**
|
||||
* 修改话术信息分支
|
||||
*
|
||||
* @param scriptInfoEdge 话术信息分支
|
||||
* @return 结果
|
||||
*/
|
||||
int updateScriptInfoEdge(ScriptInfoEdge scriptInfoEdge);
|
||||
|
||||
/**
|
||||
* 批量删除话术信息分支
|
||||
*
|
||||
* @param ids 需要删除的话术信息分支主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteScriptInfoEdgeByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除话术信息分支信息
|
||||
*
|
||||
* @param id 话术信息分支主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteScriptInfoEdgeById(Long id);
|
||||
}
|
||||
@ -0,0 +1,90 @@
|
||||
package com.xinelu.manage.service.scriptinfoedge.impl;
|
||||
|
||||
import com.xinelu.manage.domain.scriptinfoedge.ScriptInfoEdge;
|
||||
import com.xinelu.manage.mapper.scriptinfoedge.ScriptInfoEdgeMapper;
|
||||
import com.xinelu.manage.service.scriptinfoedge.IScriptInfoEdgeService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 话术信息分支Service业务层处理
|
||||
*
|
||||
* @author xinelu
|
||||
* @date 2024-06-12
|
||||
*/
|
||||
@Service
|
||||
public class ScriptInfoEdgeServiceImpl implements IScriptInfoEdgeService {
|
||||
@Resource
|
||||
private ScriptInfoEdgeMapper scriptInfoEdgeMapper;
|
||||
|
||||
/**
|
||||
* 查询话术信息分支
|
||||
*
|
||||
* @param id 话术信息分支主键
|
||||
* @return 话术信息分支
|
||||
*/
|
||||
@Override
|
||||
public ScriptInfoEdge selectScriptInfoEdgeById(Long id) {
|
||||
return scriptInfoEdgeMapper.selectScriptInfoEdgeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询话术信息分支列表
|
||||
*
|
||||
* @param scriptInfoEdge 话术信息分支
|
||||
* @return 话术信息分支
|
||||
*/
|
||||
@Override
|
||||
public List<ScriptInfoEdge> selectScriptInfoEdgeList(ScriptInfoEdge scriptInfoEdge) {
|
||||
return scriptInfoEdgeMapper.selectScriptInfoEdgeList(scriptInfoEdge);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增话术信息分支
|
||||
*
|
||||
* @param scriptInfoEdge 话术信息分支
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertScriptInfoEdge(ScriptInfoEdge scriptInfoEdge) {
|
||||
scriptInfoEdge.setCreateTime(LocalDateTime.now());
|
||||
return scriptInfoEdgeMapper.insertScriptInfoEdge(scriptInfoEdge);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改话术信息分支
|
||||
*
|
||||
* @param scriptInfoEdge 话术信息分支
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateScriptInfoEdge(ScriptInfoEdge scriptInfoEdge) {
|
||||
scriptInfoEdge.setUpdateTime(LocalDateTime.now());
|
||||
return scriptInfoEdgeMapper.updateScriptInfoEdge(scriptInfoEdge);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除话术信息分支
|
||||
*
|
||||
* @param ids 需要删除的话术信息分支主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteScriptInfoEdgeByIds(Long[] ids) {
|
||||
return scriptInfoEdgeMapper.deleteScriptInfoEdgeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除话术信息分支信息
|
||||
*
|
||||
* @param id 话术信息分支主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteScriptInfoEdgeById(Long id) {
|
||||
return scriptInfoEdgeMapper.deleteScriptInfoEdgeById(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.xinelu.manage.service.scriptinfonode;
|
||||
|
||||
import com.xinelu.manage.domain.scriptinfonode.ScriptInfoNode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 话术信息节点Service接口
|
||||
*
|
||||
* @author xinelu
|
||||
* @date 2024-06-12
|
||||
*/
|
||||
public interface IScriptInfoNodeService {
|
||||
/**
|
||||
* 查询话术信息节点
|
||||
*
|
||||
* @param id 话术信息节点主键
|
||||
* @return 话术信息节点
|
||||
*/
|
||||
ScriptInfoNode selectScriptInfoNodeById(Long id);
|
||||
|
||||
/**
|
||||
* 查询话术信息节点列表
|
||||
*
|
||||
* @param scriptInfoNode 话术信息节点
|
||||
* @return 话术信息节点集合
|
||||
*/
|
||||
List<ScriptInfoNode> selectScriptInfoNodeList(ScriptInfoNode scriptInfoNode);
|
||||
|
||||
/**
|
||||
* 新增话术信息节点
|
||||
*
|
||||
* @param scriptInfoNode 话术信息节点
|
||||
* @return 结果
|
||||
*/
|
||||
int insertScriptInfoNode(ScriptInfoNode scriptInfoNode);
|
||||
|
||||
/**
|
||||
* 修改话术信息节点
|
||||
*
|
||||
* @param scriptInfoNode 话术信息节点
|
||||
* @return 结果
|
||||
*/
|
||||
int updateScriptInfoNode(ScriptInfoNode scriptInfoNode);
|
||||
|
||||
/**
|
||||
* 批量删除话术信息节点
|
||||
*
|
||||
* @param ids 需要删除的话术信息节点主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteScriptInfoNodeByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除话术信息节点信息
|
||||
*
|
||||
* @param id 话术信息节点主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteScriptInfoNodeById(Long id);
|
||||
}
|
||||
@ -0,0 +1,90 @@
|
||||
package com.xinelu.manage.service.scriptinfonode.impl;
|
||||
|
||||
import com.xinelu.manage.domain.scriptinfonode.ScriptInfoNode;
|
||||
import com.xinelu.manage.mapper.scriptinfonode.ScriptInfoNodeMapper;
|
||||
import com.xinelu.manage.service.scriptinfonode.IScriptInfoNodeService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 话术信息节点Service业务层处理
|
||||
*
|
||||
* @author xinelu
|
||||
* @date 2024-06-12
|
||||
*/
|
||||
@Service
|
||||
public class ScriptInfoNodeServiceImpl implements IScriptInfoNodeService {
|
||||
@Resource
|
||||
private ScriptInfoNodeMapper scriptInfoNodeMapper;
|
||||
|
||||
/**
|
||||
* 查询话术信息节点
|
||||
*
|
||||
* @param id 话术信息节点主键
|
||||
* @return 话术信息节点
|
||||
*/
|
||||
@Override
|
||||
public ScriptInfoNode selectScriptInfoNodeById(Long id) {
|
||||
return scriptInfoNodeMapper.selectScriptInfoNodeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询话术信息节点列表
|
||||
*
|
||||
* @param scriptInfoNode 话术信息节点
|
||||
* @return 话术信息节点
|
||||
*/
|
||||
@Override
|
||||
public List<ScriptInfoNode> selectScriptInfoNodeList(ScriptInfoNode scriptInfoNode) {
|
||||
return scriptInfoNodeMapper.selectScriptInfoNodeList(scriptInfoNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增话术信息节点
|
||||
*
|
||||
* @param scriptInfoNode 话术信息节点
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertScriptInfoNode(ScriptInfoNode scriptInfoNode) {
|
||||
scriptInfoNode.setCreateTime(LocalDateTime.now());
|
||||
return scriptInfoNodeMapper.insertScriptInfoNode(scriptInfoNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改话术信息节点
|
||||
*
|
||||
* @param scriptInfoNode 话术信息节点
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateScriptInfoNode(ScriptInfoNode scriptInfoNode) {
|
||||
scriptInfoNode.setUpdateTime(LocalDateTime.now());
|
||||
return scriptInfoNodeMapper.updateScriptInfoNode(scriptInfoNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除话术信息节点
|
||||
*
|
||||
* @param ids 需要删除的话术信息节点主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteScriptInfoNodeByIds(Long[] ids) {
|
||||
return scriptInfoNodeMapper.deleteScriptInfoNodeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除话术信息节点信息
|
||||
*
|
||||
* @param id 话术信息节点主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteScriptInfoNodeById(Long id) {
|
||||
return scriptInfoNodeMapper.deleteScriptInfoNodeById(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
package com.xinelu.manage.vo.scriptInfo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 话术信息分支表VO
|
||||
*/
|
||||
@Data
|
||||
public class Edge {
|
||||
|
||||
private String color;
|
||||
|
||||
private String code;
|
||||
|
||||
private String index;
|
||||
|
||||
private String keyword;
|
||||
|
||||
private String label;
|
||||
|
||||
private String shape;
|
||||
|
||||
private String source;
|
||||
|
||||
private String sourceAnchor;
|
||||
|
||||
private String target;
|
||||
|
||||
private String targetAnchor;
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
package com.xinelu.manage.vo.scriptInfo;
|
||||
|
||||
import com.xinelu.manage.domain.scriptinfonode.ScriptInfoNode;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class Node extends ScriptInfoNode {
|
||||
|
||||
private String color;
|
||||
|
||||
private String code;
|
||||
|
||||
private String index;
|
||||
|
||||
private String label;
|
||||
|
||||
private String size;
|
||||
|
||||
private String type;
|
||||
|
||||
private String x;
|
||||
|
||||
private String y;
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
package com.xinelu.manage.vo.scriptInfo;
|
||||
|
||||
import com.xinelu.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 话术信息对象 script_info
|
||||
*
|
||||
* @author xinelu
|
||||
* @date 2024-02-26
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class ScriptVO extends BaseEntity {
|
||||
|
||||
private Long scriptInfoId;
|
||||
|
||||
private List<Edge> edges;
|
||||
|
||||
private List<Node> nodes;
|
||||
|
||||
private String flowScheme;
|
||||
}
|
||||
@ -0,0 +1,228 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.xinelu.manage.mapper.scriptinfoedge.ScriptInfoEdgeMapper">
|
||||
|
||||
<resultMap type="ScriptInfoEdge" id="ScriptInfoEdgeResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="scriptInfoId" column="script_info_id"/>
|
||||
<result property="scriptEdgeName" column="script_edge_name"/>
|
||||
<result property="startNodeId" column="start_node_id"/>
|
||||
<result property="startNodeName" column="start_node_name"/>
|
||||
<result property="endNodeId" column="end_node_id"/>
|
||||
<result property="endNodeName" column="end_node_name"/>
|
||||
<result property="condition" column="condition"/>
|
||||
<result property="keywords" column="keywords"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectScriptInfoEdgeVo">
|
||||
select id,
|
||||
script_info_id,
|
||||
script_edge_name,
|
||||
start_node_id,
|
||||
start_node_name,
|
||||
end_node_id,
|
||||
end_node_name,
|
||||
condition,
|
||||
keywords,
|
||||
remark,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time
|
||||
from script_info_edge
|
||||
</sql>
|
||||
|
||||
<select id="selectScriptInfoEdgeList" parameterType="ScriptInfoEdge" resultMap="ScriptInfoEdgeResult">
|
||||
<include refid="selectScriptInfoEdgeVo"/>
|
||||
<where>
|
||||
<if test="scriptInfoId != null ">
|
||||
and script_info_id = #{scriptInfoId}
|
||||
</if>
|
||||
<if test="scriptEdgeName != null and scriptEdgeName != ''">
|
||||
and script_edge_name like concat('%', #{scriptEdgeName}, '%')
|
||||
</if>
|
||||
<if test="startNodeId != null ">
|
||||
and start_node_id = #{startNodeId}
|
||||
</if>
|
||||
<if test="startNodeName != null and startNodeName != ''">
|
||||
and start_node_name like concat('%', #{startNodeName}, '%')
|
||||
</if>
|
||||
<if test="endNodeId != null ">
|
||||
and end_node_id = #{endNodeId}
|
||||
</if>
|
||||
<if test="endNodeName != null and endNodeName != ''">
|
||||
and end_node_name like concat('%', #{endNodeName}, '%')
|
||||
</if>
|
||||
<if test="condition != null and condition != ''">
|
||||
and condition = #{condition}
|
||||
</if>
|
||||
<if test="keywords != null and keywords != ''">
|
||||
and keywords = #{keywords}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectScriptInfoEdgeById" parameterType="Long"
|
||||
resultMap="ScriptInfoEdgeResult">
|
||||
<include refid="selectScriptInfoEdgeVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertScriptInfoEdge" parameterType="ScriptInfoEdge" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into script_info_edge
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="scriptInfoId != null">script_info_id,
|
||||
</if>
|
||||
<if test="scriptEdgeName != null">script_edge_name,
|
||||
</if>
|
||||
<if test="startNodeId != null">start_node_id,
|
||||
</if>
|
||||
<if test="startNodeName != null">start_node_name,
|
||||
</if>
|
||||
<if test="endNodeId != null">end_node_id,
|
||||
</if>
|
||||
<if test="endNodeName != null">end_node_name,
|
||||
</if>
|
||||
<if test="condition != null">condition,
|
||||
</if>
|
||||
<if test="keywords != null">keywords,
|
||||
</if>
|
||||
<if test="remark != null">remark,
|
||||
</if>
|
||||
<if test="createBy != null">create_by,
|
||||
</if>
|
||||
<if test="createTime != null">create_time,
|
||||
</if>
|
||||
<if test="updateBy != null">update_by,
|
||||
</if>
|
||||
<if test="updateTime != null">update_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="scriptInfoId != null">#{scriptInfoId},
|
||||
</if>
|
||||
<if test="scriptEdgeName != null">#{scriptEdgeName},
|
||||
</if>
|
||||
<if test="startNodeId != null">#{startNodeId},
|
||||
</if>
|
||||
<if test="startNodeName != null">#{startNodeName},
|
||||
</if>
|
||||
<if test="endNodeId != null">#{endNodeId},
|
||||
</if>
|
||||
<if test="endNodeName != null">#{endNodeName},
|
||||
</if>
|
||||
<if test="condition != null">#{condition},
|
||||
</if>
|
||||
<if test="keywords != null">#{keywords},
|
||||
</if>
|
||||
<if test="remark != null">#{remark},
|
||||
</if>
|
||||
<if test="createBy != null">#{createBy},
|
||||
</if>
|
||||
<if test="createTime != null">#{createTime},
|
||||
</if>
|
||||
<if test="updateBy != null">#{updateBy},
|
||||
</if>
|
||||
<if test="updateTime != null">#{updateTime},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateScriptInfoEdge" parameterType="ScriptInfoEdge">
|
||||
update script_info_edge
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="scriptInfoId != null">script_info_id =
|
||||
#{scriptInfoId},
|
||||
</if>
|
||||
<if test="scriptEdgeName != null">script_edge_name =
|
||||
#{scriptEdgeName},
|
||||
</if>
|
||||
<if test="startNodeId != null">start_node_id =
|
||||
#{startNodeId},
|
||||
</if>
|
||||
<if test="startNodeName != null">start_node_name =
|
||||
#{startNodeName},
|
||||
</if>
|
||||
<if test="endNodeId != null">end_node_id =
|
||||
#{endNodeId},
|
||||
</if>
|
||||
<if test="endNodeName != null">end_node_name =
|
||||
#{endNodeName},
|
||||
</if>
|
||||
<if test="condition != null">condition =
|
||||
#{condition},
|
||||
</if>
|
||||
<if test="keywords != null">keywords =
|
||||
#{keywords},
|
||||
</if>
|
||||
<if test="remark != null">remark =
|
||||
#{remark},
|
||||
</if>
|
||||
<if test="createBy != null">create_by =
|
||||
#{createBy},
|
||||
</if>
|
||||
<if test="createTime != null">create_time =
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="updateBy != null">update_by =
|
||||
#{updateBy},
|
||||
</if>
|
||||
<if test="updateTime != null">update_time =
|
||||
#{updateTime},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteScriptInfoEdgeById" parameterType="Long">
|
||||
delete
|
||||
from script_info_edge
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteScriptInfoEdgeByIds" parameterType="String">
|
||||
delete from script_info_edge where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="insertScriptInfoEdgeList" parameterType="java.util.List">
|
||||
insert into script_info_edge(
|
||||
script_info_id,
|
||||
script_edge_name,
|
||||
start_node_id,
|
||||
start_node_name,
|
||||
end_node_id,
|
||||
end_node_name,
|
||||
condition,
|
||||
keywords,
|
||||
remark,
|
||||
create_by,
|
||||
create_time
|
||||
)values
|
||||
<foreach item="scriptInfoEdges" index="index" collection="list" separator=",">
|
||||
(
|
||||
#{scriptInfoEdges.scriptInfoId},
|
||||
#{scriptInfoEdges.scriptEdgeName},
|
||||
#{scriptInfoEdges.startNodeId},
|
||||
#{scriptInfoEdges.startNodeName},
|
||||
#{scriptInfoEdges.endNodeId},
|
||||
#{scriptInfoEdges.endNodeName},
|
||||
#{scriptInfoEdges.condition},
|
||||
#{scriptInfoEdges.keywords},
|
||||
#{scriptInfoEdges.remark},
|
||||
#{scriptInfoEdges.createBy},
|
||||
#{scriptInfoEdges.createTime}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
@ -0,0 +1,172 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.xinelu.manage.mapper.scriptinfonode.ScriptInfoNodeMapper">
|
||||
|
||||
<resultMap type="ScriptInfoNode" id="ScriptInfoNodeResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="scriptInfoId" column="script_info_id"/>
|
||||
<result property="scriptNodeName" column="script_node_name"/>
|
||||
<result property="scriptContent" column="script_content"/>
|
||||
<result property="scriptNodeType" column="script_node_type"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectScriptInfoNodeVo">
|
||||
select id,
|
||||
script_info_id,
|
||||
script_node_name,
|
||||
script_content,
|
||||
script_node_type,
|
||||
remark,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time
|
||||
from script_info_node
|
||||
</sql>
|
||||
|
||||
<select id="selectScriptInfoNodeList" parameterType="ScriptInfoNode" resultMap="ScriptInfoNodeResult">
|
||||
<include refid="selectScriptInfoNodeVo"/>
|
||||
<where>
|
||||
<if test="scriptInfoId != null ">
|
||||
and script_info_id = #{scriptInfoId}
|
||||
</if>
|
||||
<if test="scriptNodeName != null and scriptNodeName != ''">
|
||||
and script_node_name like concat('%', #{scriptNodeName}, '%')
|
||||
</if>
|
||||
<if test="scriptContent != null and scriptContent != ''">
|
||||
and script_content = #{scriptContent}
|
||||
</if>
|
||||
<if test="scriptNodeType != null and scriptNodeType != ''">
|
||||
and script_node_type = #{scriptNodeType}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectScriptInfoNodeById" parameterType="Long"
|
||||
resultMap="ScriptInfoNodeResult">
|
||||
<include refid="selectScriptInfoNodeVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertScriptInfoNode" parameterType="ScriptInfoNode" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into script_info_node
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="scriptInfoId != null">script_info_id,
|
||||
</if>
|
||||
<if test="scriptNodeName != null">script_node_name,
|
||||
</if>
|
||||
<if test="scriptContent != null">script_content,
|
||||
</if>
|
||||
<if test="scriptNodeType != null">script_node_type,
|
||||
</if>
|
||||
<if test="remark != null">remark,
|
||||
</if>
|
||||
<if test="createBy != null">create_by,
|
||||
</if>
|
||||
<if test="createTime != null">create_time,
|
||||
</if>
|
||||
<if test="updateBy != null">update_by,
|
||||
</if>
|
||||
<if test="updateTime != null">update_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="scriptInfoId != null">#{scriptInfoId},
|
||||
</if>
|
||||
<if test="scriptNodeName != null">#{scriptNodeName},
|
||||
</if>
|
||||
<if test="scriptContent != null">#{scriptContent},
|
||||
</if>
|
||||
<if test="scriptNodeType != null">#{scriptNodeType},
|
||||
</if>
|
||||
<if test="remark != null">#{remark},
|
||||
</if>
|
||||
<if test="createBy != null">#{createBy},
|
||||
</if>
|
||||
<if test="createTime != null">#{createTime},
|
||||
</if>
|
||||
<if test="updateBy != null">#{updateBy},
|
||||
</if>
|
||||
<if test="updateTime != null">#{updateTime},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateScriptInfoNode" parameterType="ScriptInfoNode">
|
||||
update script_info_node
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="scriptInfoId != null">script_info_id =
|
||||
#{scriptInfoId},
|
||||
</if>
|
||||
<if test="scriptNodeName != null">script_node_name =
|
||||
#{scriptNodeName},
|
||||
</if>
|
||||
<if test="scriptContent != null">script_content =
|
||||
#{scriptContent},
|
||||
</if>
|
||||
<if test="scriptNodeType != null">script_node_type =
|
||||
#{scriptNodeType},
|
||||
</if>
|
||||
<if test="remark != null">remark =
|
||||
#{remark},
|
||||
</if>
|
||||
<if test="createBy != null">create_by =
|
||||
#{createBy},
|
||||
</if>
|
||||
<if test="createTime != null">create_time =
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="updateBy != null">update_by =
|
||||
#{updateBy},
|
||||
</if>
|
||||
<if test="updateTime != null">update_time =
|
||||
#{updateTime},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteScriptInfoNodeById" parameterType="Long">
|
||||
delete
|
||||
from script_info_node
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteScriptInfoNodeByIds" parameterType="String">
|
||||
delete from script_info_node where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="insertScriptInfoNodeList" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into script_info_node(
|
||||
script_info_id,
|
||||
script_node_name,
|
||||
script_content,
|
||||
script_node_type,
|
||||
remark,
|
||||
create_by,
|
||||
create_time
|
||||
)values
|
||||
<foreach item="scriptInfoNodes" index="index" collection="list" separator=",">
|
||||
(
|
||||
#{scriptInfoNodes.scriptInfoId},
|
||||
#{scriptInfoNodes.scriptNodeName},
|
||||
#{scriptInfoNodes.scriptContent},
|
||||
#{scriptInfoNodes.scriptNodeType},
|
||||
#{scriptInfoNodes.remark},
|
||||
#{scriptInfoNodes.createBy},
|
||||
#{scriptInfoNodes.createTime}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue
Block a user