From 44e16499b6ef0a2c2fbaad687d0ab091e0b181db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E7=A3=8A?= <45566618@qq.com> Date: Sat, 13 Jul 2024 12:16:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=85=E5=80=BC=E7=8E=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/mapper/artificer/OrdersDao.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/resources/mapper/artificer/OrdersDao.xml b/src/main/resources/mapper/artificer/OrdersDao.xml index b82d48f..7675db6 100644 --- a/src/main/resources/mapper/artificer/OrdersDao.xml +++ b/src/main/resources/mapper/artificer/OrdersDao.xml @@ -1579,6 +1579,11 @@ select o.*, (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.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.status = 4 then o.artificer_money + ifnull(o.add_artificer_money,0) else o.artificer_money + ifnull(o.add_artificer_money,0) + ifnull(o2.artificer_money,0) + ifnull(o2.add_artificer_money,0) + ifnull(o3.artificer_money,0) + ifnull(o3.add_artificer_money,0) @@ -1620,6 +1625,7 @@ select o.*, (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.price + ifnull(o.add_price,0) as price_total, o.artificer_money + ifnull(o.add_artificer_money,0) as artificer_money_total from orders o left join orders_massage om on om.orders_id=o.orders_id