From 7f9bcd2cf36aebde74238863f1fb4da8cd923f4b Mon Sep 17 00:00:00 2001 From: dulingling Date: Mon, 1 Jun 2020 15:08:41 +0800 Subject: [PATCH] =?UTF-8?q?upd=EF=BC=9Abd=E6=95=B0=E6=8D=AE=E5=88=86?= =?UTF-8?q?=E6=9E=90=E7=94=9F=E6=88=90=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../manage/analysis/core/impls/BDAnalysisServiceImpl.java | 4 ++-- .../manage/mappers/log/StatisticsBDSalesReportMapper.java | 2 +- .../payment/manage/analysis/mappers/BDAnalysisMapper.xml | 2 +- .../manage/analysis/mappers/TransactionAnalysisMapper.xml | 2 +- .../manage/mappers/log/StatisticsBDSalesReportMapper.xml | 8 ++++---- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pom.xml b/pom.xml index 3e694a141..b905f078c 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 manage - 2.3.20 + 2.3.21 UTF-8 2.3.0 diff --git a/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/BDAnalysisServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/BDAnalysisServiceImpl.java index 65f971984..a60237c60 100644 --- a/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/BDAnalysisServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/BDAnalysisServiceImpl.java @@ -197,7 +197,7 @@ public class BDAnalysisServiceImpl implements BDAnalysisService { List bdSaleList = bdAnalysisMapper.getOneDayBDSaleList(params); if (bdSaleList.size() != 0) { for (JSONObject item : bdSaleList) { - JSONObject existBDSalesReport = bdSalesReportMapper.findByBDIdAndLogDate(item.getString("org_id"),item.getString("bd_id"),beginTime,0); + JSONObject existBDSalesReport = bdSalesReportMapper.findByBDIdAndLogDate(item.getString("org_id"),item.getString("bd_id"),date,0); if(existBDSalesReport==null){ JSONObject object = new JSONObject(item); object.put("log_id", UUID.randomUUID().toString()); @@ -215,7 +215,7 @@ public class BDAnalysisServiceImpl implements BDAnalysisService { List orgSaleList= transactionAnalysisMapper.getOneDayOrgMerchantSaleList(params); if (orgSaleList.size() != 0) { for (JSONObject item : orgSaleList) { - JSONObject existOrgSalesReport = bdSalesReportMapper.findByBDIdAndLogDate(item.getString("org_id"),item.getString("bd_id"),beginTime,1); + JSONObject existOrgSalesReport = bdSalesReportMapper.findByBDIdAndLogDate(item.getString("org_id"),item.getString("bd_id"), date,1); if(existOrgSalesReport==null){ JSONObject object = new JSONObject(item); object.put("log_id", UUID.randomUUID().toString()); diff --git a/src/main/java/au/com/royalpay/payment/manage/mappers/log/StatisticsBDSalesReportMapper.java b/src/main/java/au/com/royalpay/payment/manage/mappers/log/StatisticsBDSalesReportMapper.java index 964228f5c..5bbae6d65 100644 --- a/src/main/java/au/com/royalpay/payment/manage/mappers/log/StatisticsBDSalesReportMapper.java +++ b/src/main/java/au/com/royalpay/payment/manage/mappers/log/StatisticsBDSalesReportMapper.java @@ -22,7 +22,7 @@ public interface StatisticsBDSalesReportMapper { List getPartnerAmountList(JSONObject params); - JSONObject findByBDIdAndLogDate(@Param("org_id") String org_id,@Param("bd_id") String bd_id, @Param("log_date")Date beginTime,@Param("isOrg") int isOrg); + JSONObject findByBDIdAndLogDate(@Param("org_id") String org_id,@Param("bd_id") String bd_id, @Param("log_date")String beginTime,@Param("isOrg") int isOrg); @AutoSql(SqlType.UPDATE) void update(JSONObject existBDSalesReport); diff --git a/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/BDAnalysisMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/BDAnalysisMapper.xml index 2efa2d358..bd0c23023 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/BDAnalysisMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/BDAnalysisMapper.xml @@ -206,7 +206,7 @@ org.org_id, org.type AS org_type, org.name AS org_name, - 0 AS isOrg, + 0 AS is_org, 0 AS clearing_amount, SUM(if(temp.transaction_type = 'Credit',temp.clearing_amount * clinetBD.proportion, -temp.clearing_amount * clinetBD.proportion)) pay_amount, ifnull(SUM(if(temp.refund_id IS NOT NULL, if(temp.transaction_type='Debit', temp.clearing_amount, -temp.clearing_amount) * clinetBD.proportion, 0)), 0) refund_amount, diff --git a/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/TransactionAnalysisMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/TransactionAnalysisMapper.xml index 30303e8f1..196708ac7 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/TransactionAnalysisMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/TransactionAnalysisMapper.xml @@ -1068,7 +1068,7 @@ org.org_id AS org_id, org.name AS org_name, org.type AS org_type, - 1 AS isOrg, + 1 AS is_org, SUM(IF( trans.transaction_type = 'Credit', trans.clearing_amount, - trans.clearing_amount )) AS clearing_amount, 0 AS pay_amount, 0 AS refund_amount, diff --git a/src/main/resources/au/com/royalpay/payment/manage/mappers/log/StatisticsBDSalesReportMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/mappers/log/StatisticsBDSalesReportMapper.xml index 62c910a28..8f1a8a177 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/mappers/log/StatisticsBDSalesReportMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/mappers/log/StatisticsBDSalesReportMapper.xml @@ -10,7 +10,7 @@ SUM(pay_amount) AS total, SUM(refund_amount) AS refund_fee FROM statistics_bd_sales - WHERE isOrg = 0 + WHERE is_org = 0 AND org_id = #{org_id} @@ -42,7 +42,7 @@ SUM(pay_amount) AS total, SUM(refund_amount) AS refund_fee FROM statistics_bd_sales - WHERE isOrg = 1 AND org_id!=1 + WHERE is_org = 1 AND org_id!=1 AND org_id = #{org_id} @@ -67,7 +67,7 @@ SELECT log_id, org_id, - isOrg, + is_org, org_name, org_type, bd_id, @@ -81,7 +81,7 @@ FROM statistics_bd_sales WHERE org_id = #{org_id} AND log_date = #{log_date} - AND isOrg = #{isOrg} + AND is_org = #{isOrg} AND bd_id = #{bd_id}