`id`,`merchant_id`,`price`,`rental_start_date`,`rental_end_date`,
`sign_date`,`receive_period`,`tenant_id`,`parent_tenant_id`,`filepath`,`status`,`contract_number`,
`deposit`,`pay_date`,`is_del`,`merchant_name`,`brand`,`business_id`,
`shop_type`,`updatetime`,`createtime`,`rent_area`,`rent_shop_type`,
`link_person`,`link_phone`,`pay_account`,`filename`,`lease`,`rent_contract_id`,
`start_date`,`end_date`,`apply_status`,`adjust_period`,`business_type`,adjust_ratio,`rent_info`,fixed_price,
`file_names`,price_unit,rent_price,subject_name,rent_start_type,`operation_type`,late_pay_ratio,late_pay_day
where 1 = 1
and `id` = #{id}and `merchant_id` = #{merchantId}and `price` = #{price}and `rental_start_date` = #{rentalStartDate}and `rental_end_date` = #{rentalEndDate}and `sign_date` = #{signDate}and `receive_period` = #{receivePeriod}
and `tenant_id` = #{tenantId}
and `parent_tenant_id` = #{parentTenantId}
and `filepath` = #{filepath}and `status` = #{status}and `apply_status` = #{applyStatus}and `contract_number` = #{contractNumber}and `deposit` = #{deposit}and `pay_date` = #{payDate}and `is_del` = #{isDel}and `merchant_name` like concat('%', #{merchantName},'%') and `brand` = #{brand}and `business_id` = #{businessId}and `shop_type` = #{shopType}and `updatetime` = #{updatetime}and `createtime` = #{createtime}and `rent_area` = #{rentArea}and `link_person` = #{linkPerson}and `link_phone` = #{linkPhone}and `pay_account` = #{payAccount}and `filename` = #{filename}and `lease` = #{lease}and `rent_contract_id` = #{rentContractId}and `start_date` = #{startDate}and `end_date` = #{endDate}and `rent_shop_type` = #{rentShopType}and `operation_type` = #{operationType}
and business_id in (${businessForRule})
and `id` in
select id from wx_property_contract where 1=1
and `tenant_id` = #{tenantId}
and `parent_tenant_id` = #{parentTenantId}
and json_unquote(json_extract(json_extract(rent_info,'$[*].shopId'),concat('$[',#{idx},']'))) in(select
id from wx_shop where 1=1
and `tenant_id` = #{tenantId}
and `parent_tenant_id` = #{parentTenantId}
and floor in (${floorForRule}))
and id in
#{idItem}
and status in
#{statusItem}
order by ${sortColumns}
update wx_property_contract set status=#{status} where status!=1 and status!=5 and status!=6 and status!=7
and `tenant_id` = #{tenantId}
and `parent_tenant_id` = #{parentTenantId}
and DATEDIFF(rental_end_date,now()) <= 30 and rental_end_date > now()
update wx_property_contract set status=#{status} where status!=1 and status!=5 and status!=6 and status!=7
and `tenant_id` = #{tenantId}
and `parent_tenant_id` = #{parentTenantId}
and rental_start_date <= now() and rental_end_date >= now()
update wx_property_contract set status=#{status} where status!=1 and status!=5 and status!=6 and status!=7
and `tenant_id` = #{tenantId}
and `parent_tenant_id` = #{parentTenantId}
and rental_end_date <now()
update wx_property_contract set status=#{status} where status!=7
and `tenant_id` = #{tenantId}
and `parent_tenant_id` = #{parentTenantId}
and merchant_id is null
update wx_property_contract set apply_status=#{applyStatus}
,business_type=#{businessType},status=#{status}
where id=#{id}
update wx_property_contract set apply_status=#{applyStatus}
,business_type=#{businessType},status=#{status}
where rent_contract_id=#{rentContractId} and id = #{id}
update wx_property_contract set status=#{status} where id=#{id}
update wx_property_contract set status=#{status} where rent_contract_id=#{rentContractId}
update wx_property_contract set status=#{status},updatetime = #{updatetime} where rent_contract_id =#{rentContractId}
and status in
#{statusItem}