From 78ed3451273dd83a198e337aae6de2c895dae3a3 Mon Sep 17 00:00:00 2001
From: guoyujie <guoyujie@ng.com>
Date: 星期三, 31 十二月 2025 13:57:50 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
---
north-glass-erp/src/main/resources/mapper/sd/OrderOtherMoneyMapper.xml | 40 ++++++++++++++++++++++++++++++++++------
1 files changed, 34 insertions(+), 6 deletions(-)
diff --git a/north-glass-erp/src/main/resources/mapper/sd/OrderOtherMoneyMapper.xml b/north-glass-erp/src/main/resources/mapper/sd/OrderOtherMoneyMapper.xml
index fbe2e09..984212a 100644
--- a/north-glass-erp/src/main/resources/mapper/sd/OrderOtherMoneyMapper.xml
+++ b/north-glass-erp/src/main/resources/mapper/sd/OrderOtherMoneyMapper.xml
@@ -5,12 +5,40 @@
<mapper namespace="com.example.erp.mapper.sd.OrderOtherMoneyMapper">
<select id="findById">
select
- a.*,
- b.alias
- from order_other_money as a
- left join basic_other_money as b
- on a.`column` = b.`column`
- where a.order_id = #{orderId}
+ a.order_id,
+ b.`column`,
+ a.quantity,
+ a.price,
+ a.money,
+ a.create_time,
+ b.alias,
+ b.id,
+ a.delivery_state
+ from basic_other_money as b
+ left join order_other_money as a
+ on a.`column` = b.`column` and a.order_id = #{orderId}
+ where b.`column` like 'M%' and b.state=1
+
+ UNION ALL
+
+-- 鏌ヨ order_other_money 琛ㄤ腑 column 涓虹┖鐨勮褰�
+ SELECT
+ a.order_id,
+ null AS `column`,
+ a.quantity,
+ a.price,
+ a.money,
+ a.create_time,
+ a.alias, -- 浣跨敤 order_other_money 琛ㄤ腑鐨勫埆鍚�
+ a.id,
+ a.delivery_state
+ FROM order_other_money AS a
+ WHERE a.order_id = #{orderId}
+ AND (a.`column` IS NULL OR a.`column` = '')
+ </select>
+
+ <select id="selectGrossAmount">
+ select ifnull(sum(money),0) from order_other_money where order_id = #{orderId}
</select>
--
Gitblit v1.8.0