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.
100 lines
4.9 KiB
100 lines
4.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.DcEventProcessMapper">
|
|
|
|
<resultMap type="DcEventProcess" id="DcEventProcessResult">
|
|
<result property="id" column="id" />
|
|
<result property="eventId" column="event_id" />
|
|
<result property="operationTime" column="operation_time" />
|
|
<result property="operator" column="operator" />
|
|
<result property="source" column="source" />
|
|
<result property="processType" column="process_type" />
|
|
<result property="context" column="context" />
|
|
<result property="processId" column="process_id" />
|
|
<result property="processName" column="process_name" />
|
|
</resultMap>
|
|
|
|
<sql id="selectDcEventProcessVo">
|
|
select id, event_id, operation_time, operator, source, process_type, context, process_id, process_name from dc_event_process
|
|
</sql>
|
|
|
|
<select id="selectDcEventProcessList" parameterType="DcEventProcess" resultMap="DcEventProcessResult">
|
|
<include refid="selectDcEventProcessVo"/>
|
|
<where>
|
|
<if test="eventId != null and eventId != ''"> and event_id = #{eventId}</if>
|
|
<if test="operationTime != null "> and operation_time = #{operationTime}</if>
|
|
<if test="operator != null and operator != ''"> and operator = #{operator}</if>
|
|
<if test="source != null "> and source = #{source}</if>
|
|
<if test="processType != null "> and process_type = #{processType}</if>
|
|
<if test="context != null and context != ''"> and context = #{context}</if>
|
|
<if test="processId != null "> and process_id = #{processId}</if>
|
|
<if test="processName != null and processName != ''"> and process_name like concat('%', #{processName}, '%')</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectDcEventProcessById" parameterType="Long" resultMap="DcEventProcessResult">
|
|
<include refid="selectDcEventProcessVo"/>
|
|
where id = #{id}
|
|
</select>
|
|
|
|
<insert id="insertDcEventProcess" parameterType="DcEventProcess">
|
|
insert into dc_event_process
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">id,</if>
|
|
<if test="eventId != null and eventId != ''">event_id,</if>
|
|
<if test="operationTime != null">operation_time,</if>
|
|
<if test="operator != null and operator != ''">operator,</if>
|
|
<if test="source != null">source,</if>
|
|
<if test="processType != null">process_type,</if>
|
|
<if test="context != null">context,</if>
|
|
<if test="processId != null">process_id,</if>
|
|
<if test="processName != null">process_name,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">#{id},</if>
|
|
<if test="eventId != null and eventId != ''">#{eventId},</if>
|
|
<if test="operationTime != null">#{operationTime},</if>
|
|
<if test="operator != null and operator != ''">#{operator},</if>
|
|
<if test="source != null">#{source},</if>
|
|
<if test="processType != null">#{processType},</if>
|
|
<if test="context != null">#{context},</if>
|
|
<if test="processId != null">#{processId},</if>
|
|
<if test="processName != null">#{processName},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateDcEventProcess" parameterType="DcEventProcess">
|
|
update dc_event_process
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="eventId != null and eventId != ''">event_id = #{eventId},</if>
|
|
<if test="operationTime != null">operation_time = #{operationTime},</if>
|
|
<if test="operator != null and operator != ''">operator = #{operator},</if>
|
|
<if test="source != null">source = #{source},</if>
|
|
<if test="processType != null">process_type = #{processType},</if>
|
|
<if test="context != null">context = #{context},</if>
|
|
<if test="processId != null">process_id = #{processId},</if>
|
|
<if test="processName != null">process_name = #{processName},</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteDcEventProcessById" parameterType="Long">
|
|
delete from dc_event_process where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteDcEventProcessByIds" parameterType="String">
|
|
delete from dc_event_process where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
|
|
<select id="selectDcDispatchByEventId" parameterType="string" resultMap="DcEventProcessResult">
|
|
<include refid="selectDcEventProcessVo"/>
|
|
where event_id = #{id}
|
|
ORDER BY operation_time ASC;
|
|
</select>
|
|
|
|
</mapper>
|