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.
64 lines
3.5 KiB
64 lines
3.5 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.EventPlanAssocMapper">
|
|
|
|
<insert id="insertEventPlanAssoc" parameterType="EventPlanAssoc">
|
|
insert into event_plan_assoc
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="eventId != null and eventId != ''">event_id,</if>
|
|
<if test="emergencyPlansId != null">emergency_plans_id,</if>
|
|
<if test="executingControlDevice != null and executingControlDevice != ''">executing_control_device,</if>
|
|
<if test="recoveredControlDevice != null and recoveredControlDevice != ''">recovered_control_device,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="updateTime != null">update_time,</if>
|
|
<if test="executingControlResult != null and executingControlResult !=''">executing_control_result,</if>
|
|
<if test="recoveredControlResult != null and recoveredControlResult !=''">recovered_control_result,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="eventId != null and eventId != ''">#{eventId},</if>
|
|
<if test="emergencyPlansId != null">#{emergencyPlansId},</if>
|
|
<if test="executingControlDevice != null and executingControlDevice != ''">#{executingControlDevice},</if>
|
|
<if test="recoveredControlDevice != null and recoveredControlDevice != ''">#{recoveredControlDevice},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
<if test="executingControlResult != null and executingControlResult !=''">#{executingControlResult},</if>
|
|
<if test="recoveredControlResult != null and recoveredControlResult !=''">#{recoveredControlResult}</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<sql id="selectEventPlanAssocVo">
|
|
select id,event_id,emergency_plans_id,executing_control_device,recovered_control_device,create_time,update_time,
|
|
executing_control_result,recovered_control_result
|
|
from event_plan_assoc
|
|
</sql>
|
|
|
|
<select id="selectByEventId" parameterType="EventPlanAssoc" resultType="EventPlanAssoc">
|
|
<include refid="selectEventPlanAssocVo"/>
|
|
where event_id = #{eventId}
|
|
</select>
|
|
|
|
<update id="updateEventPlanAssoc" parameterType="EventPlanAssoc">
|
|
update event_plan_assoc
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="eventId != null and eventId != ''">event_id = #{eventId},</if>
|
|
<if test="emergencyPlansId != null">emergency_plans_id = #{emergencyPlansId},</if>
|
|
<if test="executingControlDevice != null and executingControlDevice != ''">
|
|
executing_control_device = #{executingControlDevice},
|
|
</if>
|
|
<if test="recoveredControlDevice != null and recoveredControlDevice != ''">
|
|
recovered_control_device = #{recoveredControlDevice},
|
|
</if>
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
<if test="executingControlResult != null and executingControlResult !=''">
|
|
executing_control_result = #{executingControlResult},
|
|
</if>
|
|
<if test="recoveredControlResult != null and recoveredControlResult !=''">
|
|
recovered_control_result = #{recoveredControlResult},
|
|
</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
</mapper>
|
|
|