`id`,`customers_id`,`tenant_id`,`parent_tenant_id`, `decimal_size`,`rental_start_date`,`rental_end_date`,`sign_date`, `filepath`,`status`,`contract_number`,`create_by`,`update_by`, `day_price_calcute`,`month_average_days`, cashtype_content_lsit,`is_del`, `updatetime`,`createtime`,`link_person`,`link_phone`,`link_address`, `lease`,`type`, `from_id`,`end_contract_time`, `apply_status`,`create_by_name`,`update_by_name`, `rent_info`, `file_names`, shop_id_str, design_file,remark,orgin_id where 1 = 1 and `id` = #{id} and `from_id` = #{fromId} and `orgin_id` = #{orginId} and `customers_id` = #{customersId} and `rental_start_date` = #{rentalStartDate} and `rental_end_date` = #{rentalEndDate} and ( (`rental_start_date` <= #{useStartTime} and rental_end_date > #{useStartTime}) or (`rental_start_date` >= #{useStartTime} and rental_start_date < #{useEndTime}) ) and `sign_date` = #{signDate} and `tenant_id` = #{tenantId} and `parent_tenant_id` = #{parentTenantId} and `filepath` = #{filepath} and `status` = #{status} and `apply_status` = #{applyStatus} and `contract_number` = #{contractNumber} and `is_del` = #{isDel} and `updatetime` = #{updatetime} and `createtime` = #{createtime} and `link_person` = #{linkPerson} and `link_phone` = #{linkPhone} and `lease` = #{lease} and `type` = #{type} and json_contains(json_extract(rent_info,'$[*].id'),concat('"',#{queryShopId},'"')) and `day_price_calcute` = #{dayPriceCalcute} and `month_average_days` = #{monthAverageDays} and `orgin_id` is null and concat(',',shop_id_str,',') like concat('%,',#{queryShopId},',%') and customers_id in #{cusItem} and status in #{statusItem} and type in #{typeItem} and id in #{idItem} order by ${sortColumns} update wx_rent_contract set apply_status=#{applyStatus} ,status=#{status} where id=#{id} update wx_rent_contract set status=#{status} where id=#{id} update wx_rent_contract set end_contract_time = #{endContractTime} where id = #{id} insert into wx_rent_contract_valid_delete select * from wx_rent_contract where id = #{id} and `tenant_id` = #{tenantId} delete from wx_rent_contract where `tenant_id` = #{tenantId} and id = #{id} update wx_rent_contract set id = #{newId},orgin_id = null, where id = #{oldId} and `tenant_id` = #{tenantId}