济菏高速数据中心代码
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.
 
 
 
 
 

114 lines
4.0 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.DcExecuteActionMapper">
<insert id="insertDcExecuteActionBatch" parameterType="java.util.List">
insert into dc_execute_action
(emergency_plans_id,
device_type,
create_time,
search_rule,
`number`,
device_list,
execute_config,
recover_config
)
values
<foreach collection="list" item="item" separator=",">
(
#{item.emergencyPlansId},
#{item.deviceType},
#{item.createTime},
#{item.searchRule},
#{item.number},
#{item.deviceList},
#{item.executeConfig},
#{item.recoverConfig}
)
</foreach>
</insert>
<update id="updateDcExecuteActionBatch" parameterType="java.util.List">
update dc_execute_action
<trim prefix="set" suffixOverrides=",">
<trim prefix="emergency_plans_id =case" suffix="end,">
<foreach collection="list" item="item" index="index">
when id=#{item.id}
then #{item.emergencyPlansId}
</foreach>
</trim>
<trim prefix="device_type =case" suffix="end,">
<foreach collection="list" item="item" index="index">
when id=#{item.id}
then #{item.deviceType}
</foreach>
</trim>
<trim prefix="update_time =case" suffix="end,">
<foreach collection="list" item="item" index="index">
when id=#{item.id}
then #{item.updateTime}
</foreach>
</trim>
<trim prefix="search_rule =case" suffix="end,">
<foreach collection="list" item="item" index="index">
when id=#{item.id}
then #{item.searchRule}
</foreach>
</trim>
<trim prefix="number =case" suffix="end,">
<foreach collection="list" item="item" index="index">
when id=#{item.id}
then #{item.number}
</foreach>
</trim>
<trim prefix="device_list =case" suffix="end,">
<foreach collection="list" item="item" index="index">
when id=#{item.id}
then #{item.deviceList}
</foreach>
</trim>
<trim prefix="execute_config =case" suffix="end,">
<foreach collection="list" item="item" index="index">
when id=#{item.id}
then #{item.executeConfig}
</foreach>
</trim>
<trim prefix="recover_config =case" suffix="end,">
<foreach collection="list" item="item" index="index">
when id=#{item.id}
then #{item.recoverConfig}
</foreach>
</trim>
</trim>
where id in
<foreach collection="list" item="item" index="index" separator="," open="(" close=")">
#{item.id}
</foreach>
</update>
<delete id="deleteDcExecuteActionByEmergencyPlansId" parameterType="String">
delete from dc_execute_action where emergency_plans_id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<delete id="deleteDcExecuteAction" parameterType="java.util.List">
delete from dc_execute_action where id in
<foreach item="id" collection="list" index="index" separator="," open="(" close=")">
#{id}
</foreach>
</delete>
<select id="selectDcExecuteActionByEmergencyPlansId" parameterType="String" resultType="String">
select id from dc_execute_action where emergency_plans_id = #{emergencyPlansId}
</select>
</mapper>