master
kira 6 years ago
parent 4f6e35ad04
commit f9bde28cb7

@ -2,12 +2,13 @@
<!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.mappers.act.ActChairtyMapper">
<select id="chairtyClientNum" resultType="com.alibaba.fastjson.JSONObject">
select DISTINCT (count(order_id)) as count_ordernum ,client_moniker,active_time,ifnull(sum(pmt_transactions.transaction_amount),0) as sum_ordernum
from act_charity
left JOIN pmt_transactions on act_charity.client_id = pmt_transactions.client_id
and pmt_transactions.transaction_type='Credit' and pmt_transactions.transaction_time>=act_charity.active_time
and pmt_transactions.refund_id is null and pmt_transactions.channel != 'Settlement'
GROUP BY act_charity.client_id order by sum_ordernum desc
select DISTINCT (count(order_id)) as count_ordernum ,client_moniker,active_time,ifnull(sum(pmt_transactions.transaction_amount),0) as sum_ordernum
from act_charity
left JOIN pmt_transactions on act_charity.client_id = pmt_transactions.client_id
and pmt_transactions.transaction_type='Credit' and pmt_transactions.transaction_time>=act_charity.active_time
and pmt_transactions.transaction_time&lt;'2018-09-01'
and pmt_transactions.channel != 'Settlement'
GROUP BY act_charity.client_id order by sum_ordernum desc
</select>
<select id="getChairtyWeekstartAnalysis" resultType="com.alibaba.fastjson.JSONObject">

Loading…
Cancel
Save