From 0acba302fb88ab0a30302b53698b30ab171e2413 Mon Sep 17 00:00:00 2001 From: Stormeye Wu Date: Mon, 28 Jan 2019 15:49:13 +0800 Subject: [PATCH 1/4] =?UTF-8?q?[=E4=BA=A4=E6=98=93=E5=AF=B9=E8=B4=A6?= =?UTF-8?q?=E5=8D=95][=E4=BF=AE=E6=94=B9]:=E5=85=88=E5=8F=AA=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=94=AF=E4=BB=98=E7=9A=84=EF=BC=8C=E9=80=80=E6=AC=BE?= =?UTF-8?q?=E7=9A=84=E5=90=8E=E9=9D=A2=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/WxOrderMapper.xml | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/mallinkService/src/main/resources/mapper/WxOrderMapper.xml b/mallinkService/src/main/resources/mapper/WxOrderMapper.xml index f901dfc48..5c7021587 100644 --- a/mallinkService/src/main/resources/mapper/WxOrderMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxOrderMapper.xml @@ -471,7 +471,7 @@ o.order_status,o.create_date,o.update_date,o.detail,'[多商户交易]' merchant_name,cubi.`name` c_user_name,cubi.phone from ( - select o.* from wx_order o where o.type=0 and o.id in( + select o.* from wx_order o where o.type=0 and o.order_status = 1 and o.id in( select o.id from wx_order o left join wx_coupon_merchant cm on o.product_id=cm.product_id group by o.id having count(o.id)>1)) o left join wx_c_user_basic_info cubi on o.c_user_id=cubi.id @@ -480,7 +480,7 @@ o.order_status,o.create_date,o.update_date,o.detail,m.`name` merchant_name,cubi.`name` c_user_name,cubi.phone from( select o.*,cm.merchant_id from ( - select o.* from wx_order o where o.type=0 and o.id not in( + select o.* from wx_order o where o.type=0 and o.order_status = 1 and o.id not in( select o.id from wx_order o left join wx_coupon_merchant cm on o.product_id=cm.product_id group by o.id having count(o.id)>1) ) o @@ -488,7 +488,7 @@ union all select o.*,mbu.merchant_id from wx_order o left join wx_merchant_b_user mbu on o.product_id=mbu.id - where type in (1,2))o + where o.type in (1,2) and o.order_status = 1 ) o left join wx_merchant m on o.merchant_id=m.id left join wx_c_user_basic_info cubi on o.c_user_id=cubi.id union all @@ -496,7 +496,7 @@ o.order_status,o.create_date,o.update_date,o.detail,m.`name` merchant_name,cubi.`name` c_user_name,cubi.phone from wx_order o left join wx_merchant m on o.product_id=m.id left join wx_c_user_basic_info cubi on o.c_user_id=cubi.id - where o.type=3 + where o.type=3 and o.order_status = 1 ) o @@ -516,49 +516,49 @@ From cc29a5e06603993e88fa10f54ed906f386001d92 Mon Sep 17 00:00:00 2001 From: Stormeye Wu Date: Mon, 28 Jan 2019 15:53:11 +0800 Subject: [PATCH 2/4] =?UTF-8?q?[=E4=BA=A4=E6=98=93=E5=AF=B9=E8=B4=A6?= =?UTF-8?q?=E5=8D=95][=E4=BF=AE=E6=94=B9]:=E5=85=88=E5=8F=AA=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=94=AF=E4=BB=98=E7=9A=84=EF=BC=8C=E9=80=80=E6=AC=BE?= =?UTF-8?q?=E7=9A=84=E5=90=8E=E9=9D=A2=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/WxOrderMapper.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mallinkService/src/main/resources/mapper/WxOrderMapper.xml b/mallinkService/src/main/resources/mapper/WxOrderMapper.xml index 5c7021587..ce13549cb 100644 --- a/mallinkService/src/main/resources/mapper/WxOrderMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxOrderMapper.xml @@ -519,13 +519,13 @@ select o.*, m.`name` merchantName from ( select o.*,cm.merchant_id from wx_order o left join wx_coupon_merchant cm on o.product_id=cm.product_id - where o.type in (0,3) and o.order_status = 1) o1 + where o.type in (0,3) and o.order_status = 1) o left join wx_merchant m on o.merchant_id=m.id union all select o.*,m.`name` merchantName from ( select o.*,mbu.merchant_id from wx_order o left join wx_merchant_b_user mbu on o.product_id=mbu.id - where o.type in (1,2) and o.order_status = 1) o1 + where o.type in (1,2) and o.order_status = 1) o left join wx_merchant m on o.merchant_id=m.id ) o @@ -544,13 +544,13 @@ select o.*,m.`name` merchantName from ( select o.*,cm.merchant_id from wx_order o left join wx_coupon_merchant cm on o.product_id=cm.product_id - where o.type in (0,3) and o.order_status = 1) o1 + where o.type in (0,3) and o.order_status = 1) o left join wx_merchant m on o.merchant_id=m.id union all select o.*,m.`name` merchantName from ( select o.*,mbu.merchant_id from wx_order o left join wx_merchant_b_user mbu on o.product_id=mbu.id - where o.type in (1,2) and o.order_status = 1) o1 + where o.type in (1,2) and o.order_status = 1) o left join wx_merchant m on o.merchant_id=m.id ) o From 7d218057ee9790560c389efc9738e78168ada8ec Mon Sep 17 00:00:00 2001 From: luozukai Date: Mon, 28 Jan 2019 15:59:00 +0800 Subject: [PATCH 3/4] =?UTF-8?q?[=E5=AE=A1=E6=89=B9=E6=B5=81][=E4=BF=AE?= =?UTF-8?q?=E6=94=B9][=E5=AE=A1=E6=89=B9=E5=AE=8C=E6=88=90=E7=89=A9?= =?UTF-8?q?=E4=B8=9A=E7=8A=B6=E6=80=81=E4=BF=AE=E6=94=B9=E9=87=8D=E5=A4=8D?= =?UTF-8?q?]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/iformall/service/impl/WxFlowServiceImpl.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java index 733bfc4bc..8b57f88c9 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java @@ -407,10 +407,6 @@ public class WxFlowServiceImpl implements WxFlowService { String str = getVariableByKey(variables,"contractType"); if(StringUtils.isNotBlank(str)){ contractType = Integer.parseInt(str); - - if(3 == contractType){ //物业合同 - wxPropertyContractService.updatePropertyContractStatus(businessId); - } } updateBusinessStatus(businessId,flowType,contractType,EnumRentContractAppStatus.FINISH.getCode(),supplement); From 3333880ea96a328d3f5a96bcbd29b65c341c107f Mon Sep 17 00:00:00 2001 From: Stormeye Wu Date: Mon, 28 Jan 2019 16:06:30 +0800 Subject: [PATCH 4/4] =?UTF-8?q?[=E4=BA=A4=E6=98=93=E5=AF=B9=E8=B4=A6?= =?UTF-8?q?=E5=8D=95][=E4=BF=AE=E6=94=B9]:=E6=94=AF=E4=BB=98+=EF=BC=8C?= =?UTF-8?q?=E9=80=80=E6=AC=BE-=EF=BC=8C=E5=88=97=E8=A1=A8=E4=B9=9F?= =?UTF-8?q?=E5=8F=AA=E6=98=BE=E7=A4=BA=E6=94=AF=E4=BB=98=E5=92=8C=E9=80=80?= =?UTF-8?q?=E6=AC=BE=E6=88=90=E5=8A=9F=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/WxOrderServiceImpl.java | 26 +++++++++++++++---- .../main/resources/mapper/WxOrderMapper.xml | 16 ++++++------ 2 files changed, 29 insertions(+), 13 deletions(-) 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 7cd243dec..505f66c9d 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java @@ -1085,30 +1085,46 @@ public class WxOrderServiceImpl implements WxOrderService { public void queryOrderSummary(String tenantId, Map result) { String systemTime = DateUtils.getSystemTime("yyyy-MM-dd"); - //全部商户个数 + //总数 Map params = new HashMap<>(); params.put("tenantId", tenantId); String thirtyTime = DateUtils.getTimeBefore(29, new Date()); params.put("startdate", thirtyTime + " 00:00:00"); params.put("enddate", systemTime + " 23:59:59"); - Long allOrderSummary=wxOrderMapper.queryOrderForSum(params); + params.put("order_status", "1"); + Long allPayOrderSummary=wxOrderMapper.queryOrderForSum(params); + params.put("order_status", "4"); + Long allRefundOrderSummary=wxOrderMapper.queryOrderForSum(params); + Long allOrderSummary = allPayOrderSummary - allRefundOrderSummary; result.put("allOrderSummary",allOrderSummary); //今日 params.put("startdate", systemTime + " 00:00:00"); params.put("enddate", systemTime + " 23:59:59"); - Long todayOrderSummary=wxOrderMapper.queryOrderForSum(params); + params.put("order_status", "1"); + Long todayPayOrderSummary=wxOrderMapper.queryOrderForSum(params); + params.put("order_status", "4"); + Long todayRefundOrderSummary=wxOrderMapper.queryOrderForSum(params); + Long todayOrderSummary=todayPayOrderSummary-todayRefundOrderSummary; result.put("todayOrderSummary",todayOrderSummary); //昨日 String yesterday = DateUtils.getTimeBefore(1, new Date()); params.put("startdate", yesterday + " 00:00:00"); params.put("enddate", yesterday + " 23:59:59"); - Long yesterdayOrderSummary=wxOrderMapper.queryOrderForSum(params); + params.put("order_status", "1"); + Long yesterdayPayOrderSummary=wxOrderMapper.queryOrderForSum(params); + params.put("order_status", "4"); + Long yesterdayRefundOrderSummary=wxOrderMapper.queryOrderForSum(params); + Long yesterdayOrderSummary = yesterdayPayOrderSummary - yesterdayRefundOrderSummary; result.put("yesterdayOrderSummary",yesterdayOrderSummary); //上周 String lastweek = DateUtils.getTimeBefore(7, new Date()); params.put("startdate", lastweek + " 00:00:00"); params.put("enddate", lastweek + " 23:59:59"); - Long lastweekOrderSummary=wxOrderMapper.queryOrderForSum(params); + params.put("order_status", "1"); + Long lastweekPayOrderSummary=wxOrderMapper.queryOrderForSum(params); + params.put("order_status", "4"); + Long lastweekRefundOrderSummary=wxOrderMapper.queryOrderForSum(params); + Long lastweekOrderSummary=lastweekPayOrderSummary - lastweekRefundOrderSummary; result.put("lastweekOrderSummary",lastweekOrderSummary); //商户数日环比 if (yesterdayOrderSummary > 0) { diff --git a/mallinkService/src/main/resources/mapper/WxOrderMapper.xml b/mallinkService/src/main/resources/mapper/WxOrderMapper.xml index ce13549cb..7c3e1c5db 100644 --- a/mallinkService/src/main/resources/mapper/WxOrderMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxOrderMapper.xml @@ -471,7 +471,7 @@ o.order_status,o.create_date,o.update_date,o.detail,'[多商户交易]' merchant_name,cubi.`name` c_user_name,cubi.phone from ( - select o.* from wx_order o where o.type=0 and o.order_status = 1 and o.id in( + select o.* from wx_order o where o.type=0 and o.order_status in (1,4) and o.id in( select o.id from wx_order o left join wx_coupon_merchant cm on o.product_id=cm.product_id group by o.id having count(o.id)>1)) o left join wx_c_user_basic_info cubi on o.c_user_id=cubi.id @@ -480,7 +480,7 @@ o.order_status,o.create_date,o.update_date,o.detail,m.`name` merchant_name,cubi.`name` c_user_name,cubi.phone from( select o.*,cm.merchant_id from ( - select o.* from wx_order o where o.type=0 and o.order_status = 1 and o.id not in( + select o.* from wx_order o where o.type=0 and o.order_status in (1,4) and o.id not in( select o.id from wx_order o left join wx_coupon_merchant cm on o.product_id=cm.product_id group by o.id having count(o.id)>1) ) o @@ -488,7 +488,7 @@ union all select o.*,mbu.merchant_id from wx_order o left join wx_merchant_b_user mbu on o.product_id=mbu.id - where o.type in (1,2) and o.order_status = 1 ) o + where o.type in (1,2) and o.order_status in (1,4) ) o left join wx_merchant m on o.merchant_id=m.id left join wx_c_user_basic_info cubi on o.c_user_id=cubi.id union all @@ -496,7 +496,7 @@ o.order_status,o.create_date,o.update_date,o.detail,m.`name` merchant_name,cubi.`name` c_user_name,cubi.phone from wx_order o left join wx_merchant m on o.product_id=m.id left join wx_c_user_basic_info cubi on o.c_user_id=cubi.id - where o.type=3 and o.order_status = 1 + where o.type=3 and o.order_status in (1,4) ) o @@ -519,13 +519,13 @@ select o.*, m.`name` merchantName from ( select o.*,cm.merchant_id from wx_order o left join wx_coupon_merchant cm on o.product_id=cm.product_id - where o.type in (0,3) and o.order_status = 1) o + where o.type in (0,3) and o.order_status in (1,4)) o left join wx_merchant m on o.merchant_id=m.id union all select o.*,m.`name` merchantName from ( select o.*,mbu.merchant_id from wx_order o left join wx_merchant_b_user mbu on o.product_id=mbu.id - where o.type in (1,2) and o.order_status = 1) o + where o.type in (1,2) and o.order_status in (1,4)) o left join wx_merchant m on o.merchant_id=m.id ) o @@ -544,13 +544,13 @@ select o.*,m.`name` merchantName from ( select o.*,cm.merchant_id from wx_order o left join wx_coupon_merchant cm on o.product_id=cm.product_id - where o.type in (0,3) and o.order_status = 1) o + where o.type in (0,3) and o.order_status = #{order_status}) o left join wx_merchant m on o.merchant_id=m.id union all select o.*,m.`name` merchantName from ( select o.*,mbu.merchant_id from wx_order o left join wx_merchant_b_user mbu on o.product_id=mbu.id - where o.type in (1,2) and o.order_status = 1) o + where o.type in (1,2) and o.order_status = #{order_status}) o left join wx_merchant m on o.merchant_id=m.id ) o