`id`,`property_contract_id`,`receive_pay`,`pay`,`receive_date`,`pay_date`, `createtime`,`expired_day`,`tenant_id`,`owe`,`status`,`is_del`,`need_pay`, `merchant_id`,`user_id`,`shop_id`,`updatetime`,`rent_shop_type`, `revenue`,`late_pay_ratio`,`late_pay_time`,`late_pay_price`,`period`,`is_preview`,`shop_info`, `pay_way`,`late_pay_status`,`comments` where 1=1 and `id` = #{id} and `property_contract_id` = #{propertyContractId} 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 `owe` = #{owe} and `status` = #{status} and `is_del` = #{isDel} and `need_pay` = #{needPay} and `merchant_id` = #{merchantId} and `user_id` = #{userId} and `shop_id` = #{shopId} and `updatetime` = #{updatetime} and `rent_shop_type` = #{rentShopType} and is_preview = #{isPreview} and `pay_way` = #{payWay} and `late_pay_status` = #{latePayStatus} and id in #{idItem} order by ${sortColumns} update wx_bill_property set status=#{notPaid},expired_day=DATEDIFF(now(),receive_date) where tenant_id=#{tenantId} and status!=#{paid} and status != 6 and DATEDIFF(now(),receive_date)>0 update wx_bill_property set status=#{waitPay} where id in( select a.id from (select br.id,rc.receive_period,br.property_contract_id,br.receive_date from wx_bill_property br left join wx_property_contract rc on br.property_contract_id=rc.id where br.tenant_id=#{tenantId} and br.status!=#{paid} and br.status != 6 and now() < br.receive_date and DATE_ADD(now(),INTERVAL 1 MONTH)>br.receive_date) a) update wx_bill_property set status = 6 where property_contract_id = #{propertyContractId} and status in(4,2) update wx_bill_property set status = 6 where property_contract_id in (select id from wx_property_contract where rent_contract_id = #{id}) and status != 3 delete from wx_bill_property where property_contract_id = #{id} update wx_bill_property set updatetime = now() ,receive_pay = #{receivePay},owe=#{receivePay} ,comments = #{comments} ,receive_date = #{receiveDate} ,status = 3,pay_date=now() where id = #{id} update wx_bill_property set is_preview = #{isPreview},merchant_id = #{merchantId} where property_contract_id = #{propertyContractId}