update wx_property_contract set status=#{status} where tenant_id=#{tenantId} and status!=1 and status!=6 and status!=7 and DATEDIFF(rental_end_date,now()) <= 30 and rental_end_date > now()
update wx_property_contract set status=#{status} where tenant_id=#{tenantId} and status!=1 and status!=5 and status!=6 and status!=7 and DATEDIFF(rental_end_date,now()) <= 30 and rental_end_date > now()
update wx_property_contract set status=#{status} where tenant_id=#{tenantId} and status!=1 and status!=6 and status!=7 and rental_start_date <= now() and rental_end_date >= now()
update wx_property_contract set status=#{status} where tenant_id=#{tenantId} and status!=1 and status!=5 and status!=6 and status!=7 and rental_start_date <= now() and rental_end_date >= now()
update wx_property_contract set status=#{status} where tenant_id=#{tenantId} and status!=1 and status!=6 and status!=7 and rental_end_date <now()
update wx_property_contract set status=#{status} where tenant_id=#{tenantId} and status!=1 and status!=5 and status!=6 and status!=7 and rental_end_date <now()
update wx_rent_contract set status=#{status} where tenant_id=#{tenantId} and status!=0 and status!=1 and status!=6 and status!=7 and DATEDIFF(rental_end_date,now()) <= 30 and rental_end_date > now()
update wx_rent_contract set status=#{status} where tenant_id=#{tenantId} and status!=0 and status!=5 and status!=1 and status!=6 and status!=7 and DATEDIFF(rental_end_date,now()) <= 30 and rental_end_date > now()
update wx_rent_contract set status=#{status} where tenant_id=#{tenantId} and status!=0 and status!=1 and status!=6 and status!=7 and rental_start_date <= now() and rental_end_date >= now()
update wx_rent_contract set status=#{status} where tenant_id=#{tenantId} and status!=0 and status!=1 and status!=5 and status!=6 and status!=7 and rental_start_date <= now() and rental_end_date >= now()
update wx_rent_contract set status=#{status} where tenant_id=#{tenantId} and status!=0 and status!=1 and status!=6 and status!=7 and rental_end_date <now()
update wx_rent_contract set status=#{status} where tenant_id=#{tenantId} and status!=0 and status!=1 and status!=5 and status!=6 and status!=7 and rental_end_date <now()
update wx_rent_contract set status=#{status} where tenant_id=#{tenantId} and status!=0 and status!=7 and merchant_id is null
update wx_rent_contract set status=#{status} where tenant_id=#{tenantId} and status!=0 and status!=5 and status!=6 and status!=7 and merchant_id is null