`id`,`tenant_id`,`parent_tenant_id`,`meter_id`,`merchant_id`,`status`,`create_time`,`update_time`
where 1 = 1
and `id` = #{id}
and `tenant_id` = #{tenantId}
and `parent_tenant_id` = #{parentTenantId}
and `merchant_id` = #{merchantId}
and `meter_id` = #{meterId}
and `status` = #{status}
and id in
#{idItem}
order by ${sortColumns}
`id`, `tenant_id`, `parent_tenant_id`, `merchant_id`, `status`, `name`, `link_phone`
where 1 = 1
and `tenant_id` = #{tenantId}
and `parent_tenant_id` = #{parentTenantId}
and `box_id` = #{boxId}
and `meter_id` = #{meterId}
and `address` = #{address}
and `create_time` between #{startTime} and #{endTime}
update kw_merchant_meter set status = 1
where status = 0
and `merchant_id` = #{merchantId}
update kw_merchant_meter set status = 1
where status = 0
and `meter_id` = #{meterId}