Compare commits

...

2 Commits

Author SHA1 Message Date
曹磊 91c52d90c4 Merge remote-tracking branch 'origin/master' 2024-07-11 17:24:19 +08:00
曹磊 694d0d8620 订单增加业绩字段 2024-07-11 17:24:06 +08:00
1 changed files with 6 additions and 0 deletions

View File

@ -804,6 +804,11 @@
<select id="selectDividedIntoDetails" resultType="com.sqx.modules.artificer.entity.Orders">
select o.*,
(
(case when o.is_supplement in (1,3,4) then 0 else o.price end) + ifnull(o.add_price,0)
+ ifnull((case when o2.is_supplement in (1,3,4) then 0 else o2.price end),0) + ifnull(o2.add_price,0)
+ ifnull((case when o3.is_supplement in (1,3,4) then 0 else o3.price end),0) + ifnull(o3.add_price,0)
) as price_total,
(case when o.user_package_detail_id is null then m.title else bl.title end ) as title,
(case when o.user_package_detail_id is null then m.massage_img else bl.massage_img end ) as massageImg,
(case when o.status = 4
@ -834,6 +839,7 @@
and o.status in (3,5)
union all
select o.*,
o.price + ifnull(o.add_price,0) as price_total,
(case when o.user_package_detail_id is null then m.title else bl.title end ) as title,
(case when o.user_package_detail_id is null then m.massage_img else bl.massage_img end ) as massageImg,
o.artificer_money + ifnull(o.add_artificer_money,0) as artificer_money_total