|
|
|
@@ -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> |
|
|
|
|
|
|
|
|