Просмотр исходного кода

[电表][修复]:电表在线状态更新修复

release_toaliyun_real
hupeng 6 лет назад
Родитель
Сommit
c650de01b8
1 измененных файлов: 8 добавлений и 9 удалений
  1. +8
    -9
      mallinkService/src/main/resources/mapper/KwMeterMapper.xml

+ 8
- 9
mallinkService/src/main/resources/mapper/KwMeterMapper.xml Просмотреть файл

@@ -92,35 +92,34 @@

<update id="updateBatch" parameterType="com.iformall.domain.po.KwMeter" >
update kw_meter set
(online_status = #{onlineStatus},
last_online_time = #{lastOnlineTime})
<if test=" 1 == onlineStatus ">
last_online_time = #{lastOnlineTime},
</if>
online_status = #{onlineStatus}
where id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
#{idItem}
</foreach>
<if test=" 1 == onlineStatus ">
and `online_status` = 0
</if>
<if test=" 0 == onlineStatus ">
and `online_status` = 1
</if>
</update>

<update id="unbindBatch" parameterType="java.lang.Long">
update kw_merchant_meter set (bind_status = 1, box_id = 0)
update kw_merchant_meter set bind_status = 1, box_id = 0
where bind_status = 0
and `box_id` = #{boxId}
</update>


<update id="unbind" parameterType="java.lang.Long">
update kw_merchant_meter set (bind_status = 1, box_id = 0)
update kw_merchant_meter set bind_status = 1, box_id = 0
where bind_status = 0
and `id` = #{meterId}
</update>

<update id="bindBatch" parameterType="map">
update kw_merchant_meter set (bind_status = 0, box_id = #{boxId})
update kw_merchant_meter set bind_status = 0, box_id = #{boxId}
where id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
#{idItem}
@@ -128,7 +127,7 @@
</update>

<update id="bind" parameterType="map">
update kw_merchant_meter set (bind_status = 0, box_id = #{boxId})
update kw_merchant_meter set bind_status = 0, box_id = #{boxId}
where `id` = #{id}
</update>



Загрузка…
Отмена
Сохранить