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 | 45 +++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 45 insertions(+), 0 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
new file mode 100644
index 0000000..984212a
--- /dev/null
+++ b/north-glass-erp/src/main/resources/mapper/sd/OrderOtherMoneyMapper.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.example.erp.mapper.sd.OrderOtherMoneyMapper">
+ <select id="findById">
+ select
+ 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>
+
+
+</mapper>
\ No newline at end of file
--
Gitblit v1.8.0