<updateid="updateCoinDevices">
update t_coin_device
set last_modified_time=current_timestamp
<trimprefix=",agent_id =case"suffix="end"><foreachcollection="coinDevices"item="item"index="index"><iftest="item.agentId!=null and item.id!=null">
when id=#{item.id} then #{item.agentId}
</if></foreach></trim><trimprefix=",sn_code =case"suffix="end"><foreachcollection="coinDevices"item="item"index="index"><iftest="item.snCode!=null and item.id!=null">
when id=#{item.id} then #{item.snCode}
</if></foreach></trim><trimprefix=",producer =case"suffix="end"><foreachcollection="coinDevices"item="item"index="index"><iftest="item.producer!=null and item.id!=null">
when id=#{item.id} then #{item.producer}
</if></foreach></trim><trimprefix=",qr_code_url =case"suffix="end"><foreachcollection="coinDevices"item="item"index="index"><iftest="item.qrCodeUrl!=null and item.id!=null">
when id=#{item.id} then #{item.qrCodeUrl}
</if></foreach></trim><trimprefix=",start_cost =case"suffix="end"><foreachcollection="coinDevices"item="item"index="index"><iftest="item.startCost!=null and item.id!=null">
when id=#{item.id} then #{item.startCost}
</if></foreach></trim><trimprefix=",status =case"suffix="end"><foreachcollection="coinDevices"item="item"index="index"><iftest="item.status!=null and item.id!=null">
when id=#{item.id} then #{item.status}
</if></foreach></trim><trimprefix=",last_modified_by =case"suffix="end"><foreachcollection="coinDevices"item="item"index="index"><iftest="item.lastModifiedBy!=null and item.id!=null">
when id=#{item.id} then #{item.lastModifiedBy}
</if></foreach></trim><trimprefix=",last_modified_by =case"suffix="end"><foreachcollection="coinDevices"item="item"index="index"><iftest="item.createdBy!=null and item.id!=null">
when id=#{item.id} then #{item.createdBy}
</if></foreach></trim>
where id in
<foreachcollection="coinDevices"item="item"separator=","open="("close=")">
#{item.id}
</foreach></update>