`id`,`tenant_id`,`parent_tenant_id`,`secret`,`publickey`,`bid`,`recharge`,`remains`,`total`,`account`,
`reminderstatus`,`reminder`,`phone`,`notifyurl`,`modelnotifyurl`,`verifynotifyurl`,`sms_channel`,
`product`,`domain`,`region_id`,`endpoint_name`
where 1 = 1
and `id` = #{id}
and `tenant_id` = #{tenantId}
and `parent_tenant_id` = #{parentTenantId}
and `secret` like concat('%', #{secret},'%')
and `publickey` like concat('%', #{publickey},'%')
and `bid` = #{bid}
and `recharge` = #{recharge}
and `remains` = #{remains}
and `total` = #{total}
and `account` like concat('%', #{account},'%')
and `reminderstatus` = #{reminderstatus}
and `reminder` = #{reminder}
and `phone` like concat('%', #{phone},'%')
and `notifyurl` like concat('%', #{notifyurl},'%')
and `sms_channel` = #{smsChannel}
and id in
#{idItem}
order by ${sortColumns}
update wx_msg_config set remains = if(remains - #{remains} < 0,0,remains - #{remains})
where 1=1
and `tenant_id` = #{tenantId}
and `parent_tenant_id` = #{parentTenantId}