diff --git a/pom.xml b/pom.xml index 553b53d00..b5fa55d3c 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 manage - 1.4.18 + 1.4.19 UTF-8 1.8.0 diff --git a/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/ClientAnalysisMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/ClientAnalysisMapper.xml index 7177f3d33..a04331f11 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/ClientAnalysisMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/ClientAnalysisMapper.xml @@ -60,7 +60,7 @@ WHERE create_time <= now() and (approve_result is null or approve_result !=0) and is_valid=1 - and (royalpayindustry = 1 or royalpayindustry like '100%') + and (royalpayindustry = 1 or (royalpayindustry like '100%' and CHAR_LENGTH(royalpayindustry)=5)) 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 068a5c177..ca47f7dbf 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 @@ -1112,11 +1112,11 @@ sum(so.total) as total_amount, sum(so.orders) as orders, - count(Distinct IF((c.royalpayindustry =1 or c.royalpayindustry like '100%'), so.client_id,0)) as industry_trans_clients, - SUM(IF((c.royalpayindustry =1 or c.royalpayindustry like '100%'),so.total,0)) as industry_total_amount, - SUM(IF((c.royalpayindustry =1 or c.royalpayindustry like '100%'),so.orders,0)) as industry_orders, - convert(SUM(IF((c.royalpayindustry =1 or c.royalpayindustry like '100%'),so.total,0))/sum( so.total )*100,decimal(15,2)) as amount_pcent, - convert(SUM(IF((c.royalpayindustry =1 or c.royalpayindustry like '100%'),so.orders,0))/sum( so.orders )*100,decimal(15,2)) as order_pcent, + count(Distinct IF((c.royalpayindustry =1 or (c.royalpayindustry like '100%' and CHAR_LENGTH(c.royalpayindustry)=5)), so.client_id,0)) as industry_trans_clients, + SUM(IF((c.royalpayindustry =1 or (c.royalpayindustry like '100%' and CHAR_LENGTH(c.royalpayindustry)=5)),so.total,0)) as industry_total_amount, + SUM(IF((c.royalpayindustry =1 or (c.royalpayindustry like '100%' and CHAR_LENGTH(c.royalpayindustry)=5)),so.orders,0)) as industry_orders, + convert(SUM(IF((c.royalpayindustry =1 or (c.royalpayindustry like '100%' and CHAR_LENGTH(c.royalpayindustry)=5)),so.total,0))/sum( so.total )*100,decimal(15,2)) as amount_pcent, + convert(SUM(IF((c.royalpayindustry =1 or (c.royalpayindustry like '100%' and CHAR_LENGTH(c.royalpayindustry)=5)),so.orders,0))/sum( so.orders )*100,decimal(15,2)) as order_pcent, count(Distinct so.client_id) as industry_trans_clients, @@ -1164,7 +1164,7 @@ inner JOIN sys_clients c ON so.client_id = c.client_id AND c.is_valid = 1 - AND (c.royalpayindustry =1 or c.royalpayindustry like '100%') + AND (c.royalpayindustry =1 or (c.royalpayindustry like '100%' and CHAR_LENGTH(c.royalpayindustry)=5)) diff --git a/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientMapper.xml index f6ccf6d31..d8c87e1da 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientMapper.xml @@ -90,7 +90,7 @@ AND c.business_structure=#{business_structure} - AND (c.royalpayindustry =1 or c.royalpayindustry like '100%') + AND (c.royalpayindustry =1 or (c.royalpayindustry like '100%' and CHAR_LENGTH(c.royalpayindustry)=5))