From d00e00aa93bce9d52e2e3a9fa2f8057184f4dd75 Mon Sep 17 00:00:00 2001
From: zj <1772600164@qq.com>
Date: Thu, 11 Jul 2024 14:40:09 +0800
Subject: [PATCH] 1

---
 src/main/resources/mapper/UserPositionMapper.xml |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/main/resources/mapper/UserPositionMapper.xml b/src/main/resources/mapper/UserPositionMapper.xml
index 7025a34..1edb775 100644
--- a/src/main/resources/mapper/UserPositionMapper.xml
+++ b/src/main/resources/mapper/UserPositionMapper.xml
@@ -485,7 +485,7 @@
     <include refid="Base_Column_List"/>
     FROM user_position
     <where>
-      <if test="searchId != null  ">
+      <if test="searchId != null  and searchId != '' ">
         and agent_id = #{searchId}
       </if>
       <if test="state != null  ">
@@ -502,16 +502,16 @@
       <if test="positionSn != null and positionSn != '' ">
         and position_sn like CONCAT('%','${positionSn}','%')
       </if>
-      <if test="positionType != null ">
+      <if test="positionType != null and positionType != ''">
         and position_type = #{positionType}
       </if>
-      <if test="beginTime != null ">
+      <if test="beginTime != null and beginTime != ''">
         and sell_order_time <![CDATA[>=]]> #{beginTime}
       </if>
-      <if test="endTime != null ">
+      <if test="endTime != null and endTime != ''">
         and sell_order_time <![CDATA[<=]]> #{endTime}
       </if>
-      <if test="phone != null ">
+      <if test="phone != null and phone != ''">
         and user_id  = (select id from  user where phone =  #{phone})
       </if>
 

--
Gitblit v1.9.3