修改交易额

master
yuan 7 years ago
parent bf9a4f81e0
commit f4cb0221fe

@ -1,8 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="au.com.royalpay.payment.manage.analysis.mappers.BDAnalysisMapper"> <mapper namespace="au.com.royalpay.payment.manage.analysis.mappers.BDAnalysisMapper">
<!--1.BD analysis BD销售量 BD销售数据统计
2.BD analysis BD销售量 导出表格-->
<select id="getBDSaleList" resultType="com.alibaba.fastjson.JSONObject"> <select id="getBDSaleList" resultType="com.alibaba.fastjson.JSONObject">
SELECT SELECT
d.bd_name,d.bd_id,sum(if(temp.transaction_type='Credit',temp.clearing_amount*d.proportion,0)) d.bd_name,d.bd_id,sum(if(temp.transaction_type='Credit',temp.clearing_amount*d.proportion,0))
@ -38,8 +36,6 @@
GROUP BY d.bd_id GROUP BY d.bd_id
ORDER BY total DESC ORDER BY total DESC
</select> </select>
<!--1.BD analysis BD销售量 商户销售排行
2.BD analysis BD销售量 导出表格每个BD 的商户)-->
<select id="getBDSalePartnerList" resultType="com.alibaba.fastjson.JSONObject"> <select id="getBDSalePartnerList" resultType="com.alibaba.fastjson.JSONObject">
SELECT SELECT
c.client_id,c.client_moniker,c.short_name,c.approve_time,IFNULL(sum(if(temp.transaction_type='Credit',temp.clearing_amount*d.proportion,0)),0) c.client_id,c.client_moniker,c.short_name,c.approve_time,IFNULL(sum(if(temp.transaction_type='Credit',temp.clearing_amount*d.proportion,0)),0)
@ -157,7 +153,6 @@
group by bd_id group by bd_id
order by num desc order by num desc
</select> </select>
<!--1.BD analysis BD销售量 商户类别交易量分布-->
<select id="getBDSalePartnerReport" resultType="com.alibaba.fastjson.JSONObject"> <select id="getBDSalePartnerReport" resultType="com.alibaba.fastjson.JSONObject">
SELECT c.industry,c.royalpayindustry, SELECT c.industry,c.royalpayindustry,
count(DISTINCT c.client_id) partner_counts, count(DISTINCT c.client_id) partner_counts,

