fix 商户类别交易趋势统计 旅游出行

master
luoyang 5 years ago
parent 3af3762cc3
commit b2c6383146

@ -9,7 +9,7 @@
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId> <artifactId>manage</artifactId>
<version>1.4.18</version> <version>1.4.19</version>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jib-maven-plugin.version>1.8.0</jib-maven-plugin.version> <jib-maven-plugin.version>1.8.0</jib-maven-plugin.version>

@ -60,7 +60,7 @@
WHERE WHERE
create_time &lt;= now() and (approve_result is null or approve_result !=0) and is_valid=1 create_time &lt;= now() and (approve_result is null or approve_result !=0) and is_valid=1
<if test="industry != null and industry=='1'.toString()"> <if test="industry != null and industry=='1'.toString()">
and (royalpayindustry = 1 or royalpayindustry like '100%') and (royalpayindustry = 1 or (royalpayindustry like '100%' and CHAR_LENGTH(royalpayindustry)=5))
</if> </if>
<if test="industry != null and industry!='0'.toString() and industry!='1'.toString()"> <if test="industry != null and industry!='0'.toString() and industry!='1'.toString()">
<bind name="industry" value="industry+'%'"/> <bind name="industry" value="industry+'%'"/>

@ -1112,11 +1112,11 @@
sum(so.total) as total_amount, sum(so.total) as total_amount,
sum(so.orders) as orders, sum(so.orders) as orders,
<if test="industry != null and industry=='1'.toString()"> <if test="industry != null and industry=='1'.toString()">
count(Distinct IF((c.royalpayindustry =1 or c.royalpayindustry like '100%'), so.client_id,0)) as industry_trans_clients, 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%'),so.total,0)) as industry_total_amount, 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%'),so.orders,0)) as industry_orders, 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%'),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.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, 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,
</if> </if>
<if test="industry == null or industry=='0'.toString()"> <if test="industry == null or industry=='0'.toString()">
count(Distinct so.client_id) as industry_trans_clients, 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 inner JOIN sys_clients c ON so.client_id = c.client_id
AND c.is_valid = 1 AND c.is_valid = 1
<if test="industry != null and industry=='1'.toString()"> <if test="industry != null and industry=='1'.toString()">
AND (c.royalpayindustry =1 or c.royalpayindustry like '100%') AND (c.royalpayindustry =1 or (c.royalpayindustry like '100%' and CHAR_LENGTH(c.royalpayindustry)=5))
</if> </if>
<if test="industry != null and industry!='0'.toString() and industry!='1'.toString()"> <if test="industry != null and industry!='0'.toString() and industry!='1'.toString()">
<bind name="industry" value="industry+'%'"/> <bind name="industry" value="industry+'%'"/>

@ -90,7 +90,7 @@
AND c.business_structure=#{business_structure} AND c.business_structure=#{business_structure}
</if> </if>
<if test="industry != null and industry == '1'.toString()"> <if test="industry != null and industry == '1'.toString()">
AND (c.royalpayindustry =1 or c.royalpayindustry like '100%') AND (c.royalpayindustry =1 or (c.royalpayindustry like '100%' and CHAR_LENGTH(c.royalpayindustry)=5))
</if> </if>
<if test="industry!=null and industry != '0'.toString() and industry and industry!='1'"> <if test="industry!=null and industry != '0'.toString() and industry and industry!='1'">
<bind name="industry" value="industry+'%'"/> <bind name="industry" value="industry+'%'"/>

Loading…
Cancel
Save