From c713b174473cc11d3ea3272c751af50fd3a3c960 Mon Sep 17 00:00:00 2001 From: "james.zhao" Date: Thu, 27 Jun 2019 14:20:22 +0800 Subject: [PATCH] kpi fix --- pom.xml | 2 +- .../manage/mappers/financial/FinancialBDPrizeLogMapper.java | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index dc29ffe5a..446a34ec5 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ UTF-8 1.1.2 - 1.1.6 + 1.1.7 diff --git a/src/main/java/au/com/royalpay/payment/manage/mappers/financial/FinancialBDPrizeLogMapper.java b/src/main/java/au/com/royalpay/payment/manage/mappers/financial/FinancialBDPrizeLogMapper.java index 9f36ec6f8..88f6c66d6 100644 --- a/src/main/java/au/com/royalpay/payment/manage/mappers/financial/FinancialBDPrizeLogMapper.java +++ b/src/main/java/au/com/royalpay/payment/manage/mappers/financial/FinancialBDPrizeLogMapper.java @@ -55,7 +55,7 @@ public interface FinancialBDPrizeLogMapper { "\tsc.org_id = 1 \n" + "\tAND o.date >= #{start_date} \n" + "\tAND o.date < #{end_date} \n" + - "\tAND d.start_date <= o.date AND ( d.end_date IS NULL OR d.end_date > o.date \n" + + "\tAND d.start_date <= o.date AND d.is_valid = 1 AND ( d.end_date IS NULL OR d.end_date > o.date \n" + "\t) \n" + "\tAND c.get_prize = 1 \n" + "\tAND c.manager_id = #{manager_id}") @@ -103,7 +103,7 @@ public interface FinancialBDPrizeLogMapper { "\tsc.org_id = 1 \n" + "\tAND o.date >= #{start_date} \n" + "\tAND o.date < #{end_date} \n" + - "\tAND d.start_date <= o.date AND ( d.end_date IS NULL OR d.end_date > o.date \n" + + "\tAND d.start_date <= o.date AND d.is_valid = 1 AND ( d.end_date IS NULL OR d.end_date > o.date \n" + "\t) \n" + "\tAND c.bd_group IS NOT NULL \n" + "GROUP BY\n" + @@ -131,6 +131,7 @@ public interface FinancialBDPrizeLogMapper { "\tAND d.start_date <= o.date AND ( d.end_date IS NULL OR d.end_date > o.date \n" + "\t) \n" + "\tAND c.bd_group IS NOT NULL \n" + + "\tAND fbc.bd_type in (1, 2, 6, 7) \n" + "GROUP BY\n" + "\tfbc.bd_type \n" + "\t) t1\n" + @@ -151,6 +152,7 @@ public interface FinancialBDPrizeLogMapper { "\tAND d.start_date <= o.date AND ( d.end_date IS NULL OR d.end_date > o.date \n" + "\t) \n" + "\tAND c.bd_group IS NOT NULL \n" + + "\tAND fbc.bd_type in (1, 2, 6, 7) \n" + "GROUP BY\n" + "\tfbc.bd_type \n" + "\t) t2 ON t1.bd_group = t2.bd_group")