瀏覽代碼

feat:批量新增配置节点数据接口,优化新增修改选择数据源

韩帛霖 1 年之前
父節點
當前提交
4615eb2597

+ 107 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/BpmProcessConfigurationController.java

@@ -0,0 +1,107 @@
+package com.ruoyi.web.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.system.entity.BpmProcessConfiguration;
+import com.ruoyi.system.service.IBpmProcessConfigurationService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 流程配置Controller
+ *
+ * @author hzh
+ * @date 2023-10-20
+ */
+@RestController
+@RequestMapping("/system/configuration")
+@Api(value = "/system/configuration", description = "流程配置-接口")
+public class BpmProcessConfigurationController extends BaseController {
+    @Autowired
+    private IBpmProcessConfigurationService bpmProcessConfigurationService;
+
+    /**
+     * 查询流程配置列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:configuration:list')")
+    @GetMapping("/list")
+    @ApiOperation(value = "查询流程配置列表")
+    public TableDataInfo list(BpmProcessConfiguration bpmProcessConfiguration) {
+        startPage();
+        List<BpmProcessConfiguration> list = bpmProcessConfigurationService.selectBpmProcessConfigurationList(bpmProcessConfiguration);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出流程配置列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:configuration:export')")
+    @Log(title = "流程配置", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ApiOperation(value = "导出流程配置列表")
+    public void export(HttpServletResponse response, BpmProcessConfiguration bpmProcessConfiguration) {
+        List<BpmProcessConfiguration> list = bpmProcessConfigurationService.selectBpmProcessConfigurationList(bpmProcessConfiguration);
+        ExcelUtil<BpmProcessConfiguration> util = new ExcelUtil<BpmProcessConfiguration>(BpmProcessConfiguration.class);
+        util.exportExcel(response, list, "流程配置数据");
+    }
+
+    /**
+     * 获取流程配置详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:configuration:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation(value = "获取流程配置详细信息")
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
+        return success(bpmProcessConfigurationService.selectBpmProcessConfigurationById(id));
+    }
+
+    /**
+     * 新增流程配置
+     */
+    @PreAuthorize("@ss.hasPermi('system:configuration:add')")
+    @Log(title = "流程配置", businessType = BusinessType.INSERT)
+    @PostMapping
+    @ApiOperation(value = "新增流程配置")
+    public AjaxResult add(@RequestBody List<BpmProcessConfiguration> bpmProcessConfigurationList) {
+        return toAjax(bpmProcessConfigurationService.insertBpmProcessConfiguration(bpmProcessConfigurationList));
+    }
+
+    /**
+     * 修改流程配置
+     */
+    @PreAuthorize("@ss.hasPermi('system:configuration:edit')")
+    @Log(title = "流程配置", businessType = BusinessType.UPDATE)
+    @PutMapping
+    @ApiOperation(value = "修改流程配置")
+    public AjaxResult edit(@RequestBody List<BpmProcessConfiguration> bpmProcessConfigurationList) {
+        return toAjax(bpmProcessConfigurationService.updateBpmProcessConfiguration(bpmProcessConfigurationList));
+    }
+
+    /**
+     * 删除流程配置
+     */
+    @PreAuthorize("@ss.hasPermi('system:configuration:remove')")
+    @Log(title = "流程配置", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    @ApiOperation(value = "删除流程配置")
+    public AjaxResult remove(@PathVariable Long[] ids) {
+        return toAjax(bpmProcessConfigurationService.deleteBpmProcessConfigurationByIds(ids));
+    }
+}

+ 9 - 7
ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/SqlInterceptor.java

@@ -65,13 +65,15 @@ public class SqlInterceptor implements Interceptor {
             } else {
                 if (sql.contains("information_schema")) return sql;  // 执行当前sql不需要选择数据源
                 StringBuilder sb = new StringBuilder(sql);
-                int index = sb.indexOf(" from ");
-                if (index != -1) {
-                    sb.insert(index + 6, "`" + SecurityUtils.getDatabaseName() + "`.");  // 在目标字符后插入新的字符串
-                } else {
-                    index = sb.indexOf(" FROM ");
-                    if (index != -1)
-                        sb.insert(index + 6, "`" + SecurityUtils.getDatabaseName() + "`.");  // 在目标字符后插入新的字符串
+
+                if (sb.indexOf(" from ") != -1) {
+                    sb.insert(sb.indexOf(" from ") + 6, "`" + SecurityUtils.getDatabaseName() + "`.");  // 在目标字符后插入新的字符串
+                } else if (sb.indexOf(" FROM ") != -1) {
+                    sb.insert(sb.indexOf(" FROM ") + 6, "`" + SecurityUtils.getDatabaseName() + "`.");  // 在目标字符后插入新的字符串
+                } else if (sb.indexOf(" into ") != -1) {
+                    sb.insert(sb.indexOf(" into ") + 6, "`" + SecurityUtils.getDatabaseName() + "`.");  // 在目标字符后插入新的字符串
+                } else if (sb.indexOf("update ") != -1) {
+                    sb.insert(sb.indexOf("update ") + 7, "`" + SecurityUtils.getDatabaseName() + "`.");  // 在目标字符后插入新的字符串
                 }
                 return sb.toString();
             }

+ 195 - 0
ruoyi-system/src/main/java/com/ruoyi/system/entity/BpmProcessConfiguration.java

@@ -0,0 +1,195 @@
+package com.ruoyi.system.entity;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 流程配置对象 bpm_process_configuration
+ * 
+ * @author hzh
+ * @date 2023-10-20
+ */
+public class BpmProcessConfiguration extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 编号 */
+    private Long id;
+
+    /** 节点编号 */
+    @Excel(name = "节点编号")
+    private String nodeKey;
+
+    /** 表单编号 */
+    @Excel(name = "表单编号")
+    private String nodeFormKey;
+
+    /** 流程编号 */
+    @Excel(name = "流程编号")
+    private String nodeProcessKey;
+
+    /** 节点类型 */
+    @Excel(name = "节点类型")
+    private String nodeType;
+
+    /** 节点前 */
+    @Excel(name = "节点前")
+    private String nodeBefor;
+
+    /** 节点后 */
+    @Excel(name = "节点后")
+    private String nodeAfter;
+
+    /** 角色权限 */
+    @Excel(name = "角色权限")
+    private String nodeRolePermission;
+
+    /** 备用字段1 */
+    @Excel(name = "备用字段1")
+    private String spare1;
+
+    /** 备用字段2 */
+    @Excel(name = "备用字段2")
+    private String spare2;
+
+    /** 备用字段3 */
+    @Excel(name = "备用字段3")
+    private String spare3;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setNodeKey(String nodeKey) 
+    {
+        this.nodeKey = nodeKey;
+    }
+
+    public String getNodeKey() 
+    {
+        return nodeKey;
+    }
+    public void setNodeFormKey(String nodeFormKey)
+    {
+        this.nodeFormKey = nodeFormKey;
+    }
+
+    public String getNodeFormKey()
+    {
+        return nodeFormKey;
+    }
+    public void setNodeProcessKey(String nodeProcessKey)
+    {
+        this.nodeProcessKey = nodeProcessKey;
+    }
+
+    public String getNodeProcessKey()
+    {
+        return nodeProcessKey;
+    }
+    public void setNodeType(String nodeType) 
+    {
+        this.nodeType = nodeType;
+    }
+
+    public String getNodeType() 
+    {
+        return nodeType;
+    }
+    public void setNodeBefor(String nodeBefor) 
+    {
+        this.nodeBefor = nodeBefor;
+    }
+
+    public String getNodeBefor() 
+    {
+        return nodeBefor;
+    }
+    public void setNodeAfter(String nodeAfter) 
+    {
+        this.nodeAfter = nodeAfter;
+    }
+
+    public String getNodeAfter() 
+    {
+        return nodeAfter;
+    }
+    public void setNodeRolePermission(String nodeRolePermission) 
+    {
+        this.nodeRolePermission = nodeRolePermission;
+    }
+
+    public String getNodeRolePermission() 
+    {
+        return nodeRolePermission;
+    }
+    public void setSpare1(String spare1) 
+    {
+        this.spare1 = spare1;
+    }
+
+    public String getSpare1() 
+    {
+        return spare1;
+    }
+    public void setSpare2(String spare2) 
+    {
+        this.spare2 = spare2;
+    }
+
+    public String getSpare2() 
+    {
+        return spare2;
+    }
+    public void setSpare3(String spare3) 
+    {
+        this.spare3 = spare3;
+    }
+
+    public String getSpare3() 
+    {
+        return spare3;
+    }
+    public void setDelFlag(String delFlag) 
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() 
+    {
+        return delFlag;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("nodeKey", getNodeKey())
+            .append("nodeFormKey", getNodeFormKey())
+            .append("nodeProcessKey", getNodeProcessKey())
+            .append("nodeType", getNodeType())
+            .append("nodeBefor", getNodeBefor())
+            .append("nodeAfter", getNodeAfter())
+            .append("nodeRolePermission", getNodeRolePermission())
+            .append("spare1", getSpare1())
+            .append("spare2", getSpare2())
+            .append("spare3", getSpare3())
+            .append("delFlag", getDelFlag())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("remark", getRemark())
+            .toString();
+    }
+}

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/BpmProcessConfigurationMapper.java

@@ -0,0 +1,61 @@
+package com.ruoyi.system.mapper;
+
+import java.util.List;
+import com.ruoyi.system.entity.BpmProcessConfiguration;
+
+/**
+ * 流程配置Mapper接口
+ * 
+ * @author hzh
+ * @date 2023-10-20
+ */
+public interface BpmProcessConfigurationMapper 
+{
+    /**
+     * 查询流程配置
+     * 
+     * @param id 流程配置主键
+     * @return 流程配置
+     */
+    public BpmProcessConfiguration selectBpmProcessConfigurationById(Long id);
+
+    /**
+     * 查询流程配置列表
+     * 
+     * @param bpmProcessConfiguration 流程配置
+     * @return 流程配置集合
+     */
+    public List<BpmProcessConfiguration> selectBpmProcessConfigurationList(BpmProcessConfiguration bpmProcessConfiguration);
+
+    /**
+     * 新增流程配置
+     * 
+     * @param bpmProcessConfiguration 流程配置
+     * @return 结果
+     */
+    public int insertBpmProcessConfiguration(List<BpmProcessConfiguration> bpmProcessConfigurationList);
+
+    /**
+     * 修改流程配置
+     * 
+     * @param bpmProcessConfiguration 流程配置
+     * @return 结果
+     */
+    public int updateBpmProcessConfiguration(List<BpmProcessConfiguration> bpmProcessConfigurationList);
+
+    /**
+     * 删除流程配置
+     * 
+     * @param id 流程配置主键
+     * @return 结果
+     */
+    public int deleteBpmProcessConfigurationById(Long id);
+
+    /**
+     * 批量删除流程配置
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteBpmProcessConfigurationByIds(Long[] ids);
+}

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IBpmProcessConfigurationService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.system.service;
+
+import java.util.List;
+import com.ruoyi.system.entity.BpmProcessConfiguration;
+
+/**
+ * 流程配置Service接口
+ * 
+ * @author hzh
+ * @date 2023-10-20
+ */
+public interface IBpmProcessConfigurationService 
+{
+    /**
+     * 查询流程配置
+     * 
+     * @param id 流程配置主键
+     * @return 流程配置
+     */
+    public BpmProcessConfiguration selectBpmProcessConfigurationById(Long id);
+
+    /**
+     * 查询流程配置列表
+     * 
+     * @param bpmProcessConfiguration 流程配置
+     * @return 流程配置集合
+     */
+    public List<BpmProcessConfiguration> selectBpmProcessConfigurationList(BpmProcessConfiguration bpmProcessConfiguration);
+
+    /**
+     * 新增流程配置
+     * 
+     * @param bpmProcessConfiguration 流程配置
+     * @return 结果
+     */
+    public int insertBpmProcessConfiguration(List<BpmProcessConfiguration> bpmProcessConfigurationList);
+
+    /**
+     * 修改流程配置
+     * 
+     * @param bpmProcessConfiguration 流程配置
+     * @return 结果
+     */
+    public int updateBpmProcessConfiguration(List<BpmProcessConfiguration> bpmProcessConfigurationList);
+
+    /**
+     * 批量删除流程配置
+     * 
+     * @param ids 需要删除的流程配置主键集合
+     * @return 结果
+     */
+    public int deleteBpmProcessConfigurationByIds(Long[] ids);
+
+    /**
+     * 删除流程配置信息
+     * 
+     * @param id 流程配置主键
+     * @return 结果
+     */
+    public int deleteBpmProcessConfigurationById(Long id);
+}

+ 96 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BpmProcessConfigurationServiceImpl.java

@@ -0,0 +1,96 @@
+package com.ruoyi.system.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.SecurityUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.system.mapper.BpmProcessConfigurationMapper;
+import com.ruoyi.system.entity.BpmProcessConfiguration;
+import com.ruoyi.system.service.IBpmProcessConfigurationService;
+
+/**
+ * 流程配置Service业务层处理
+ * 
+ * @author hzh
+ * @date 2023-10-20
+ */
+@Service
+public class BpmProcessConfigurationServiceImpl implements IBpmProcessConfigurationService 
+{
+    @Autowired
+    private BpmProcessConfigurationMapper bpmProcessConfigurationMapper;
+
+    /**
+     * 查询流程配置
+     * 
+     * @param id 流程配置主键
+     * @return 流程配置
+     */
+    @Override
+    public BpmProcessConfiguration selectBpmProcessConfigurationById(Long id)
+    {
+        return bpmProcessConfigurationMapper.selectBpmProcessConfigurationById(id);
+    }
+
+    /**
+     * 查询流程配置列表
+     * 
+     * @param bpmProcessConfiguration 流程配置
+     * @return 流程配置
+     */
+    @Override
+    public List<BpmProcessConfiguration> selectBpmProcessConfigurationList(BpmProcessConfiguration bpmProcessConfiguration)
+    {
+        return bpmProcessConfigurationMapper.selectBpmProcessConfigurationList(bpmProcessConfiguration);
+    }
+
+    /**
+     * 新增流程配置
+     * 
+     * @param bpmProcessConfiguration 流程配置
+     * @return 结果
+     */
+    @Override
+    public int insertBpmProcessConfiguration(List<BpmProcessConfiguration> bpmProcessConfigurationList)
+    {
+        return bpmProcessConfigurationMapper.insertBpmProcessConfiguration(bpmProcessConfigurationList);
+    }
+
+    /**
+     * 修改流程配置
+     * 
+     * @param bpmProcessConfiguration 流程配置
+     * @return 结果
+     */
+    @Override
+    public int updateBpmProcessConfiguration(List<BpmProcessConfiguration> bpmProcessConfigurationList)
+    {
+
+        return bpmProcessConfigurationMapper.updateBpmProcessConfiguration(bpmProcessConfigurationList);
+    }
+
+    /**
+     * 批量删除流程配置
+     * 
+     * @param ids 需要删除的流程配置主键
+     * @return 结果
+     */
+    @Override
+    public int deleteBpmProcessConfigurationByIds(Long[] ids)
+    {
+        return bpmProcessConfigurationMapper.deleteBpmProcessConfigurationByIds(ids);
+    }
+
+    /**
+     * 删除流程配置信息
+     * 
+     * @param id 流程配置主键
+     * @return 结果
+     */
+    @Override
+    public int deleteBpmProcessConfigurationById(Long id)
+    {
+        return bpmProcessConfigurationMapper.deleteBpmProcessConfigurationById(id);
+    }
+}

+ 0 - 15
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BpmProcessServiceImpl.java

@@ -1,8 +1,6 @@
 package com.ruoyi.system.service.impl;
 
-import java.io.ByteArrayInputStream;
 import java.io.File;
-import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.*;
 import java.net.URLEncoder;
@@ -12,9 +10,7 @@ import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.nio.file.StandardCopyOption;
 import java.util.ArrayList;
-import java.util.Base64;
 import java.util.List;
-import java.util.stream.Collectors;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipOutputStream;
 
@@ -26,8 +22,6 @@ import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.file.FileUploadUtils;
 import com.ruoyi.common.utils.file.FileUtils;
 import com.ruoyi.system.entity.BpmProcess;
-import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
-import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -37,18 +31,9 @@ import com.ruoyi.system.service.IBpmProcessService;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.CollectionUtils;
 import org.springframework.web.multipart.MultipartFile;
-import org.w3c.dom.Document;
-import org.xml.sax.InputSource;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
 
 /**
  * 流程定义Service业务层处理

+ 103 - 0
ruoyi-system/src/main/resources/mapper/BpmProcessConfigurationMapper.xml

@@ -0,0 +1,103 @@
+<?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.ruoyi.system.mapper.BpmProcessConfigurationMapper">
+
+    <resultMap type="com.ruoyi.system.entity.BpmProcessConfiguration" id="BpmProcessConfigurationResult">
+        <result property="id"    column="id"    />
+        <result property="nodeKey"    column="node_key"    />
+        <result property="nodeFormKey"    column="node_form_key"    />
+        <result property="nodeProcessKey"    column="node_process_key"    />
+        <result property="nodeType"    column="node_type"    />
+        <result property="nodeBefor"    column="node_befor"    />
+        <result property="nodeAfter"    column="node_after"    />
+        <result property="nodeRolePermission"    column="node_role_permission"    />
+        <result property="spare1"    column="spare1"    />
+        <result property="spare2"    column="spare2"    />
+        <result property="spare3"    column="spare3"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="remark"    column="remark"    />
+    </resultMap>
+
+    <sql id="selectBpmProcessConfigurationVo">
+        select id, node_key, node_form_key, node_process_key, node_type, node_befor, node_after, node_role_permission, spare1, spare2, spare3, del_flag, create_by, create_time, update_by, update_time, remark from bpm_process_configuration
+    </sql>
+
+    <select id="selectBpmProcessConfigurationList" parameterType="com.ruoyi.system.entity.BpmProcessConfiguration" resultMap="BpmProcessConfigurationResult">
+        <include refid="selectBpmProcessConfigurationVo"/>
+        <where>
+            <if test="nodeKey != null  and nodeKey != ''"> and node_key = #{nodeKey}</if>
+            <if test="nodeFormKey != null "> and node_form_key = #{nodeFormKey}</if>
+            <if test="nodeProcessKey != null "> and node_process_key = #{nodeProcessKey}</if>
+            <if test="nodeType != null  and nodeType != ''"> and node_type = #{nodeType}</if>
+            <if test="nodeBefor != null  and nodeBefor != ''"> and node_befor = #{nodeBefor}</if>
+            <if test="nodeAfter != null  and nodeAfter != ''"> and node_after = #{nodeAfter}</if>
+            <if test="nodeRolePermission != null  and nodeRolePermission != ''"> and node_role_permission = #{nodeRolePermission}</if>
+            <if test="spare1 != null  and spare1 != ''"> and spare1 = #{spare1}</if>
+            <if test="spare2 != null  and spare2 != ''"> and spare2 = #{spare2}</if>
+            <if test="spare3 != null  and spare3 != ''"> and spare3 = #{spare3}</if>
+        </where>
+    </select>
+
+    <select id="selectBpmProcessConfigurationById" parameterType="Long" resultMap="BpmProcessConfigurationResult">
+        <include refid="selectBpmProcessConfigurationVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertBpmProcessConfiguration" parameterType="java.util.List">
+        insert into bpm_process_configuration(
+        node_key, node_form_key, node_process_key,
+        node_type, node_befor, node_after,
+        node_role_permission, spare1, spare2,
+        spare3, del_flag, create_by,
+        create_time, remark )
+        values
+        <foreach collection="list" item="item" index="index" separator=",">
+            (#{item.nodeKey}, #{item.nodeFormKey}, #{item.nodeProcessKey}, #{item.nodeType}, #{item.nodeBefor},
+            #{item.nodeAfter},
+            #{item.nodeRolePermission}, #{item.spare1}, #{item.spare2}, #{item.spare3}, '0', #{item.createBy},
+            NOW(),#{item.remark})
+        </foreach>
+    </insert>
+
+    <update id="updateBpmProcessConfiguration" parameterType="java.util.List">
+        <foreach collection="list" item="item" index="index" separator=";">
+            update bpm_process_configuration
+            <trim prefix="SET" suffixOverrides=",">
+                <if test="item.nodeKey != null">node_key = #{item.nodeKey},</if>
+                <if test="item.nodeFormKey != null">node_form_key = #{item.nodeFormKey},</if>
+                <if test="item.nodeProcessKey != null">node_process_key = #{item.nodeProcessKey},</if>
+                <if test="item.nodeType != null">node_type = #{item.nodeType},</if>
+                <if test="item.nodeBefor != null">node_befor = #{item.nodeBefor},</if>
+                <if test="item.nodeAfter != null">node_after = #{item.nodeAfter},</if>
+                <if test="item.nodeRolePermission != null">node_role_permission = #{item.nodeRolePermission},</if>
+                <if test="item.spare1 != null">spare1 = #{item.spare1},</if>
+                <if test="item.spare2 != null">spare2 = #{item.spare2},</if>
+                <if test="item.spare3 != null">spare3 = #{item.spare3},</if>
+                <if test="item.delFlag != null">del_flag = #{item.delFlag},</if>
+                <if test="item.createBy != null">create_by = #{item.createBy},</if>
+                <if test="item.createTime != null">create_time = #{item.createTime},</if>
+                <if test="item.updateBy != null">update_by = #{item.updateBy},</if>
+                <if test="item.remark != null">remark = #{item.remark},</if>
+                update_time = NOW()
+            </trim>
+            where id = #{item.id}
+        </foreach>
+    </update>
+
+    <delete id="deleteBpmProcessConfigurationById" parameterType="Long">
+        delete from bpm_process_configuration where id = #{id}
+    </delete>
+
+    <delete id="deleteBpmProcessConfigurationByIds" parameterType="String">
+        delete from bpm_process_configuration where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>