feat: flowable后端改造
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
package com.ruoyi.system.domain;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>流程定义<p>
|
||||
*
|
||||
* @author XuanXuan
|
||||
* @date 2021-04-03
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@ApiModel("流程定义")
|
||||
public class FlowProcDefDto implements Serializable {
|
||||
|
||||
@ApiModelProperty("流程id")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty("流程名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("流程key")
|
||||
private String flowKey;
|
||||
|
||||
@ApiModelProperty("流程分类")
|
||||
private String category;
|
||||
|
||||
@ApiModelProperty("配置表单名称")
|
||||
private String formName;
|
||||
|
||||
@ApiModelProperty("配置表单id")
|
||||
private Long formId;
|
||||
|
||||
@ApiModelProperty("版本")
|
||||
private int version;
|
||||
|
||||
@ApiModelProperty("部署ID")
|
||||
private String deploymentId;
|
||||
|
||||
@ApiModelProperty("流程定义状态: 1:激活 , 2:中止")
|
||||
private int suspensionState;
|
||||
|
||||
@ApiModelProperty("部署时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date deploymentTime;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 流程实例关联表单对象 sys_instance_form
|
||||
*
|
||||
* @author XuanXuan Xuan
|
||||
* @date 2021-03-30
|
||||
*/
|
||||
public class SysDeployForm extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 表单主键 */
|
||||
@Excel(name = "表单主键")
|
||||
private Long formId;
|
||||
|
||||
/** 流程定义主键 */
|
||||
@Excel(name = "流程定义主键")
|
||||
private String deployId;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setFormId(Long formId)
|
||||
{
|
||||
this.formId = formId;
|
||||
}
|
||||
|
||||
public Long getFormId()
|
||||
{
|
||||
return formId;
|
||||
}
|
||||
|
||||
public String getDeployId() {
|
||||
return deployId;
|
||||
}
|
||||
|
||||
public void setDeployId(String deployId) {
|
||||
this.deployId = deployId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("formId", getFormId())
|
||||
.append("deployId", getDeployId())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 流程表单对象 sys_task_form
|
||||
*
|
||||
* @author XuanXuan Xuan
|
||||
* @date 2021-03-30
|
||||
*/
|
||||
public class SysForm extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 表单主键 */
|
||||
private Long formId;
|
||||
|
||||
/** 表单名称 */
|
||||
@Excel(name = "表单名称")
|
||||
private String formName;
|
||||
|
||||
/** 表单内容 */
|
||||
@Excel(name = "表单内容")
|
||||
private String formContent;
|
||||
|
||||
public void setFormId(Long formId)
|
||||
{
|
||||
this.formId = formId;
|
||||
}
|
||||
|
||||
public Long getFormId()
|
||||
{
|
||||
return formId;
|
||||
}
|
||||
public void setFormName(String formName)
|
||||
{
|
||||
this.formName = formName;
|
||||
}
|
||||
|
||||
public String getFormName()
|
||||
{
|
||||
return formName;
|
||||
}
|
||||
public void setFormContent(String formContent)
|
||||
{
|
||||
this.formContent = formContent;
|
||||
}
|
||||
|
||||
public String getFormContent()
|
||||
{
|
||||
return formContent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("formId", getFormId())
|
||||
.append("formName", getFormName())
|
||||
.append("formContent", getFormContent())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 流程任务关联单对象 sys_task_form
|
||||
*
|
||||
* @author XuanXuan Xuan
|
||||
* @date 2021-04-03
|
||||
*/
|
||||
public class SysTaskForm extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 表单主键 */
|
||||
@Excel(name = "表单主键")
|
||||
private Long formId;
|
||||
|
||||
/** 所属任务 */
|
||||
@Excel(name = "所属任务")
|
||||
private String taskId;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setFormId(Long formId)
|
||||
{
|
||||
this.formId = formId;
|
||||
}
|
||||
|
||||
public Long getFormId()
|
||||
{
|
||||
return formId;
|
||||
}
|
||||
public void setTaskId(String taskId)
|
||||
{
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
||||
public String getTaskId()
|
||||
{
|
||||
return taskId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("formId", getFormId())
|
||||
.append("taskId", getTaskId())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import com.ruoyi.system.domain.FlowProcDefDto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 流程定义查询
|
||||
*
|
||||
* @author Xuan Xuan
|
||||
* @email
|
||||
* @date 2022/1/29 5:44 下午
|
||||
**/
|
||||
public interface FlowDeployMapper {
|
||||
|
||||
/**
|
||||
* 流程定义列表
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
List<FlowProcDefDto> selectDeployList(String name);
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import com.ruoyi.system.domain.SysDeployForm;
|
||||
import com.ruoyi.system.domain.SysForm;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 流程实例关联表单Mapper接口
|
||||
*
|
||||
* @author XuanXuan Xuan
|
||||
* @date 2021-03-30
|
||||
*/
|
||||
public interface SysDeployFormMapper
|
||||
{
|
||||
/**
|
||||
* 查询流程实例关联表单
|
||||
*
|
||||
* @param id 流程实例关联表单ID
|
||||
* @return 流程实例关联表单
|
||||
*/
|
||||
public SysDeployForm selectSysDeployFormById(Long id);
|
||||
|
||||
/**
|
||||
* 查询流程实例关联表单列表
|
||||
*
|
||||
* @param SysDeployForm 流程实例关联表单
|
||||
* @return 流程实例关联表单集合
|
||||
*/
|
||||
public List<SysDeployForm> selectSysDeployFormList(SysDeployForm SysDeployForm);
|
||||
|
||||
/**
|
||||
* 新增流程实例关联表单
|
||||
*
|
||||
* @param SysDeployForm 流程实例关联表单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysDeployForm(SysDeployForm SysDeployForm);
|
||||
|
||||
/**
|
||||
* 修改流程实例关联表单
|
||||
*
|
||||
* @param SysDeployForm 流程实例关联表单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysDeployForm(SysDeployForm SysDeployForm);
|
||||
|
||||
/**
|
||||
* 删除流程实例关联表单
|
||||
*
|
||||
* @param id 流程实例关联表单ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysDeployFormById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除流程实例关联表单
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysDeployFormByIds(Long[] ids);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询流程挂着的表单
|
||||
* @param deployId
|
||||
* @return
|
||||
*/
|
||||
SysForm selectSysDeployFormByDeployId(String deployId);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import com.ruoyi.system.domain.SysForm;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 流程表单Mapper接口
|
||||
*
|
||||
* @author XuanXuan Xuan
|
||||
* @date 2021-03-30
|
||||
*/
|
||||
public interface SysFormMapper
|
||||
{
|
||||
/**
|
||||
* 查询流程表单
|
||||
*
|
||||
* @param formId 流程表单ID
|
||||
* @return 流程表单
|
||||
*/
|
||||
public SysForm selectSysFormById(Long formId);
|
||||
|
||||
/**
|
||||
* 查询流程表单列表
|
||||
*
|
||||
* @param sysForm 流程表单
|
||||
* @return 流程表单集合
|
||||
*/
|
||||
public List<SysForm> selectSysFormList(SysForm sysForm);
|
||||
|
||||
/**
|
||||
* 新增流程表单
|
||||
*
|
||||
* @param sysForm 流程表单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysForm(SysForm sysForm);
|
||||
|
||||
/**
|
||||
* 修改流程表单
|
||||
*
|
||||
* @param sysForm 流程表单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysForm(SysForm sysForm);
|
||||
|
||||
/**
|
||||
* 删除流程表单
|
||||
*
|
||||
* @param formId 流程表单ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysFormById(Long formId);
|
||||
|
||||
/**
|
||||
* 批量删除流程表单
|
||||
*
|
||||
* @param formIds 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysFormByIds(Long[] formIds);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import com.ruoyi.system.domain.SysTaskForm;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 流程任务关联单Mapper接口
|
||||
*
|
||||
* @author XuanXuan Xuan
|
||||
* @date 2021-04-03
|
||||
*/
|
||||
public interface SysTaskFormMapper
|
||||
{
|
||||
/**
|
||||
* 查询流程任务关联单
|
||||
*
|
||||
* @param id 流程任务关联单ID
|
||||
* @return 流程任务关联单
|
||||
*/
|
||||
public SysTaskForm selectSysTaskFormById(Long id);
|
||||
|
||||
/**
|
||||
* 查询流程任务关联单列表
|
||||
*
|
||||
* @param sysTaskForm 流程任务关联单
|
||||
* @return 流程任务关联单集合
|
||||
*/
|
||||
public List<SysTaskForm> selectSysTaskFormList(SysTaskForm sysTaskForm);
|
||||
|
||||
/**
|
||||
* 新增流程任务关联单
|
||||
*
|
||||
* @param sysTaskForm 流程任务关联单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysTaskForm(SysTaskForm sysTaskForm);
|
||||
|
||||
/**
|
||||
* 修改流程任务关联单
|
||||
*
|
||||
* @param sysTaskForm 流程任务关联单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysTaskForm(SysTaskForm sysTaskForm);
|
||||
|
||||
/**
|
||||
* 删除流程任务关联单
|
||||
*
|
||||
* @param id 流程任务关联单ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysTaskFormById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除流程任务关联单
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysTaskFormByIds(Long[] ids);
|
||||
}
|
||||
31
ruoyi-system/src/main/resources/FlowDeployMapper.xml
Normal file
31
ruoyi-system/src/main/resources/FlowDeployMapper.xml
Normal file
@@ -0,0 +1,31 @@
|
||||
<?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.FlowDeployMapper">
|
||||
|
||||
|
||||
<select id="selectDeployList" resultType="com.ruoyi.system.domain.FlowProcDefDto">
|
||||
|
||||
SELECT
|
||||
rp.id_ as id,
|
||||
rd.id_ as deploymentId,
|
||||
rd.name_ as name,
|
||||
rd.category_ as category,
|
||||
rp.key_ as flowKey,
|
||||
rp.version_ as version,
|
||||
rp.suspension_state_ as suspensionState,
|
||||
rd.deploy_time_ as deploymentTime
|
||||
FROM
|
||||
ACT_RE_PROCDEF rp
|
||||
LEFT JOIN ACT_RE_DEPLOYMENT rd ON rp.deployment_id_ = rd.id_
|
||||
<where>
|
||||
<if test="name != null and name != ''">
|
||||
and rd.name_ like concat('%', #{name}, '%')
|
||||
</if>
|
||||
</where>
|
||||
order by rd.deploy_time_ desc
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
61
ruoyi-system/src/main/resources/SysTaskFormMapper.xml
Normal file
61
ruoyi-system/src/main/resources/SysTaskFormMapper.xml
Normal file
@@ -0,0 +1,61 @@
|
||||
<?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.SysTaskFormMapper">
|
||||
|
||||
<resultMap type="SysTaskForm" id="SysTaskFormResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="formId" column="form_id" />
|
||||
<result property="taskId" column="task_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysTaskFormVo">
|
||||
select id, form_id, task_id from sys_task_form
|
||||
</sql>
|
||||
|
||||
<select id="selectSysTaskFormList" parameterType="SysTaskForm" resultMap="SysTaskFormResult">
|
||||
<include refid="selectSysTaskFormVo"/>
|
||||
<where>
|
||||
<if test="formId != null "> and form_id = #{formId}</if>
|
||||
<if test="taskId != null and taskId != ''"> and task_id = #{taskId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSysTaskFormById" parameterType="Long" resultMap="SysTaskFormResult">
|
||||
<include refid="selectSysTaskFormVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSysTaskForm" parameterType="SysTaskForm" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sys_task_form
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="formId != null">form_id,</if>
|
||||
<if test="taskId != null">task_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="formId != null">#{formId},</if>
|
||||
<if test="taskId != null">#{taskId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysTaskForm" parameterType="SysTaskForm">
|
||||
update sys_task_form
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="formId != null">form_id = #{formId},</if>
|
||||
<if test="taskId != null">task_id = #{taskId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSysTaskFormById" parameterType="Long">
|
||||
delete from sys_task_form where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSysTaskFormByIds" parameterType="String">
|
||||
delete from sys_task_form where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,66 @@
|
||||
<?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.SysDeployFormMapper">
|
||||
|
||||
<resultMap type="SysDeployForm" id="SysDeployFormResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="formId" column="form_id" />
|
||||
<result property="deployId" column="deploy_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysDeployFormVo">
|
||||
select id, form_id, deploy_id from sys_deploy_form
|
||||
</sql>
|
||||
|
||||
<select id="selectSysDeployFormList" parameterType="SysDeployForm" resultMap="SysDeployFormResult">
|
||||
<include refid="selectSysDeployFormVo"/>
|
||||
<where>
|
||||
<if test="formId != null "> and form_id = #{formId}</if>
|
||||
<if test="deployId != null and deployId != ''"> and deploy_id = #{deployId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSysDeployFormById" parameterType="Long" resultMap="SysDeployFormResult">
|
||||
<include refid="selectSysDeployFormVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectSysDeployFormByDeployId" resultType="com.ruoyi.system.domain.SysForm">
|
||||
select t1.form_content as formContent,t1.form_name as formName,t1.form_id as formId from sys_form t1 left join sys_deploy_form t2 on t1.form_id = t2.form_id
|
||||
where t2.deploy_id = #{deployId} limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertSysDeployForm" parameterType="SysDeployForm" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sys_deploy_form
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="formId != null">form_id,</if>
|
||||
<if test="deployId != null">deploy_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="formId != null">#{formId},</if>
|
||||
<if test="deployId != null">#{deployId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysDeployForm" parameterType="SysDeployForm">
|
||||
update sys_deploy_form
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="formId != null">form_id = #{formId},</if>
|
||||
<if test="deployId != null">deploy_id = #{deployId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSysDeployFormById" parameterType="Long">
|
||||
delete from sys_deploy_form where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSysDeployFormByIds" parameterType="String">
|
||||
delete from sys_deploy_form where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,82 @@
|
||||
<?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.SysFormMapper">
|
||||
|
||||
<resultMap type="SysForm" id="SysFormResult">
|
||||
<result property="formId" column="form_id" />
|
||||
<result property="formName" column="form_name" />
|
||||
<result property="formContent" column="form_content" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysFormVo">
|
||||
select form_id, form_name, form_content, create_time, update_time, create_by, update_by, remark from sys_form
|
||||
</sql>
|
||||
|
||||
<select id="selectSysFormList" parameterType="SysForm" resultMap="SysFormResult">
|
||||
<include refid="selectSysFormVo"/>
|
||||
<where>
|
||||
<if test="formName != null and formName != ''"> and form_name like concat('%', #{formName}, '%')</if>
|
||||
<if test="formContent != null and formContent != ''"> and form_content = #{formContent}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectSysFormById" parameterType="Long" resultMap="SysFormResult">
|
||||
<include refid="selectSysFormVo"/>
|
||||
where form_id = #{formId}
|
||||
</select>
|
||||
|
||||
<insert id="insertSysForm" parameterType="SysForm" useGeneratedKeys="true" keyProperty="formId">
|
||||
insert into sys_form
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="formName != null">form_name,</if>
|
||||
<if test="formContent != null">form_content,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="formName != null">#{formName},</if>
|
||||
<if test="formContent != null">#{formContent},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysForm" parameterType="SysForm">
|
||||
update sys_form
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="formName != null">form_name = #{formName},</if>
|
||||
<if test="formContent != null">form_content = #{formContent},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where form_id = #{formId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSysFormById" parameterType="Long">
|
||||
delete from sys_form where form_id = #{formId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSysFormByIds" parameterType="String">
|
||||
delete from sys_form where form_id in
|
||||
<foreach item="formId" collection="array" open="(" separator="," close=")">
|
||||
#{formId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user