From f60b47e44640536c5cd99bb3213b0fe66db9c343 Mon Sep 17 00:00:00 2001 From: Burce Date: Thu, 24 Oct 2019 14:44:24 +0800 Subject: [PATCH 01/11] =?UTF-8?q?[=E6=8B=9B=E5=95=86]update=20sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/db/migration/V201910241500__W_INVEST_ALTER.sql | 1 + .../iformall/service/invest/impl/InvestTaskServiceImpl.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 mallinkAdmin/src/main/resources/db/migration/V201910241500__W_INVEST_ALTER.sql diff --git a/mallinkAdmin/src/main/resources/db/migration/V201910241500__W_INVEST_ALTER.sql b/mallinkAdmin/src/main/resources/db/migration/V201910241500__W_INVEST_ALTER.sql new file mode 100644 index 000000000..920f76d95 --- /dev/null +++ b/mallinkAdmin/src/main/resources/db/migration/V201910241500__W_INVEST_ALTER.sql @@ -0,0 +1 @@ +ALTER TABLE `invest_task` ADD COLUMN `last_time` datetime DEFAULT NULL COMMENT '最晚出租时间' AFTER `content`; \ No newline at end of file diff --git a/mallinkService/src/main/java/com/iformall/service/invest/impl/InvestTaskServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/invest/impl/InvestTaskServiceImpl.java index 8c37a14d8..015b7ea9b 100755 --- a/mallinkService/src/main/java/com/iformall/service/invest/impl/InvestTaskServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/invest/impl/InvestTaskServiceImpl.java @@ -35,7 +35,7 @@ public class InvestTaskServiceImpl extends InvestBaseServiceImpl updateWrapper) { super.updateActon(entity, updateWrapper, this::checkBeforeSaveOrUpdate); @@ -43,7 +43,7 @@ public class InvestTaskServiceImpl extends InvestBaseServiceImpl Date: Thu, 24 Oct 2019 15:15:18 +0800 Subject: [PATCH 02/11] =?UTF-8?q?[=E5=90=88=E5=90=8C][=E4=BF=AE=E6=94=B9][?= =?UTF-8?q?=E8=B4=A6=E5=8D=95=E6=AC=A0=E7=BC=B4]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/WxBillPropertyMapper.xml | 5 +++-- .../src/main/resources/mapper/WxBillRentMapper.xml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml b/mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml index bbe2ca89e..958eadc43 100644 --- a/mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml @@ -181,7 +181,8 @@ - update wx_bill_property set is_preview = #{isPreview},merchant_id = #{merchantId},need_pay = receive_pay,owe=receive_pay + update wx_bill_property set is_preview = #{isPreview},merchant_id = #{merchantId},need_pay = receive_pay, + owe=receive_pay + service_charge_pay + ifnull(late_pay_price,0) - pay where property_contract_id = #{propertyContractId} @@ -270,7 +271,7 @@ - update wx_bill_property set service_charge_pay=round(receive_pay*#{serviceChargeRate}/10000) where tenant_id=#{tenantId} and service_charge_pay=0 and status in(1,2,4) + update wx_bill_property set service_charge_pay=round(receive_pay*#{serviceChargeRate}/10000),owe=receive_pay + service_charge_pay + ifnull(late_pay_price,0) - pay where tenant_id=#{tenantId} and service_charge_pay=0 and status in(1,2,4) diff --git a/mallinkService/src/main/resources/mapper/WxBillRentMapper.xml b/mallinkService/src/main/resources/mapper/WxBillRentMapper.xml index e063bd4d1..c32d69594 100644 --- a/mallinkService/src/main/resources/mapper/WxBillRentMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillRentMapper.xml @@ -188,7 +188,8 @@ - update wx_bill_rent set is_preview = #{isPreview},merchant_id = #{merchantId},need_pay = receive_pay,owe=receive_pay + update wx_bill_rent set is_preview = #{isPreview},merchant_id = #{merchantId},need_pay = receive_pay, + owe=receive_pay + service_charge_pay + ifnull(late_pay_price,0) - pay where rent_contract_id = #{rentContractId} @@ -276,7 +277,7 @@ - update wx_bill_rent set service_charge_pay=round(receive_pay*#{serviceChargeRate}/10000) where tenant_id=#{tenantId} and service_charge_pay=0 and status in(1,2,4) + update wx_bill_rent set service_charge_pay=round(receive_pay*#{serviceChargeRate}/10000),owe=receive_pay + service_charge_pay + ifnull(late_pay_price,0) - pay where tenant_id=#{tenantId} and service_charge_pay=0 and status in(1,2,4) From 4168b42813a8cbd1029efe9683dae6006a7e9379 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Thu, 24 Oct 2019 15:18:20 +0800 Subject: [PATCH 03/11] =?UTF-8?q?[=E8=B4=A6=E5=8D=95][=E4=BF=AE=E6=94=B9][?= =?UTF-8?q?=E6=AC=A0=E7=BC=B4=E6=98=BE=E7=A4=BA]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/iformall/service/impl/WxBillDailyServiceImpl.java | 2 ++ .../iformall/service/impl/WxBillOtherDepositServiceImpl.java | 2 ++ .../java/com/iformall/service/impl/WxBillOtherServiceImpl.java | 2 ++ .../com/iformall/service/impl/WxBillPropertyServiceImpl.java | 2 ++ .../java/com/iformall/service/impl/WxBillRentServiceImpl.java | 2 ++ 5 files changed, 10 insertions(+) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxBillDailyServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxBillDailyServiceImpl.java index e7889159b..30a419537 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxBillDailyServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxBillDailyServiceImpl.java @@ -85,6 +85,8 @@ public class WxBillDailyServiceImpl implements WxBillDailyService { e.setServiceChargePay(servicePay.intValue()); if (!e.getStatus().equals(EnumBillRentStatus.NOT_PAID.getCode())) { e.setOwe(0L); + } else { + e.setOwe(realReceivePay - e.getPay()); } } } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherDepositServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherDepositServiceImpl.java index 18f3416aa..d021d5bdb 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherDepositServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherDepositServiceImpl.java @@ -80,6 +80,8 @@ public class WxBillOtherDepositServiceImpl implements WxBillOtherDepositService e.setServiceChargePay(servicePay.intValue()); if (!e.getStatus().equals(EnumBillRentStatus.NOT_PAID.getCode())) { e.setOwe(0L); + } else { + e.setOwe(realReceivePay - e.getPay()); } } } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherServiceImpl.java index 1ece26969..b333990cf 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherServiceImpl.java @@ -80,6 +80,8 @@ public class WxBillOtherServiceImpl implements WxBillOtherService { e.setServiceChargePay(servicePay.intValue()); if (!e.getStatus().equals(EnumBillRentStatus.NOT_PAID.getCode())) { e.setOwe(0L); + } else { + e.setOwe(realReceivePay - e.getPay()); } } } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyServiceImpl.java index f64a20240..5b9159168 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyServiceImpl.java @@ -87,6 +87,8 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService { e.setServiceChargePay(servicePay.intValue()); if (!e.getStatus().equals(EnumBillRentStatus.NOT_PAID.getCode())) { e.setOwe(0L); + } else { + e.setOwe(realReceivePay - e.getPay()); } } } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxBillRentServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxBillRentServiceImpl.java index 6dc653cc6..e6be60b48 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxBillRentServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxBillRentServiceImpl.java @@ -89,6 +89,8 @@ public class WxBillRentServiceImpl implements WxBillRentService { rent.setServiceChargePay(servicePay.intValue()); if (!rent.getStatus().equals(EnumBillRentStatus.NOT_PAID.getCode())) { rent.setOwe(0L); + } else { + rent.setOwe(realReceivePay - rent.getPay()); } } } From 537c0dfeab9b6c65e4d121aa556612b2f53b282b Mon Sep 17 00:00:00 2001 From: Burce Date: Thu, 24 Oct 2019 15:22:08 +0800 Subject: [PATCH 04/11] =?UTF-8?q?[=E6=8B=9B=E5=95=86]adjust?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/invest/impl/InvestBizServiceImpl.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java index 370ec72eb..ea84f9429 100644 --- a/mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java @@ -92,6 +92,8 @@ public class InvestBizServiceImpl implements InvestBizService { } List demandList = demandService.list(new LambdaQueryWrapper<>(demandParams)); LambdaQueryWrapper queryWrapperCustomer = new LambdaQueryWrapper<>(customerParams); + queryWrapperCustomer.like(StringUtils.isNotBlank(params.getCustomerNo()), InvestCustomerEntity::getCustomerNo, params.getCustomerNo()); + if (Objects.isNull(InvestUserContext.getDataUser())) { if (CollectionUtils.isEmpty(demandList) && Objects.nonNull(params.getDemandOwner())) { return investPage; @@ -105,7 +107,7 @@ public class InvestBizServiceImpl implements InvestBizService { queryWrapperCustomer.in(CollectionUtils.isNotEmpty(demandList),InvestCustomerEntity::getId, getIds(demandList, InvestDemandEntity::getCustomerId)); } } - queryWrapperCustomer.like(StringUtils.isNotBlank(params.getCustomerNo()), InvestCustomerEntity::getCustomerNo, params.getCustomerNo()); + queryWrapperCustomer.orderByDesc(InvestCustomerEntity::getCreateDate); InvestPageResult customers = customerService.queryPage(buildPageQuery(params, null), queryWrapperCustomer); List resultList = getTargeInfoList(demandList, customers.getRecords()); @@ -325,7 +327,7 @@ public class InvestBizServiceImpl implements InvestBizService { InvestDemandDto customerBase = convetCustomer(customer, brandMap, businesseMap, shopMap, customerMap); if (customerBase == null) { stringRedisTemplate.opsForHash().increment(importKey, "processCount", 1); - log.error("userBasenull"); + log.error("customerBase null"); } saveCustomerAndDemand(customerBase) ; }); @@ -421,9 +423,8 @@ public class InvestBizServiceImpl implements InvestBizService { private InvestDemandDto doConvertDemand(InvestDemandQuery params) { InvestCustomerEntity customerEntity = null; - if (ObjectUtils.anyNotNull(params.getCustomerNo(), params.getCustomerType(), params.getBusinessId())) { + if (ObjectUtils.anyNotNull(params.getCustomerType(), params.getBusinessId())) { customerEntity = new InvestCustomerEntity(); - customerEntity.setCustomerNo(params.getCustomerNo()); customerEntity.setType(params.getCustomerType()); customerEntity.setBusinessId(params.getBusinessId()); } From af4d0409d7087f8684902ab54d7d6f42647525ec Mon Sep 17 00:00:00 2001 From: Burce Date: Thu, 24 Oct 2019 15:40:36 +0800 Subject: [PATCH 05/11] =?UTF-8?q?[=E6=8B=9B=E5=95=86]adjust?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/invest/impl/InvestFollowRecordServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mallinkService/src/main/java/com/iformall/service/invest/impl/InvestFollowRecordServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/invest/impl/InvestFollowRecordServiceImpl.java index f8f0a72b0..193399f64 100755 --- a/mallinkService/src/main/java/com/iformall/service/invest/impl/InvestFollowRecordServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/invest/impl/InvestFollowRecordServiceImpl.java @@ -33,7 +33,7 @@ public class InvestFollowRecordServiceImpl extends InvestBaseServiceImpl Date: Thu, 24 Oct 2019 15:47:58 +0800 Subject: [PATCH 06/11] =?UTF-8?q?[=E8=90=A5=E9=94=80=E7=BB=93=E7=AE=97][?= =?UTF-8?q?=E4=BF=AE=E6=94=B9][=E6=80=BB=E8=AE=A1]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/iformall/controller/WxMerchantSubsidyController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mallinkBApi/src/main/java/com/iformall/controller/WxMerchantSubsidyController.java b/mallinkBApi/src/main/java/com/iformall/controller/WxMerchantSubsidyController.java index 142dd779c..d5ea4ee60 100644 --- a/mallinkBApi/src/main/java/com/iformall/controller/WxMerchantSubsidyController.java +++ b/mallinkBApi/src/main/java/com/iformall/controller/WxMerchantSubsidyController.java @@ -63,7 +63,9 @@ public class WxMerchantSubsidyController extends BaseController { if (null == wxMerchantSubsidy) { wxMerchantSubsidy = new WxMerchantSubsidyVo(); } - wxMerchantSubsidy.setTenantId(getTenantId()); + WxMerchantBUser user = getUser(); + wxMerchantSubsidy.setTenantId(user.getTenantId()); + wxMerchantSubsidy.setMerchantId(user.getMerchantId()); Map data = wxMerchantSubsidyService.summary(wxMerchantSubsidy); return new ResultData(data); } From db8eaf05fe4c4a07964d5da9f740d69b5fd9a9d3 Mon Sep 17 00:00:00 2001 From: Burce Date: Thu, 24 Oct 2019 15:53:45 +0800 Subject: [PATCH 07/11] =?UTF-8?q?[=E6=8B=9B=E5=95=86]adjust?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/iformall/domain/po/invest/InvestTaskEntity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mallinkService/src/main/java/com/iformall/domain/po/invest/InvestTaskEntity.java b/mallinkService/src/main/java/com/iformall/domain/po/invest/InvestTaskEntity.java index 0c360ebbc..3e625a5f2 100755 --- a/mallinkService/src/main/java/com/iformall/domain/po/invest/InvestTaskEntity.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/invest/InvestTaskEntity.java @@ -24,7 +24,7 @@ import java.util.Date; public class InvestTaskEntity extends InvestBaseEntity { public static final String KEY_CONTRACT_ID = "contractId" ; - public static final String KEY_CONTRACT_TYPE = "ContractType" ; + public static final String KEY_CONTRACT_TYPE = "contractType" ; /** * 负责人 From 90652f41ebaa6015a4092b87ddb55bb5ff6bbc71 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Thu, 24 Oct 2019 16:09:39 +0800 Subject: [PATCH 08/11] =?UTF-8?q?[=E8=B4=A6=E5=8D=95][=E4=BF=AE=E6=94=B9][?= =?UTF-8?q?=E6=8A=BC=E9=87=91=E6=89=8B=E7=BB=AD=E8=B4=B9]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/WxBillDepositServiceImpl.java | 6 ++-- .../main/resources/mapper/WxBillAllMapper.xml | 32 +++++++++---------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxBillDepositServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxBillDepositServiceImpl.java index 1affcfc74..2e1b90847 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxBillDepositServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxBillDepositServiceImpl.java @@ -50,13 +50,13 @@ public class WxBillDepositServiceImpl implements WxBillDepositService { @Override public PageInfo listAsPage(WxBillDeposit record, Integer pageIndex, Integer pageSize) { - WxPayAccountBill wxPayAccountBill = wxPayAccountBillService.getByTenantId(record.getTenantId()); + //WxPayAccountBill wxPayAccountBill = wxPayAccountBillService.getByTenantId(record.getTenantId()); PageHelper.startPage(pageIndex, pageSize); List billDepositList = wxBillDepositMapper.queryBillDepositList(record); - billDepositList.stream().forEach(e->{ +/* billDepositList.stream().forEach(e->{ //手续费 = 合同应收+手续费+滞纳金 computeTotalMoney(wxPayAccountBill, e); - }); + });*/ PageInfo pageInfo = new PageInfo<>(billDepositList); return pageInfo; } diff --git a/mallinkService/src/main/resources/mapper/WxBillAllMapper.xml b/mallinkService/src/main/resources/mapper/WxBillAllMapper.xml index efe661eb7..0d64de599 100644 --- a/mallinkService/src/main/resources/mapper/WxBillAllMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillAllMapper.xml @@ -65,7 +65,7 @@ select id,merchant_id,shop_id,tenant_id,'租赁押金' name,2 bill_type_value,'租赁押金' bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime, endtime,rent_shop_type,shop_info,NULL comments,'' price_detail,updatetime,freeze,0 - late_pay_price,service_charge_pay + late_pay_price,0 service_charge_pay from wx_bill_rent_deposit where tenant_id=#{tenantId} union all select id,merchant_id,shop_id,tenant_id,'物业费' name,3 bill_type_value,'物业费' @@ -77,7 +77,7 @@ select id,merchant_id,shop_id,tenant_id,'物业押金' name,4 bill_type_value,'物业押金' bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime, endtime,rent_shop_type,shop_info,NULL comments,'' price_detail,updatetime,freeze,0 - late_pay_price,service_charge_pay from wx_bill_property_deposit where + late_pay_price,0 service_charge_pay from wx_bill_property_deposit where tenant_id=#{tenantId} union all select id,merchant_id,shop_id,tenant_id,case when type=1 then '水费' when type=2 then '电费' else '空调费' end name, @@ -259,9 +259,9 @@ (2,3,4)) union all select '' settle_number,id,merchant_id,shop_id,tenant_id,'租赁押金' name,2 bill_type_value,'租赁押金' - bill_type,need_pay,receive_pay,pay,(receive_pay+service_charge_pay-pay) + bill_type,need_pay,receive_pay,pay,(receive_pay-pay) owe,receive_date,pay_date,expired_day,status,starttime,endtime,rent_shop_type,'' - price_detail,freeze,0 late_pay_price,service_charge_pay + price_detail,freeze,0 late_pay_price,0 service_charge_pay from wx_bill_rent_deposit where tenant_id=#{tenantId} and rent_contract_id in (select id from wx_rent_contract where status in (2,3,4)) union all @@ -274,9 +274,9 @@ where status in(2,3,4)) union all select '' settle_number,id,merchant_id,shop_id,tenant_id,'物业押金' name,4 bill_type_value,'物业押金' - bill_type,need_pay,receive_pay,pay,(receive_pay+service_charge_pay-pay) + bill_type,need_pay,receive_pay,pay,(receive_pay-pay) owe,receive_date,pay_date,expired_day,status,starttime,endtime,rent_shop_type,'' - price_detail,freeze,0 late_pay_price,service_charge_pay + price_detail,freeze,0 late_pay_price,0 service_charge_pay from wx_bill_property_deposit where tenant_id=#{tenantId} and property_contract_id in (select id from wx_property_contract where status in (2,3,4)) @@ -308,7 +308,7 @@ owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_rent where is_preview = 0 union all select id,merchant_id,shop_id,tenant_id,2 bill_type_value,'租赁押金' - bill_type,need_pay,receive_pay,pay,(receive_pay+service_charge_pay-pay) + bill_type,need_pay,receive_pay,pay,(receive_pay-pay) owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_rent_deposit union all @@ -318,7 +318,7 @@ wx_bill_property where is_preview = 0 union all select id,merchant_id,shop_id,tenant_id,4 bill_type_value,'物业押金' - bill_type,need_pay,receive_pay,pay,(receive_pay+service_charge_pay-pay) + bill_type,need_pay,receive_pay,pay,(receive_pay-pay) owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_property_deposit union all @@ -356,7 +356,7 @@ owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_rent where is_preview = 0 union all select id,merchant_id,shop_id,tenant_id,2 bill_type_value,'租赁押金' - bill_type,need_pay,receive_pay,pay,(receive_pay+service_charge_pay-pay) + bill_type,need_pay,receive_pay,pay,(receive_pay-pay) owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_rent_deposit union all @@ -366,7 +366,7 @@ wx_bill_property where is_preview = 0 union all select id,merchant_id,shop_id,tenant_id,4 bill_type_value,'物业押金' - bill_type,need_pay,receive_pay,pay,(receive_pay+service_charge_pay-pay) + bill_type,need_pay,receive_pay,pay,(receive_pay-pay) owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_property_deposit union all @@ -745,7 +745,7 @@ select res.id,res.merchant_id,res.shop_id,res.tenant_id,res.name,res.bill_type_value,res.bill_type,res.need_pay, res.receive_pay,res.pay,res.owe owe,res.receive_date,res.pay_date,res.expired_day,res.status,res.starttime,res.endtime,res.rent_shop_type,0 - late_pay_price,service_charge_pay from( + late_pay_price,0 service_charge_pay from( select id,merchant_id,shop_id,tenant_id,'欠缴押金' name,2 bill_type_value,'欠缴押金' bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type,service_charge_pay from wx_bill_rent_deposit where tenant_id = #{tenantId} @@ -753,7 +753,7 @@ union all select id,merchant_id,shop_id,tenant_id,'欠缴押金' name,4 bill_type_value,'欠缴押金' bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' - endtime,rent_shop_type,service_charge_pay from wx_bill_property_deposit where tenant_id = #{tenantId} + endtime,rent_shop_type,0 service_charge_pay from wx_bill_property_deposit where tenant_id = #{tenantId} union all select id,merchant_id,shop_id,tenant_id,'欠缴押金' name,8 bill_type_value,'欠缴押金' bill_type,0 as @@ -804,13 +804,13 @@ select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay,late_pay_price from wx_bill_rent where is_preview = 0 and status not in(3,6) union all - select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay,0 late_pay_price from + select merchant_id,receive_pay,0 receivePay,0 late_pay_price from wx_bill_rent_deposit where status not in(3,6) union all select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay,late_pay_price from wx_bill_property where is_preview = 0 and status not in(3,6) union all - select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay,0 late_pay_price from + select merchant_id,receive_pay,0 receivePay,0 late_pay_price from wx_bill_property_deposit where status not in(3,6) union all select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay,0 late_pay_price from @@ -849,13 +849,13 @@ wx_bill_rent where is_preview = 0 and status not in(3,6) union all - select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay,0 late_pay_price from + select merchant_id,receive_pay,0 receivePay,0 late_pay_price from wx_bill_rent_deposit where status not in(3,6) union all select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay,late_pay_price from wx_bill_property where is_preview = 0 and status not in(3,6) union all - select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay,0 late_pay_price from + select merchant_id,receive_pay,0 receivePay,0 late_pay_price from wx_bill_property_deposit where status not in(3,6) union all select merchant_id,receive_pay,ifnull(service_charge_pay,0) receivePay,0 late_pay_price from From 0311943afaeb4fb8393ffd3d43a284cb10c13f89 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Thu, 24 Oct 2019 16:28:49 +0800 Subject: [PATCH 09/11] =?UTF-8?q?[=E7=BA=BF=E4=B8=8A=E4=BA=A4=E6=98=93][?= =?UTF-8?q?=E4=BF=AE=E6=94=B9][=E6=9F=A5=E8=AF=A2]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mallinkService/src/main/resources/mapper/WxOrderMapper.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mallinkService/src/main/resources/mapper/WxOrderMapper.xml b/mallinkService/src/main/resources/mapper/WxOrderMapper.xml index c4df36f02..70a7a6ac6 100644 --- a/mallinkService/src/main/resources/mapper/WxOrderMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxOrderMapper.xml @@ -560,6 +560,7 @@ left join wx_c_user_basic_info cubi on o.c_user_id=cubi.id left join wx_coupon c on o.product_id=c.id where o.tenant_id=#{tenantId} and c.type!=100 and o.order_status in(0,1,2,3,4,5) + and press_current_num=0 and order_group_id=0 union all select o.id,o.order_number,o.tenant_id,o.product_id,o.payment, case o.order_status when 6 then 0 when 7 then 0 @@ -567,7 +568,7 @@ c.title,cubi.`name` c_user_name,cubi.phone,o.create_date,3 attribute from wx_order o left join wx_c_user_basic_info cubi on o.c_user_id=cubi.id left join wx_coupon c on o.product_id=c.id - where o.tenant_id=#{tenantId} and c.type=8 and o.payment=c.sale_price + where o.tenant_id=#{tenantId} and c.type=8 and press_current_num>0 union all select o.id,o.order_number,o.tenant_id,o.product_id,o.payment, case o.order_status when 10 then 1 when 11 then 1 @@ -576,7 +577,7 @@ c.title,cubi.`name` c_user_name,cubi.phone,o.create_date,4 attribute from wx_order o left join wx_c_user_basic_info cubi on o.c_user_id=cubi.id left join wx_coupon c on o.product_id=c.id - where o.tenant_id=#{tenantId} and c.type=9 and o.payment=c.sale_price + where o.tenant_id=#{tenantId} and c.type=9 and order_group_id>0 ) o From e3887a7b8df702a331fc7db4a9c4ada89080241e Mon Sep 17 00:00:00 2001 From: gongbiao Date: Thu, 24 Oct 2019 16:34:57 +0800 Subject: [PATCH 10/11] =?UTF-8?q?[=E7=BA=BF=E4=B8=8A=E4=BA=A4=E6=98=93][?= =?UTF-8?q?=E4=BF=AE=E6=94=B9][=E6=9F=A5=E8=AF=A2]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mallinkService/src/main/resources/mapper/WxOrderMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mallinkService/src/main/resources/mapper/WxOrderMapper.xml b/mallinkService/src/main/resources/mapper/WxOrderMapper.xml index 70a7a6ac6..906094fcc 100644 --- a/mallinkService/src/main/resources/mapper/WxOrderMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxOrderMapper.xml @@ -560,7 +560,7 @@ left join wx_c_user_basic_info cubi on o.c_user_id=cubi.id left join wx_coupon c on o.product_id=c.id where o.tenant_id=#{tenantId} and c.type!=100 and o.order_status in(0,1,2,3,4,5) - and press_current_num=0 and order_group_id=0 + and ifnull(press_current_num,0)=0 and ifnull(order_group_id)=0 union all select o.id,o.order_number,o.tenant_id,o.product_id,o.payment, case o.order_status when 6 then 0 when 7 then 0 From 34887bccedc7b113ab2865bb3440da6dbcf1a891 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Thu, 24 Oct 2019 16:42:44 +0800 Subject: [PATCH 11/11] =?UTF-8?q?[=E7=BA=BF=E4=B8=8A=E4=BA=A4=E6=98=93][?= =?UTF-8?q?=E4=BF=AE=E6=94=B9][=E5=AF=BC=E5=87=BA]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/iformall/domain/po/WxOrder.java | 2 +- .../iformall/service/impl/WxMerchantSubsidyServiceImpl.java | 2 +- .../java/com/iformall/service/impl/WxOrderServiceImpl.java | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxOrder.java b/mallinkService/src/main/java/com/iformall/domain/po/WxOrder.java index 16a10c509..609f2ee6c 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxOrder.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxOrder.java @@ -122,7 +122,7 @@ public class WxOrder extends BaseEntity { } public String getPaymentStr() { - return payment != null ? new BigDecimal(payment).divide(new BigDecimal(100)).toPlainString() : payStr; + return payment != null ? new BigDecimal(payment).divide(new BigDecimal(100)).toPlainString() : paymentStr; } @Excel(name = "订单金额(元)", width = 20, orderNum = "6") diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxMerchantSubsidyServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxMerchantSubsidyServiceImpl.java index 62292345b..1c53e92c8 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxMerchantSubsidyServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxMerchantSubsidyServiceImpl.java @@ -83,7 +83,7 @@ public class WxMerchantSubsidyServiceImpl implements WxMerchantSubsidyService { Long subsidy = summary.get("subsidy"); String subsidyStr = new BigDecimal(subsidy).divide(new BigDecimal(100)).toPlainString(); WxMerchantSubsidyVo merchantSubsidy = new WxMerchantSubsidyVo(); - merchantSubsidy.setSubsidyStr(subsidyStr); + merchantSubsidy.setSubsidyStr("承付总金额(元): " + subsidyStr); merchantSubsidy.setSource(-1); merchantSubsidy.setType(-1); merchantSubsidy.setFreeze(-1); diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java index ec4991a12..5ccf892eb 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java @@ -1058,8 +1058,8 @@ public class WxOrderServiceImpl implements WxOrderService { String paymentStr = new BigDecimal(payment).divide(new BigDecimal(100)).toPlainString(); String payStr = new BigDecimal(pay).divide(new BigDecimal(100)).toPlainString(); WxOrder order = new WxOrder(); - order.setPayStr(payStr); - order.setPaymentStr(paymentStr); + order.setPayStr("支付总金额(元): " + payStr); + order.setPaymentStr("订单总金额(元): " + paymentStr); order.setOrderStatus(-1); order.setAttribute(-1); list.add(order);