From 9651b6394c5ebb8cc91f582f7e432e5055c42975 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Thu, 1 Nov 2018 14:21:08 +0800 Subject: [PATCH] =?UTF-8?q?[=E8=B4=A6=E5=8D=95=E6=80=BB=E8=A7=88][?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0][=E6=9F=A5=E8=AF=A2=E5=85=B6=E4=BB=96?= =?UTF-8?q?=E8=B4=A6=E5=8D=95]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/WxMerchantServiceImpl.java | 3 ++ .../main/resources/mapper/WxBillAllMapper.xml | 36 ++++++++++--------- 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java index 9a782f340..7809dfe34 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java @@ -96,6 +96,9 @@ public class WxMerchantServiceImpl implements WxMerchantService { @Override public WxMerchant getById(Long id) { WxMerchant wxMerchant = wxMerchantMapper.selectByPrimaryKey(id); + if(wxMerchant==null){ + return null; + } WxMerchantShop wxMerchantShop = new WxMerchantShop(); wxMerchantShop.setMerchantId(wxMerchant.getId()); wxMerchantShop.setIsDel(EnumDelStatus.NOT_DEL.getCode()); diff --git a/mallinkService/src/main/resources/mapper/WxBillAllMapper.xml b/mallinkService/src/main/resources/mapper/WxBillAllMapper.xml index 62f2d2a86..bf8a6524b 100644 --- a/mallinkService/src/main/resources/mapper/WxBillAllMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillAllMapper.xml @@ -4,19 +4,21 @@ select bill.id,bill.merchant_id merchantId,bill.shop_id shopId,bill.bill_type_value billTypeValue,bill.bill_type billType,bill.need_pay needPay, - bill.receive_pay receivePay,bill.pay,bill.owe,bill.receive_date receiveDate,bill.pay_date payDate, - bill.expired_day expiredDay,bill.status,bill.tenant_id tenantId,m.name merchantName,s.shop_number shopNumber,bill.starttime,bill.endtime from ( - select id,merchant_id,shop_id,tenant_id,1 bill_type_value,'租金' bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime from wx_bill_rent + bill.receive_pay receivePay,bill.pay,bill.owe,bill.receive_date receiveDate,bill.pay_date payDate,bill.expired_day expiredDay,bill.status, + bill.tenant_id tenantId,m.name merchantName,s.shop_number shopNumber,bill.starttime,bill.endtime,bill.name from ( + select id,merchant_id,shop_id,tenant_id,'租金' name,1 bill_type_value,'租金' bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime from wx_bill_rent + union + 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 from wx_bill_rent_deposit union - select id,merchant_id,shop_id,tenant_id,2 bill_type_value,'租赁押金' bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime from wx_bill_rent_deposit + select id,merchant_id,shop_id,tenant_id,'物业费' name,3 bill_type_value,'物业费' bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime from wx_bill_property union - select id,merchant_id,shop_id,tenant_id,3 bill_type_value,'物业费' bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime from wx_bill_property + 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 from wx_bill_property_deposit union - select id,merchant_id,shop_id,tenant_id,4 bill_type_value,'物业押金' bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime from wx_bill_property_deposit + select id,merchant_id,shop_id,tenant_id,'水费' name,5 bill_type_value,'水费' bill_type, '' need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime from wx_bill_daily where type=1 union - select id,merchant_id,shop_id,tenant_id,5 bill_type_value,'水费' bill_type, '' need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime from wx_bill_daily where type=1 + select id,merchant_id,shop_id,tenant_id,'电费' name,6 bill_type_value,'电费' bill_type,'' need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime from wx_bill_daily where type=2 union - select id,merchant_id,shop_id,tenant_id,6 bill_type_value,'电费' bill_type,'' need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime from wx_bill_daily where type=2 + select id,merchant_id,shop_id,tenant_id,name,7 bill_type_value,'其他' bill_type,'' need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime from wx_bill_other ) bill left join wx_merchant m on bill.merchant_id=m.id left join wx_shop s on bill.shop_id=s.id