From 3424c31614767364fa98d240463bd842a29ab92e Mon Sep 17 00:00:00 2001 From: luozukai Date: Tue, 13 Aug 2019 16:22:52 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=90=88=E5=90=8C][=E4=BF=AE=E6=94=B9][?= =?UTF-8?q?=E5=BC=80=E5=8F=91=E8=81=94=E8=90=A5=E8=B7=B3=E7=82=B9=E7=8E=87?= =?UTF-8?q?]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iformall/domain/po/WxRentContract.java | 3 + .../resources/mapper/WxRentContractMapper.xml | 89 ++++++++++--------- 2 files changed, 48 insertions(+), 44 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java b/mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java index d465331ee..7046136ef 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java @@ -235,6 +235,9 @@ public class WxRentContract extends BaseEntity { @io.swagger.annotations.ApiModelProperty(value = "联营扣点率", name = "busDiscountRatio") private String busDiscountRatio; + @io.swagger.annotations.ApiModelProperty(value = "联营扣点-时间范围 1年2月3周期", name = "busDiscountTime") + private String busDiscountTime; + public void setAdjustPeriodHandle() { if(EnumPriceUnit.D.getCode().equals(this.getPriceUnit()) && EnumRentContractAdjustPeriod.ADJUST_PERIOD_MONTH.getCode().equals(adjustPeriod)){ this.adjustPeriod = EnumRentContractAdjustPeriod.ADJUST_PERIOD_DAY.getCode(); diff --git a/mallinkService/src/main/resources/mapper/WxRentContractMapper.xml b/mallinkService/src/main/resources/mapper/WxRentContractMapper.xml index 7247b9319..d10c567d4 100644 --- a/mallinkService/src/main/resources/mapper/WxRentContractMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxRentContractMapper.xml @@ -43,7 +43,7 @@ - + @@ -68,28 +68,28 @@ - + - + - `id`,`merchant_id`,`price`,`rental_start_date`,`rental_end_date`,`sign_date`,`receive_period`, - `tenant_id`,`filepath`,`status`,`contract_number`,`deposit`,`pay_date`,`is_del`,`merchant_name`, - `brand`,`business_id`,`shop_type`,`shop_id`,`updatetime`,`createtime`,`link_person`,`link_phone`, - `pay_account`,`filename`,`lease`,`type`,`revenue`,`adjust_ratio`,`adjust_period`,`pay_ratio`, - `start_date`,`end_date`, - `apply_status`,`bank_name`,`rent_shop_type`,`fix_start_date`,`fix_end_date`, - `business_type`,`rent_info`, `file_names`,price_unit,rent_price,`subject_name`,rent_start_type, - `rent_input_way`,`adjust_ratio_way`,`operation_type`,late_pay_ratio,late_pay_day,bus_discount_ratio + `id`,`merchant_id`,`price`,`rental_start_date`,`rental_end_date`,`sign_date`,`receive_period`, + `tenant_id`,`filepath`,`status`,`contract_number`,`deposit`,`pay_date`,`is_del`,`merchant_name`, + `brand`,`business_id`,`shop_type`,`shop_id`,`updatetime`,`createtime`,`link_person`,`link_phone`, + `pay_account`,`filename`,`lease`,`type`,`revenue`,`adjust_ratio`,`adjust_period`,`pay_ratio`, + `start_date`,`end_date`, + `apply_status`,`bank_name`,`rent_shop_type`,`fix_start_date`,`fix_end_date`, + `business_type`,`rent_info`, `file_names`,price_unit,rent_price,`subject_name`,rent_start_type, + `rent_input_way`,`adjust_ratio_way`,`operation_type`,late_pay_ratio,late_pay_day,bus_discount_ratio,bus_discount_time - - + + where 1 = 1 and `id` = #{id} @@ -123,7 +123,7 @@ and `end_date` = #{endDate} and `rent_shop_type` = #{rentShopType} and `operation_type` = #{operationType} - + and id in @@ -132,14 +132,14 @@ order by ${sortColumns} - + - + - + - + - + - + - + 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!=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!=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!=5 and status!=6 and status!=7 and merchant_id is null @@ -233,9 +233,9 @@ 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 in(0,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},'"')) @@ -297,9 +297,9 @@ where status in(2,3,4) and merchant_id = #{merchantId} - + - + @@ -340,9 +340,9 @@ - + - + select * from wx_rent_contract where id in( - select rent_contract_id from wx_bill_rent id = #{id} + select rent_contract_id from wx_bill_rent id = #{id} ) +