@ -84,9 +84,6 @@
GROUP BY date(o.create_time) GROUP BY date(o.create_time)
</select> </select>
<!-- 1.Dashboard前十商户交易额aud_fee
2.GateWay统计 总交易排行-->
<!--已修改-->
<select id="listPartnersTradeAmount" resultType="com.alibaba.fastjson.JSONObject"> <select id="listPartnersTradeAmount" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[ <![CDATA[
SELECT SELECT

@ -57,8 +57,6 @@
</where> </where>
</select> </select>
<!--1.交易数据(月统计)交易量变化趋势 -->
<!--不修改 -->
<select id="getSumCustomersAnalysisMonthly" resultType="com.alibaba.fastjson.JSONObject"> <select id="getSumCustomersAnalysisMonthly" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[ <![CDATA[
SELECT sum(s.customers) customers,sum(s.orders) orders,sum(s.new_customers) new_customers, SELECT sum(s.customers) customers,sum(s.orders) orders,sum(s.new_customers) new_customers,
@ -93,12 +91,6 @@
GROUP BY trade_date ORDER BY date DESC GROUP BY trade_date ORDER BY date DESC
</select> </select>
<!--1.交易数据(日统计) 交易量变化趋势
2.消费者统计
3.商户端 Customers Analysis Per customer transaction trends
4.商户端 Transaction Analysis Trading amount trends
5.Dashboard交易额趋势(aud_fee)-->
<!--不修改 -->
<select id="getSumCustomersAnalysis" resultType="com.alibaba.fastjson.JSONObject"> <select id="getSumCustomersAnalysis" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[ <![CDATA[
SELECT sum(s.customers) customers,sum(s.orders) orders,sum(s.new_customers) new_customers, SELECT sum(s.customers) customers,sum(s.orders) orders,sum(s.new_customers) new_customers,
@ -132,8 +124,7 @@
</where> </where>
GROUP BY s.date ORDER BY date DESC GROUP BY s.date ORDER BY date DESC
</select> </select>
<!--Transaction analysis 支付通道 -->
<!--不修改-->
<select id="getSumChannelAnalysis" resultType="com.alibaba.fastjson.JSONObject"> <select id="getSumChannelAnalysis" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[ <![CDATA[
SELECT ifnull(sum(s.orders),0) orders, SELECT ifnull(sum(s.orders),0) orders,
@ -185,8 +176,6 @@
</where> </where>
</select>--> </select>-->
<!--1.交易数据(日统计)(月统计) 各平台交易总额 -->
<!--已修改 -->
<select id="getSumCustomersChannelAnalysis" resultType="com.alibaba.fastjson.JSONObject"> <select id="getSumCustomersChannelAnalysis" resultType="com.alibaba.fastjson.JSONObject">
SELECT SUM(IF(t.transaction_type = 'Credit', t.clearing_amount,0)) AS total_amount SELECT SUM(IF(t.transaction_type = 'Credit', t.clearing_amount,0)) AS total_amount
FROM pmt_transactions t FROM pmt_transactions t
@ -270,8 +259,6 @@
</if> </if>
</select> </select>
<!--Transaction analysis 支付通道 -->
<!--不要修改 -->
<select id="countChannel" resultType="com.alibaba.fastjson.JSONObject"> <select id="countChannel" resultType="com.alibaba.fastjson.JSONObject">
SELECT SELECT
ifnull(sum(s.orders),0) orders, ifnull(sum(s.orders),0) orders,

@ -196,8 +196,6 @@
]]> ]]>
</select> </select>
<!--1.消费排名列表 -->
<!--已修改 -->
<select id="listCustomersData" resultType="com.alibaba.fastjson.JSONObject"> <select id="listCustomersData" resultType="com.alibaba.fastjson.JSONObject">
SELECT o.customer_id,sum(if(t.transaction_type='Credit',t.clearing_amount,0)) amount, SELECT o.customer_id,sum(if(t.transaction_type='Credit',t.clearing_amount,0)) amount,
sum(if(t.transaction_type='Credit',t.clearing_amount div 10,0)) points, sum(if(t.transaction_type='Credit',t.clearing_amount div 10,0)) points,
@ -229,8 +227,6 @@
GROUP BY o.customer_id ORDER BY points desc GROUP BY o.customer_id ORDER BY points desc
</select> </select>
<!--1.消费排名 Total Amount -->
<!--已修改-->
<select id="listCustomersDataAnalysis" resultType="com.alibaba.fastjson.JSONObject"> <select id="listCustomersDataAnalysis" resultType="com.alibaba.fastjson.JSONObject">
SELECT sum(if(t.transaction_type='Credit',t.clearing_amount,0)) total_amount, SELECT sum(if(t.transaction_type='Credit',t.clearing_amount,0)) total_amount,
sum(if(t.transaction_type='Credit',t.clearing_amount div 10,0)) total_points sum(if(t.transaction_type='Credit',t.clearing_amount div 10,0)) total_points

@ -17,8 +17,7 @@
ORDER BY transaction_time ORDER BY transaction_time
LIMIT 1; LIMIT 1;
</select> </select>
<!--1.partner card 标题-->
<!--已修改 -->
<select id="getTransactionCommonAnalysis" resultType="com.alibaba.fastjson.JSONObject"> <select id="getTransactionCommonAnalysis" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[ <![CDATA[
SELECT ifnull(sum(if(t.transaction_type = 'Credit' ,t.clearing_amount,0)), 0) total_amount, SELECT ifnull(sum(if(t.transaction_type = 'Credit' ,t.clearing_amount,0)), 0) total_amount,
@ -35,11 +34,7 @@
</if> </if>
</where> </where>
</select> </select>
<!--1.Dashboard标题交易额移动至getClientTransaction
2 商户端 Dashboard 标题 交易额 移动至getClientTransaction
3.BD analysis bd提成
4./api/v1.0/retail/app 移动至getClientTransaction-->
<!--不修改 -->
<select id="analysisTotalAmount" resultType="java.math.BigDecimal"> <select id="analysisTotalAmount" resultType="java.math.BigDecimal">
<![CDATA[ <![CDATA[
SELECT ifnull(sum(if(l.transaction_type = 'Credit',l.clearing_amount,-l.clearing_amount)), 0) SELECT ifnull(sum(if(l.transaction_type = 'Credit',l.clearing_amount,-l.clearing_amount)), 0)
@ -61,10 +56,7 @@
<if test="org_ids!=null">and l.org_id in <if test="org_ids!=null">and l.org_id in
<foreach collection="org_ids" item="org_id" open="(" close=")" separator=",">#{org_id}</foreach></if> <foreach collection="org_ids" item="org_id" open="(" close=")" separator=",">#{org_id}</foreach></if>
</select> </select>
<!--1.Dashboard交易笔数 移动至getClientTransaction
2./api/v1.0/retail/app 移动至getClientTransaction
2.商户端 dashboard 交易笔数移动至getClientTransaction-->
<!--不修改-->
<select id="analysisTotalCount" resultType="java.lang.Double"> <select id="analysisTotalCount" resultType="java.lang.Double">
<![CDATA[ <![CDATA[
SELECT ifnull(count(DISTINCT l.order_id), 0) SELECT ifnull(count(DISTINCT l.order_id), 0)
@ -88,7 +80,6 @@
</if> </if>
</select> </select>
<!--1.商户端 dashboard退款金额 移动至getClientTransaction-->
<select id="analysisRefundAmount" resultType="java.lang.Double"> <select id="analysisRefundAmount" resultType="java.lang.Double">
<![CDATA[ <![CDATA[
SELECT ifnull(sum(if(l.transaction_type='Debit',l.clearing_amount,-l.clearing_amount)), 0) SELECT ifnull(sum(if(l.transaction_type='Debit',l.clearing_amount,-l.clearing_amount)), 0)
@ -108,8 +99,6 @@
</if> </if>
</select> </select>
<!--商户端 dashboard 未清算金额-->
<!--不修改-->
<select id="analysisNotSettled" resultType="java.lang.Double"> <select id="analysisNotSettled" resultType="java.lang.Double">
<![CDATA[ <![CDATA[
SELECT ifnull(sum(if(transaction_type = 'Credit', clearing_amount, -clearing_amount)), 0) SELECT ifnull(sum(if(transaction_type = 'Credit', clearing_amount, -clearing_amount)), 0)
@ -127,8 +116,6 @@
</if> </if>
</select> </select>
<!--商户端 dashboard 预授权金额 -->
<!--不修改-->
<select id="analysisPreAmount" resultType="java.lang.Double"> <select id="analysisPreAmount" resultType="java.lang.Double">
<![CDATA[ <![CDATA[
SELECT ifnull(sum(l.clearing_amount), 0) SELECT ifnull(sum(l.clearing_amount), 0)
@ -148,9 +135,6 @@
</if> </if>
</select> </select>
<!--1.Dashboard最大交易额订单(aud_fee)
2.商户端 Dashboard最大交易额订单-->
<!-- 不修改-->
<select id="getTopOrders" resultType="com.alibaba.fastjson.JSONObject"> <select id="getTopOrders" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[ <![CDATA[
SELECT SELECT
@ -183,9 +167,7 @@
]]> ]]>
</select> </select>
<!--1.Dashboard交易类型分布-交易量
2.partner card 交易类型分布-交易量-->
<!-- 已修改-->
<select id="getTradeAmountInTypes" resultType="com.alibaba.fastjson.JSONObject"> <select id="getTradeAmountInTypes" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[ <![CDATA[
SELECT SELECT
@ -228,10 +210,7 @@
<foreach collection="org_ids" item="org_id" open="(" close=")" separator=",">#{org_id}</foreach></if> <foreach collection="org_ids" item="org_id" open="(" close=")" separator=",">#{org_id}</foreach></if>
GROUP BY gateway_label GROUP BY gateway_label
</select> </select>
<!--1.交易数据(日统计)交易时间分布
2.商户端 Dashboard Trading distribution chart
3.partner card Transaction Time Analysis-->
<!-- 已修改-->
<select id="tradeAnalysisInHours" resultType="com.alibaba.fastjson.JSONObject"> <select id="tradeAnalysisInHours" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[ <![CDATA[
SELECT h, round(sum(count)/datediff(#{end},#{begin}),1) count, round(sum(aud_fee)/datediff(#{end},#{begin}),2) aud_fee SELECT h, round(sum(count)/datediff(#{end},#{begin}),1) count, round(sum(aud_fee)/datediff(#{end},#{begin}),2) aud_fee
@ -273,9 +252,7 @@
order by h order by h
]]> ]]>
</select> </select>
<!-- 1.Dashboard交易额趋势(aud_fee)(已不用)
2.generateReport方法名-->
<!--已修改 -->
<select id="tradeAnalysisInDays" resultType="com.alibaba.fastjson.JSONObject"> <select id="tradeAnalysisInDays" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[ <![CDATA[
SELECT SELECT
@ -303,8 +280,7 @@
ORDER BY date(o.create_time) ORDER BY date(o.create_time)
]]> ]]>
</select> </select>
<!--1.商户端 Dashboard Trading trends-->
<!--已修改 -->
<select id="tradeAnalysisInDay" resultType="com.alibaba.fastjson.JSONObject"> <select id="tradeAnalysisInDay" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[ <![CDATA[
SELECT SELECT
@ -442,9 +418,7 @@
o.create_time < #{date} and o.status>=5 o.create_time < #{date} and o.status>=5
]]> ]]>
</select> </select>
<!--1.Dashboard 交易类型分布-商户数量
2.gataway统计 各交易类型商家数量分布(家)-->
<!-- 不修改-->
<select id="getTradePartnersInTypes" resultType="com.alibaba.fastjson.JSONObject"> <select id="getTradePartnersInTypes" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[ <![CDATA[
SELECT SELECT
@ -494,8 +468,7 @@
GROUP BY gateway_label GROUP BY gateway_label
</select> </select>
<!--1.getaWay统计 交易方式商户排名 -->
<!--已修改 -->
<select id="getPartnersByTradeType" resultType="com.alibaba.fastjson.JSONObject"> <select id="getPartnersByTradeType" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[ <![CDATA[
SELECT c.short_name ,ifnull(SUM(if(l.transaction_type = 'Credit',l.clearing_amount,0)), 0) total SELECT c.short_name ,ifnull(SUM(if(l.transaction_type = 'Credit',l.clearing_amount,0)), 0) total
@ -572,8 +545,7 @@
<!--</if>--> <!--</if>-->
<!--<if test="org_id!=null">and l.org_id=#{org_id}</if>--> <!--<if test="org_id!=null">and l.org_id=#{org_id}</if>-->
<!--</select>--> <!--</select>-->
<!--1.Dashboard交易时间分布(order_total) -->
<!-- 不修改-->
<select id="getOrdersByGateway" resultType="com.alibaba.fastjson.JSONObject"> <select id="getOrdersByGateway" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[ <![CDATA[
SELECT po.create_time, SELECT po.create_time,
@ -663,9 +635,7 @@
<foreach collection="org_ids" item="org_id" open="(" close=")" separator=",">#{org_id}</foreach></if> <foreach collection="org_ids" item="org_id" open="(" close=")" separator=",">#{org_id}</foreach></if>
GROUP BY date , channel ORDER BY date DESC GROUP BY date , channel ORDER BY date DESC
</select> </select>
<!--1.合伙人 合伙人销量 各组织机构交易量分布
2.generateReportWeekReporter-->
<!--已修改-->
<select id="getOrgTransactionAnalysis" resultType="com.alibaba.fastjson.JSONObject"> <select id="getOrgTransactionAnalysis" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[ <![CDATA[
SELECT o.org_id, o.name org_name,sum(if(t.transaction_type='Credit',t.clearing_amount,0)) amount SELECT o.org_id, o.name org_name,sum(if(t.transaction_type='Credit',t.clearing_amount,0)) amount
@ -682,8 +652,7 @@
<foreach collection="org_ids" item="org_id" open="(" close=")" separator=",">#{org_id}</foreach></if> <foreach collection="org_ids" item="org_id" open="(" close=")" separator=",">#{org_id}</foreach></if>
GROUP BY o.org_id order by amount desc GROUP BY o.org_id order by amount desc
</select> </select>
<!--1.合伙人 合伙人销量 合伙人商户交易量排名 -->
<!--已修改-->
<select id="getPartnersAmountByOrg" resultType="com.alibaba.fastjson.JSONObject"> <select id="getPartnersAmountByOrg" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[ <![CDATA[
SELECT c.client_moniker,c.short_name,sum(if(t.transaction_type='Credit',t.clearing_amount,0)) amount SELECT c.client_moniker,c.short_name,sum(if(t.transaction_type='Credit',t.clearing_amount,0)) amount
@ -697,8 +666,7 @@
GROUP BY c.client_id order by amount desc GROUP BY c.client_id order by amount desc
</select> </select>
<!-- (1)Dashboard支付通道交易额订单数-->
<!-- 已修改-->
<select id="getPlatformAmount" resultType="com.alibaba.fastjson.JSONObject"> <select id="getPlatformAmount" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[ <![CDATA[
SELECT ifnull(sum(if(l.transaction_type = 'Credit',l.clearing_amount,0)), 0) amount, SELECT ifnull(sum(if(l.transaction_type = 'Credit',l.clearing_amount,0)), 0) amount,
@ -735,8 +703,7 @@
<if test="amount_to!=null">and t.clearing_amount &lt; #{amount_to}</if> <if test="amount_to!=null">and t.clearing_amount &lt; #{amount_to}</if>
</select> </select>
<!--1.交易金额分析 交易订单列表-->
<!--不更改 -->
<select id="listAmountRangeOrders" resultType="com.alibaba.fastjson.JSONObject"> <select id="listAmountRangeOrders" resultType="com.alibaba.fastjson.JSONObject">
select c.client_moniker,c.short_name,t.order_id,t.clearing_amount,t.transaction_time,t.channel,o.customer_id,o.customer_ip,o.gateway select c.client_moniker,c.short_name,t.order_id,t.clearing_amount,t.transaction_time,t.channel,o.customer_id,o.customer_ip,o.gateway
FROM pmt_transactions t FROM pmt_transactions t
@ -774,11 +741,7 @@
<if test="channel!=null">and t.channel=#{channel}</if> <if test="channel!=null">and t.channel=#{channel}</if>
</select> </select>
<!--1.Dashboard标题交易额
2.Dashboard 交易笔数
3.商户端 交易额,交易笔数 退款金额
4./api/v1.0/retail/app-->
<!--新增接口-->
<select id="getClientTransaction" resultType="com.alibaba.fastjson.JSONObject"> <select id="getClientTransaction" resultType="com.alibaba.fastjson.JSONObject">
select select
IFNULL(sum(if(l.transaction_type='credit',l.clearing_amount,0)),0) trade_amount, IFNULL(sum(if(l.transaction_type='credit',l.clearing_amount,0)),0) trade_amount,

@ -131,8 +131,7 @@
]]> ]]>
</update> </update>
<!--1.交易流水列表 -->
<!--不修改-->
<select id="listOrders" resultType="com.alibaba.fastjson.JSONObject"> <select id="listOrders" resultType="com.alibaba.fastjson.JSONObject">
<if test="bd_user!=null"> <if test="bd_user!=null">
SELECT temp.* FROM ( SELECT temp.* FROM (
@ -250,9 +249,7 @@
GROUP BY o.order_id,t.refund_id GROUP BY o.order_id,t.refund_id
order by o.create_time order by o.create_time
</select> </select>
<!-- 1.商户管理订单列表
2.商户端 Orders列表-->
<!--不修改 -->
<select id="listOrdersByClients" resultType="com.alibaba.fastjson.JSONObject"> <select id="listOrdersByClients" resultType="com.alibaba.fastjson.JSONObject">
<if test="gateway"> <if test="gateway">
<include refid="gateway_keys"/> <include refid="gateway_keys"/>
@ -330,9 +327,7 @@
GROUP BY o.order_id,t.refund_id GROUP BY o.order_id,t.refund_id
</select> </select>
<!--1.交易流水交易金额
2.商户端 Orders 标题交易金额-->
<!--已修改-->
<select id="analysisOrders" resultType="com.alibaba.fastjson.JSONObject"> <select id="analysisOrders" resultType="com.alibaba.fastjson.JSONObject">
select select
count(DISTINCT l.order_id) order_count, count(DISTINCT l.order_id) order_count,
@ -506,8 +501,7 @@
WHERE o.customer_id = #{customer_id} and t.transaction_time &gt;= '2017-11-07' WHERE o.customer_id = #{customer_id} and t.transaction_time &gt;= '2017-11-07'
</select> </select>
<!--1.消费排名 用户列表(单个用户) -->
<!--不修改-->
<select id="listOrderByCustomer" resultType="com.alibaba.fastjson.JSONObject"> <select id="listOrderByCustomer" resultType="com.alibaba.fastjson.JSONObject">
SELECT o.*,c.short_name,c.client_moniker FROM pmt_orders o SELECT o.*,c.short_name,c.client_moniker FROM pmt_orders o
LEFT JOIN sys_clients c on c.client_id = o.client_id LEFT JOIN sys_clients c on c.client_id = o.client_id

@ -36,8 +36,6 @@
</where> </where>
</select> </select>
<!--1.Transactions 交易列表-->
<!--不修改-->
<select id="listTransFlow" resultType="com.alibaba.fastjson.JSONObject"> <select id="listTransFlow" resultType="com.alibaba.fastjson.JSONObject">
SELECT t.*, SELECT t.*,
ifnull(o.client_order_id,'--') client_order_id, ifnull(o.client_order_id,'--') client_order_id,
@ -79,8 +77,7 @@
</where> </where>
order by t.transaction_time desc order by t.transaction_time desc
</select> </select>
<!--1.Transactions 标题金额 -->
<!--不修改-->
<select id="analysisTransFlow" resultType="com.alibaba.fastjson.JSONObject"> <select id="analysisTransFlow" resultType="com.alibaba.fastjson.JSONObject">
SELECT SELECT
count(t.transaction_id) order_count, count(t.transaction_id) order_count,
@ -161,7 +158,7 @@
FROM pmt_transactions FROM pmt_transactions
WHERE clearing_status = 0 AND client_id = #{client_id} WHERE clearing_status = 0 AND client_id = #{client_id}
</select> </select>
<!--1.商户端 Settlement 标题 -->
<select id="getClientAmountAnalysis" resultType="com.alibaba.fastjson.JSONObject"> <select id="getClientAmountAnalysis" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[ <![CDATA[
SELECT SELECT
@ -232,7 +229,7 @@
ORDER BY t.transaction_type, t.transaction_time ORDER BY t.transaction_type, t.transaction_time
]]> ]]>
</select> </select>
<!--1.商户端Settlement 列表 -->
<select id="listSettlementLog" resultType="com.alibaba.fastjson.JSONObject"> <select id="listSettlementLog" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[ <![CDATA[
SELECT t.client_id,DATE(t.transaction_time) clearing_time,SUM(t.clearing_amount) total, SELECT t.client_id,DATE(t.transaction_time) clearing_time,SUM(t.clearing_amount) total,
@ -428,8 +425,7 @@
WHERE t.transaction_type = 'Credit' OR t.refund_id IS NOT NULL WHERE t.transaction_type = 'Credit' OR t.refund_id IS NOT NULL
ORDER BY t.order_id ASC ORDER BY t.order_id ASC
</select> </select>
<!--1.BD analysis BD提成 生成报表 -->
<!--不修改-->
<select id="listTransactionsForBDPrize" resultType="com.alibaba.fastjson.JSONObject"> <select id="listTransactionsForBDPrize" resultType="com.alibaba.fastjson.JSONObject">
SELECT SELECT
sum(if(t.transaction_type = 'Credit', t.clearing_amount, -t.clearing_amount)) sum(if(t.transaction_type = 'Credit', t.clearing_amount, -t.clearing_amount))
@ -523,8 +519,7 @@
GROUP BY so.org_id, trade_date,t.client_id GROUP BY so.org_id, trade_date,t.client_id
ORDER BY c.org_id ASC, t.client_id ASC, trade_date ASC ORDER BY c.org_id ASC, t.client_id ASC, trade_date ASC
</select> </select>
<!--1.合伙人,合伙人提成 generateOrgCommission -->
<!--不修改-->
<select id="listTransactionsForAgentCommission" resultType="com.alibaba.fastjson.JSONObject"> <select id="listTransactionsForAgentCommission" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[ <![CDATA[
SELECT SELECT

Loading…
Cancel
Save