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.
89 lines
3.9 KiB
89 lines
3.9 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.zc.business.mapper.DcProcessConfigMapper">
|
|
|
|
<resultMap type="DcProcessConfig" id="DcProcessConfigResult">
|
|
<result property="id" column="id" />
|
|
<result property="eventType" column="event_type" />
|
|
<result property="nodeNode" column="node_node" />
|
|
<result property="processNode" column="process_node" />
|
|
<result property="commonPhrases" column="common_phrases" />
|
|
</resultMap>
|
|
|
|
<sql id="selectDcProcessConfigVo">
|
|
select id, event_type, node_node, process_node, common_phrases from dc_process_config
|
|
</sql>
|
|
|
|
<select id="selectDcProcessConfigList" parameterType="DcProcessConfig" resultMap="DcProcessConfigResult">
|
|
<include refid="selectDcProcessConfigVo"/>
|
|
<where>
|
|
<if test="nodeNode != null and nodeNode != ''"> and node_node = #{nodeNode}</if>
|
|
<if test="processNode != null and processNode != ''"> and process_node = #{processNode}</if>
|
|
<if test="commonPhrases != null and commonPhrases != ''"> and common_phrases = #{commonPhrases}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectDcProcessConfigById" parameterType="Long" resultMap="DcProcessConfigResult">
|
|
<include refid="selectDcProcessConfigVo"/>
|
|
where id = #{id}
|
|
</select>
|
|
|
|
<select id="selectDcProcessConfigByEventType" parameterType="Integer" resultMap="DcProcessConfigResult">
|
|
<include refid="selectDcProcessConfigVo"/>
|
|
where event_type = #{eventType}
|
|
</select>
|
|
|
|
<insert id="insertDcProcessConfig" parameterType="DcProcessConfig" useGeneratedKeys="true" keyProperty="id">
|
|
insert into dc_process_config
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="eventType != null">event_type,</if>
|
|
<if test="nodeNode != null">node_node,</if>
|
|
<if test="processNode != null and processNode != ''">process_node,</if>
|
|
<if test="commonPhrases != null">common_phrases,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="eventType != null">#{eventType},</if>
|
|
<if test="nodeNode != null">#{nodeNode},</if>
|
|
<if test="processNode != null and processNode != ''">#{processNode},</if>
|
|
<if test="commonPhrases != null">#{commonPhrases},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<insert id="insertDcProcessConfigByList">
|
|
insert into dc_process_config(event_type, node_node, process_node,common_phrases) values
|
|
<foreach item="item" index="index" collection="list" separator=",">
|
|
(#{item.eventType},#{item.nodeNode},#{item.processNode},#{item.commonPhrases})
|
|
</foreach>
|
|
</insert>
|
|
|
|
<update id="updateDcProcessConfig" parameterType="DcProcessConfig">
|
|
update dc_process_config
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="eventType != null">event_type = #{eventType},</if>
|
|
<if test="nodeNode != null">node_node = #{nodeNode},</if>
|
|
<if test="processNode != null and processNode != ''">process_node = #{processNode},</if>
|
|
<if test="commonPhrases != null">common_phrases = #{commonPhrases},</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteDcProcessConfigById" parameterType="Long">
|
|
delete from dc_process_config where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteDcProcessConfigByIds" parameterType="String">
|
|
delete from dc_process_config where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
|
|
<delete id="deleteDcProcessConfigByEventType" parameterType="Integer">
|
|
delete from dc_process_config where event_type = #{eventType}
|
|
</delete>
|
|
|
|
|
|
|
|
</mapper>
|