## 后台看板数据添加赠品积分

This commit is contained in:
zhangheng 2025-10-28 10:50:04 +08:00
parent 86dd9b7d0c
commit f8373e6989
1 changed files with 9 additions and 9 deletions

View File

@ -119,7 +119,7 @@
from sa_order so
where so.del_flag = 0
and so.order_status = 1
and so.order_type in (43, 47)
and so.order_type in (43, 44, 47)
and to_char(so.pay_time, 'yyyy-mm-dd') =
to_char(sysdate, 'yyyy-mm-dd')
) b on 1 = 1
@ -141,7 +141,7 @@
from sa_order so
where so.del_flag = 0
and so.order_status = 1
and so.order_type in (43, 47)
and so.order_type in (43, 44, 47)
and to_char(so.pay_time, 'yyyy-mm-dd') =
to_char(sysdate - 1, 'yyyy-mm-dd')
) b on 1 = 1
@ -165,7 +165,7 @@
from sa_order so
where so.del_flag = 0
and so.order_status = 1
and so.order_type in (43, 47)
and so.order_type in (43, 44, 47)
and to_char(so.pay_time, 'yyyy-mm') =
to_char(sysdate, 'yyyy-mm')
) b on 1 = 1
@ -184,7 +184,7 @@
where t.del_flag = 0
and t.enable_state = 0
and t.pk_country = 1
and t.field_value in (1, 2, 3, 4))
and t.field_value in (1, 2, 3, 4, 5))
and ((t.recharge_source = 1 and t.approve_state = 2) or
(t.recharge_source = 0 and t.approve_state = 2))
and to_char(t.modified_time, 'yyyy-mm-dd') =
@ -193,7 +193,7 @@
right join bd_account ba
on ba.pk_id = a.pk_account
and ba.del_flag = 0
where ba.field_value in (1, 2, 3, 4)
where ba.field_value in (1, 2, 3, 4, 5)
union all
select ba.account_name, nvl(a.recharge_amount, 0) recharge_amount, 1 sort, ba.field_value
from (select t.pk_account, sum(t.recharge_amount) recharge_amount
@ -206,7 +206,7 @@
where t.del_flag = 0
and t.enable_state = 0
and t.pk_country = 1
and t.field_value in (1, 2, 3, 4))
and t.field_value in (1, 2, 3, 4, 5))
and ((t.recharge_source = 1 and t.approve_state = 2) or
(t.recharge_source = 0 and t.approve_state = 2))
and to_char(t.modified_time, 'yyyy-mm-dd') =
@ -215,7 +215,7 @@
right join bd_account ba
on ba.pk_id = a.pk_account
and ba.del_flag = 0
where ba.field_value in (1, 2, 3, 4)
where ba.field_value in (1, 2, 3, 4, 5)
union all
select ba.account_name, nvl(a.recharge_amount, 0) recharge_amount, 2 sort, ba.field_value
from (select t.pk_account, sum(t.recharge_amount) recharge_amount
@ -228,7 +228,7 @@
where t.del_flag = 0
and t.enable_state = 0
and t.pk_country = 1
and t.field_value in (1, 2, 3, 4))
and t.field_value in (1, 2, 3, 4, 5))
and ((t.recharge_source = 1 and t.approve_state = 2) or
(t.recharge_source = 0 and t.approve_state = 2))
and to_char(t.modified_time, 'yyyy-mm') =
@ -237,7 +237,7 @@
right join bd_account ba
on ba.pk_id = a.pk_account
and ba.del_flag = 0
where ba.field_value in (1, 2, 3, 4)
where ba.field_value in (1, 2, 3, 4, 5)
order by sort, field_value
</select>