fix : chairty

master
luoyang14z7 6 years ago
parent 170b78cc45
commit fc4646a770

@ -2,7 +2,7 @@
<!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 client_moniker,active_time,IFNULL(count(org_id),0) as count_ordernum,ifnull(sum(pmt_transactions.transaction_amount),0) as sum_ordernum
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
@ -13,19 +13,19 @@ GROUP BY act_charity.client_id order by sum_ordernum desc
<select id="getChairtyWeekstartAnalysis" resultType="com.alibaba.fastjson.JSONObject">
select DATE_FORMAT(pmt_transactions.transaction_time,'%Y-%m-%d') as weekstart from act_charity
inner JOIN pmt_transactions on act_charity.client_id = pmt_transactions.client_id
where dayofweek(pmt_transactions.transaction_time)=2 and pmt_transactions.transaction_time&gt;=#{begin} and pmt_transactions.transaction_time&lt;=#{end} and pmt_transactions.transaction_time>=act_charity.active_time
where dayofweek(pmt_transactions.transaction_time)=2 and pmt_transactions.transaction_time&gt;=#{begin} and pmt_transactions.transaction_time&lt;=#{end}
and pmt_transactions.refund_id is null and pmt_transactions.channel != 'Settlement'
group by weekstart order by weekstart asc;
</select>
<select id="getChairtyWeekAnalysis" resultType="com.alibaba.fastjson.JSONObject">
select count(pmt_transactions.org_id) as count_ordernum,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
select DISTINCT (count(order_id)) as count_ordernum,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&gt;=#{begin} and pmt_transactions.transaction_time&lt;=#{end} and pmt_transactions.transaction_time>=act_charity.active_time
and pmt_transactions.refund_id is null and pmt_transactions.channel != 'Settlement'
</select>
<select id="getChairtyWeekRaking" resultType="com.alibaba.fastjson.JSONObject">
select act_charity.client_moniker,((count(pmt_transactions.org_id)) * 0.01) as chair_ordernum,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
select DISTINCT (count(pmt_transactions.order_id)) *0.01 as chair_ordernum,act_charity.client_moniker,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&gt;=#{begin} and pmt_transactions.transaction_time&lt;=#{end} and pmt_transactions.transaction_time>=act_charity.active_time
GROUP BY act_charity.client_moniker order by sum_ordernum desc
</select>

@ -50,7 +50,7 @@
</div>
<div class="box">
<div class="box-header">
<h3 class="box-title">Settle Delay Ranking</h3>
<h3 class="box-title">Chairty Ranking</h3>
</div>
<div class="box-body">
<div class="row cen col-sm-12">

Loading…
Cancel
Save