技师收益调整
This commit is contained in:
parent
09891aff11
commit
22c724c91b
|
@ -1253,9 +1253,9 @@
|
|||
select IFNULL(SUM(project_benefits_total),0) AS projectBenefits
|
||||
from (
|
||||
select
|
||||
o.project_benefits + ifnull(o.add_artificer_money,0)
|
||||
+ ifnull(o2.project_benefits,0) + ifnull(o2.add_artificer_money,0)
|
||||
+ ifnull(o3.project_benefits,0) + ifnull(o3.add_artificer_money,0)
|
||||
ifnull(o.project_benefits,0) - ifnull(o.shop_money,0) - ifnull(o.one_artificer_money,0)
|
||||
+ ifnull(o2.project_benefits,0) - ifnull(o2.shop_money,0) - ifnull(o2.one_artificer_money,0)
|
||||
+ ifnull(o3.project_benefits,0) - ifnull(o3.shop_money,0) - ifnull(o3.one_artificer_money,0)
|
||||
as project_benefits_total,
|
||||
|
||||
from orders o
|
||||
|
@ -1272,7 +1272,7 @@
|
|||
</if>
|
||||
and o.status in (3,5)
|
||||
union all
|
||||
select o.project_benefits + ifnull(o.add_artificer_money,0) as project_benefits_total
|
||||
select ifnull(o.project_benefits,0) - ifnull(o.shop_money,0) - ifnull(o.one_artificer_money,0) as project_benefits_total
|
||||
from orders o
|
||||
where o.artificer_id = #{artificerId}
|
||||
and o.parent_id = 0
|
||||
|
|
Loading…
Reference in New Issue