From e8a75a44bdc130e8b162351c3c94c01f3d8ada5e Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期四, 10 八月 2023 17:58:00 +0800
Subject: [PATCH] 入库+发货

---
 sale-server/src/main/resources/mapper/SaleMapper.xml |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/sale-server/src/main/resources/mapper/SaleMapper.xml b/sale-server/src/main/resources/mapper/SaleMapper.xml
index 92e882b..91951ff 100644
--- a/sale-server/src/main/resources/mapper/SaleMapper.xml
+++ b/sale-server/src/main/resources/mapper/SaleMapper.xml
@@ -12,18 +12,19 @@
         from mom_ocean.sale
         <where>
             state=1
-            <if test="orderNumber!=null">
-                and order_number=#{orderNumber}
+            <if test="orderNumber!=null and orderNumber!=''">
+                and order_number LIKE CONCAT('%',#{orderNumber},'%')
             </if>
-            <if test="name!=null">
-                and name=#{name}
+            <if test="name!=null and name!=''">
+                and name LIKE CONCAT('%',#{name},'%')
             </if>
-            <if test="type!=null">
+            <if test="type!=null and type!=''">
                 and type=#{type}
             </if>
-            <if test="delTime!=null">
+            <if test="delTime!=null and delTime!=''">
                 and DATE_FORMAT(delTime, '%Y-%m-%d')=#{delTime}
             </if>
         </where>
     </select>
+
 </mapper>

--
Gitblit v1.9.3