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