优化充值、退款统计
This commit is contained in:
parent
2eec496458
commit
278b5ba31e
@ -214,11 +214,11 @@
|
|||||||
|
|
||||||
<select id="sumMoney" resultType="map">
|
<select id="sumMoney" resultType="map">
|
||||||
select
|
select
|
||||||
sum(xro.amount) amount,
|
ifnull(sum(xro.amount),0) amount,
|
||||||
(select sum(amount) from xhpc_recharge_order where create_time >= #{time1} and tenant_id =#{tenantId} and del_flag = 0 and status=1) one,
|
ifnull((select sum(amount) from xhpc_recharge_order where create_time >= #{time1} and tenant_id =#{tenantId} and del_flag = 0 and status=1),0) one,
|
||||||
(select sum(amount) from xhpc_recharge_order where create_time >= #{time2} and tenant_id =#{tenantId} and del_flag = 0 and status=1) two,
|
ifnull((select sum(amount) from xhpc_recharge_order where create_time >= #{time2} and tenant_id =#{tenantId} and del_flag = 0 and status=1),0) two,
|
||||||
(select sum(amount) from xhpc_recharge_order where create_time >= #{time3} and tenant_id =#{tenantId} and del_flag = 0 and status=1) three,
|
ifnull((select sum(amount) from xhpc_recharge_order where create_time >= #{time3} and tenant_id =#{tenantId} and del_flag = 0 and status=1),0) three,
|
||||||
(select sum(amount) from xhpc_recharge_order where create_time >= #{time4} and tenant_id =#{tenantId} and del_flag = 0 and status=1) four
|
ifnull((select sum(amount) from xhpc_recharge_order where create_time >= #{time4} and tenant_id =#{tenantId} and del_flag = 0 and status=1),0) four
|
||||||
from xhpc_recharge_order xro
|
from xhpc_recharge_order xro
|
||||||
where xro.del_flag = 0
|
where xro.del_flag = 0
|
||||||
ORDER BY xro.create_time DESC
|
ORDER BY xro.create_time DESC
|
||||||
|
|||||||
@ -246,11 +246,11 @@
|
|||||||
|
|
||||||
<select id="sumMoney" resultType="map">
|
<select id="sumMoney" resultType="map">
|
||||||
select
|
select
|
||||||
sum(xro.amount) amount,
|
ifnull(sum(xro.amount),0) amount,
|
||||||
(select sum(amount) from xhpc_refund_order where create_time >= #{time1} and tenant_id =#{tenantId} and del_flag = 0 and examine_status=1 and status =1) one,
|
ifnull((select sum(amount) from xhpc_refund_order where create_time >= #{time1} and tenant_id =#{tenantId} and del_flag = 0 and examine_status=1 and status =1),0) one,
|
||||||
(select sum(amount) from xhpc_refund_order where create_time >= #{time2} and tenant_id =#{tenantId} and del_flag = 0 and examine_status=1 and status =1) two,
|
ifnull((select sum(amount) from xhpc_refund_order where create_time >= #{time2} and tenant_id =#{tenantId} and del_flag = 0 and examine_status=1 and status =1),0) two,
|
||||||
(select sum(amount) from xhpc_refund_order where create_time >= #{time3} and tenant_id =#{tenantId} and del_flag = 0 and examine_status=1 and status =1) three,
|
ifnull((select sum(amount) from xhpc_refund_order where create_time >= #{time3} and tenant_id =#{tenantId} and del_flag = 0 and examine_status=1 and status =1),0) three,
|
||||||
(select sum(amount) from xhpc_refund_order where create_time >= #{time4} and tenant_id =#{tenantId} and del_flag = 0 and examine_status=1 and status =1) four
|
ifnull((select sum(amount) from xhpc_refund_order where create_time >= #{time4} and tenant_id =#{tenantId} and del_flag = 0 and examine_status=1 and status =1),0) four
|
||||||
from xhpc_refund_order xro
|
from xhpc_refund_order xro
|
||||||
where xro.del_flag = 0 and xro.examine_status=1 and xro.status =1
|
where xro.del_flag = 0 and xro.examine_status=1 and xro.status =1
|
||||||
ORDER BY xro.create_time DESC
|
ORDER BY xro.create_time DESC
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user