From 089bfb8970ae6faa62c9d1cdf9bd297922ed4caa Mon Sep 17 00:00:00 2001 From: gongbiao Date: Mon, 15 Apr 2019 18:19:36 +0800 Subject: [PATCH] =?UTF-8?q?[BUG][ID1001242][dev=20version:.878.1297?= =?UTF-8?q?=EF=BC=9A=E5=90=88=E5=90=8C-=E5=95=86=E9=93=BA=E5=8F=B7?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=B2=A1=E6=9C=89=E5=8F=8D=E5=BA=94=EF=BC=8C?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3500=EF=BC=8C=E8=A7=81=E8=AF=84=E8=AE=BA]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/WxPropertyContractMapper.xml | 6 +++++- .../resources/mapper/WxRentContractMapper.xml | 20 ++++++++++++++----- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/mallinkService/src/main/resources/mapper/WxPropertyContractMapper.xml b/mallinkService/src/main/resources/mapper/WxPropertyContractMapper.xml index af370fdb4..047b72128 100644 --- a/mallinkService/src/main/resources/mapper/WxPropertyContractMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxPropertyContractMapper.xml @@ -119,7 +119,11 @@ and rc.`merchant_name` like concat('%',#{merchantName},'%') - and s.`shop_number` like concat('%',#{shopNumber},'%') + + and json_extract(rc.rent_info,'$[*].shopNumber') like concat('%',#{shopNumber},'%') + + + and s.`shop_number` like concat('%',#{shopNumber},'%') and rc.`status` = #{status} and rc.`rent_contract_id` = #{rentContractId} diff --git a/mallinkService/src/main/resources/mapper/WxRentContractMapper.xml b/mallinkService/src/main/resources/mapper/WxRentContractMapper.xml index 7cc7b0323..89997e4f6 100644 --- a/mallinkService/src/main/resources/mapper/WxRentContractMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxRentContractMapper.xml @@ -112,7 +112,7 @@ rc.price,rc.contract_number contractNumber,s.shop_number shopNumber,f.floor_name floorName,b.building_name buildingName, rc.lease,rc.filepath,rc.filename,rc.pay_account payAccount,rc.sign_date signDate,rc.merchant_id merchantId,rc.type, rc.start_date startDate,rc.end_date endDate,br.`name` brandName,rc.apply_status applyStatus,rc.bank_name - bankName,rc.merchant_id merchantId,rc.rent_shop_type rentShopType,rc.fix_start_date fixStartDate,rc.fix_end_date fixEndDate + bankName,rc.rent_shop_type rentShopType,rc.fix_start_date fixStartDate,rc.fix_end_date fixEndDate ,rc.business_type businessType,rc.adjust_period adjustPeriod,rc.rent_info rentInfo, rc.file_names fileNames from wx_rent_contract rc left join wx_shop s on rc.shop_id=s.id @@ -122,9 +122,14 @@ rc.tenant_id=#{tenantId} and rc.`merchant_name` like concat('%',#{merchantName},'%') - and s.`shop_number` like concat('%',#{shopNumber},'%') + + and json_extract(rc.rent_info,'$[*].shopNumber') like concat('%',#{shopNumber},'%') + + + and s.`shop_number` like concat('%',#{shopNumber},'%') + and rc.`status` = #{status} - and rc.`shop_id` = #{shopId} + and rc.`shop_id` = #{shopId} and rc.`type` = #{type} and rc.`rent_shop_type` = #{rentShopType} @@ -186,7 +191,7 @@ update wx_rent_contract set status=#{status} where shop_id in ( select s.shop_id from (SELECT shop_id FROM wx_rent_contract WHERE tenant_id = #{tenantId} and status in(2,3,4) - )s) and status=1 and status!=7 and tenant_id=#{tenantId} + )s) and status=1 and status!=7 and tenant_id=#{tenantId} and rent_shop_type=2 - + + + update wx_rent_contract set status=#{status} where tenant_id=#{tenantId} and id in(select r.id from ( + select id from wx_rent_contract where json_contains(json_extract(rent_info,'$[*].shopId'),concat('"',${shopId},'"')) + and rent_shop_type=1 and status in(0,1) and status!=7)r) +