`id`,`receive_pay`,`pay`,`receive_date`,`pay_date`,`createtime`,`expired_day`,`apply_status`,`apply_pay_img`,`apply_update_time`, `tenant_id`,`parent_tenant_id`,`owe`,`status`,`is_del`,`merchant_id`,`user_id`,`shop_id`,`shop_name`,`updatetime`,`type`, `rent_shop_type`,`pay_way`,`price_detail`,`starttime`,`endtime`,freeze,build_way,service_charge_pay where 1 = 1 and `id` = #{id} and `receive_pay` = #{receivePay} and `pay` = #{pay} and `receive_date` = #{receiveDate} and `pay_date` = #{payDate} and `createtime` = #{createtime} and `expired_day` = #{expiredDay} and `tenant_id` = #{tenantId} and `parent_tenant_id` = #{parentTenantId} and `owe` = #{owe} and `status` = #{status} and `apply_status` = #{applyStatus} and `is_del` = #{isDel} and `merchant_id` = #{merchantId} and `user_id` = #{userId} and `updatetime` = #{updatetime} and `type` = #{type} and `rent_shop_type` = #{rentShopType} and `pay_way` = #{payWay} and `build_way` = #{buildWay} and id in #{idItem} order by ${sortColumns} 1 = 1 and br.`id` = #{id} and br.`tenant_id` = #{tenantId} and br.`parent_tenant_id` = #{parentTenantId} and br.`freeze` = #{freeze} and br.`id` = #{id} and br.`merchant_id` = #{merchantId} and br.`status` = #{status} and br.`apply_status` = #{applyStatus} and br.`is_del` = #{isDel} and br.`type` = #{type} and br.`rent_shop_type` = #{rentShopType} and br.`pay_way` = #{payWay} and br.`starttime` <= #{starttime} and br.`endtime` >= #{endtime} and date_format(br.starttime,'%Y-%m') <= #{month} and date_format(br.endtime,'%Y-%m') >= #{month} and br.`build_way` = #{buildWay} and br.`merchant_id` in #{midItem} update wx_bill_daily set status=#{notPaid},expired_day=DATEDIFF(now(),receive_date) where status!=#{paid} and `tenant_id` = #{tenantId} and `parent_tenant_id` = #{parentTenantId} and DATEDIFF(now(),receive_date)>0 update wx_bill_daily set status=#{waitPay} where status!=#{paid} and `tenant_id` = #{tenantId} and `parent_tenant_id` = #{parentTenantId} and DATEDIFF(now(),receive_date) <=0