Procházet zdrojové kódy

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

release_toaliyun_real
hupeng před 6 roky
rodič
revize
c650de01b8
1 změnil soubory, kde provedl 8 přidání a 9 odebrání
  1. +8
    -9
      mallinkService/src/main/resources/mapper/KwMeterMapper.xml

+ 8
- 9
mallinkService/src/main/resources/mapper/KwMeterMapper.xml Zobrazit soubor

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


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


<update id="unbindBatch" parameterType="java.lang.Long"> <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 where bind_status = 0
and `box_id` = #{boxId} and `box_id` = #{boxId}
</update> </update>




<update id="unbind" parameterType="java.lang.Long"> <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 where bind_status = 0
and `id` = #{meterId} and `id` = #{meterId}
</update> </update>


<update id="bindBatch" parameterType="map"> <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 where id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
#{idItem} #{idItem}
@@ -128,7 +127,7 @@
</update> </update>


<update id="bind" parameterType="map"> <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} where `id` = #{id}
</update> </update>




Načítá se…
Zrušit
Uložit