You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

132 lines
8.3 KiB

<?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.zdxt.flow.mapper.IFlowModelMapper">
<resultMap type="TwkfFlowModelEntity" id="FlowModelResult">
<result property="modelId" column="model_id"/>
<result property="modelName" column="model_name"/>
<result property="modelDesc" column="model_desc"/>
<result property="subject" column="subject"/>
<result property="flowServiceCode" column="flow_service_code"/>
<result property="flowStatus" column="flow_status"/>
<result property="createdBy" column="created_by"/>
<result property="createdTime" column="created_time"/>
<result property="updatedBy" column="updated_by"/>
<result property="updatedTime" column="updated_time"/>
<result property="rootId" column="root_id"/>
<result property="parentId" column="parent_id"/>
<result property="organId" column="organ_id"/>
<result property="flowType" column="flow_type"/>
<result property="flowCode" column="flow_code"/>
<result property="showFlow" column="show_flow"/>
<result property="applicationType" column="application_type"/>
</resultMap>
<sql id="selectTwkfFlowModelVo">
select model_id, model_name, model_desc, subject, flow_service_code, flow_status, created_by, created_time, updated_by, updated_time, root_id, parent_id, organ_id, flow_type, flow_code, show_flow, application_type from twkf_flow_model
</sql>
<select id="selectFlowList" parameterType="TwkfFlowModelEntity" resultMap="FlowModelResult">
<include refid="selectTwkfFlowModelVo"/>
<where>
<if test="modelName != null and modelName != ''"> and model_name like concat('%', #{modelName}, '%')</if>
<if test="modelDesc != null and modelDesc != ''"> and model_desc = #{modelDesc}</if>
<if test="subject != null and subject != ''"> and subject = #{subject}</if>
<if test="flowServiceCode != null and flowServiceCode != ''"> and flow_service_code = #{flowServiceCode}</if>
<if test="flowStatus != null and flowStatus != ''"> and flow_status = #{flowStatus}</if>
<if test="createdBy != null and createdBy != ''"> and created_by = #{createdBy}</if>
<if test="createdTime != null "> and created_time = #{createdTime}</if>
<if test="updatedBy != null and updatedBy != ''"> and updated_by = #{updatedBy}</if>
<if test="updatedTime != null "> and updated_time = #{updatedTime}</if>
<if test="rootId != null and rootId != ''"> and root_id = #{rootId}</if>
<if test="parentId != null and parentId != ''"> and parent_id = #{parentId}</if>
<if test="organId != null and organId != ''"> and organ_id = #{organId}</if>
<if test="flowType != null and flowType != ''"> and flow_type = #{flowType}</if>
<if test="flowCode != null and flowCode != ''"> and flow_code = #{flowCode}</if>
<if test="showFlow != null "> and show_flow = #{showFlow}</if>
<if test="applicationType != null and applicationType != ''"> and application_type = #{applicationType}</if>
</where>
</select>
<select id="selectFlowModelById" parameterType="String" resultMap="FlowModelResult">
<include refid="selectTwkfFlowModelVo"/>
where model_id = #{modelId}
</select>
<insert id="insertFlowModel" parameterType="TwkfFlowModelEntity">
insert into twkf_flow_model
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="modelId != null and modelId != ''">model_id,</if>
<if test="modelName != null and modelName != ''">model_name,</if>
<if test="modelDesc != null and modelDesc != ''">model_desc,</if>
<if test="subject != null and subject != ''">subject,</if>
<if test="flowServiceCode != null and flowServiceCode != ''">flow_service_code,</if>
<if test="flowStatus != null and flowStatus != ''">flow_status,</if>
<if test="createdBy != null and createdBy != ''">created_by,</if>
<if test="createdTime != null ">created_time,</if>
<if test="updatedBy != null and updatedBy != ''">updated_by,</if>
<if test="updatedTime != null ">updated_time,</if>
<if test="rootId != null and rootId != ''">root_id,</if>
<if test="parentId != null and parentId != ''">parent_id,</if>
<if test="organId != null and organId != ''">organ_id,</if>
<if test="flowType != null and flowType != ''">flow_type,</if>
<if test="flowCode != null and flowCode != ''">flow_code,</if>
<if test="showFlow != null ">show_flow,</if>
<if test="applicationType != null and applicationType != ''">application_type,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="modelId != null and modelId != ''">#{modelId},</if>
<if test="modelName != null and modelName != ''">#{modelName},</if>
<if test="modelDesc != null and modelDesc != ''">#{modelDesc},</if>
<if test="subject != null and subject != ''">#{subject},</if>
<if test="flowServiceCode != null and flowServiceCode != ''">#{flowServiceCode},</if>
<if test="flowStatus != null and flowStatus != ''">#{flowStatus},</if>
<if test="createdBy != null and createdBy != ''">#{createdBy},</if>
<if test="createdTime != null ">#{createdTime},</if>
<if test="updatedBy != null and updatedBy != ''">#{updatedBy},</if>
<if test="updatedTime != null ">#{updatedTime},</if>
<if test="rootId != null and rootId != ''">#{rootId},</if>
<if test="parentId != null and parentId != ''">#{parentId},</if>
<if test="organId != null and organId != ''">#{organId},</if>
<if test="flowType != null and flowType != ''">#{flowType},</if>
<if test="flowCode != null and flowCode != ''">#{flowCode},</if>
<if test="showFlow != null ">#{showFlow},</if>
<if test="applicationType != null and applicationType != ''">#{applicationType},</if>
</trim>
</insert>
<update id="updateFlowModel" parameterType="TwkfFlowModelEntity">
update twkf_flow_model
<trim prefix="SET" suffixOverrides=",">
<if test="modelName != null and modelName != ''">model_name = #{modelName},</if>
<if test="modelDesc != null and modelDesc != ''">model_desc = #{modelDesc},</if>
<if test="subject != null and subject != ''">subject = #{subject},</if>
<if test="flowServiceCode != null and flowServiceCode != ''">flow_service_code = #{flowServiceCode},</if>
<if test="flowStatus != null and flowStatus != ''">flow_status = #{flowStatus},</if>
<if test="createdBy != null and createdBy != ''">created_by = #{createdBy},</if>
<if test="createdTime != null ">created_time = #{createdTime},</if>
<if test="updatedBy != null and updatedBy != ''">updated_by = #{updatedBy},</if>
<if test="updatedTime != null ">updated_time = #{updatedTime},</if>
<if test="rootId != null and rootId != ''">root_id = #{rootId},</if>
<if test="parentId != null and parentId != ''">parent_id = #{parentId},</if>
<if test="organId != null and organId != ''">organ_id = #{organId},</if>
<if test="flowType != null and flowType != ''">flow_type = #{flowType},</if>
<if test="flowCode != null and flowCode != ''">flow_code = #{flowCode},</if>
<if test="showFlow != null ">show_flow = #{showFlow},</if>
<if test="applicationType != null and applicationType != ''">application_type = #{applicationType},</if>
</trim>
where model_id = #{modelId}
</update>
<delete id="deleteFlowModelById" parameterType="String">
delete from twkf_flow_model where model_id = #{modelId}
</delete>
<delete id="deleteFlowModelByIds" parameterType="String">
delete from twkf_flow_model where model_id in
<foreach item="modelId" collection="array" open="(" separator="," close=")">
#{modelId}
</foreach>
</delete>
</mapper>