From 79abff09f66ab8430082e5af58b65d72d1fd5d4f Mon Sep 17 00:00:00 2001
From: 刘帅 <rr.iii@qq.com>
Date: 星期三, 30 九月 2026 10:43:40 +0800
Subject: [PATCH] 门店手机号展示问题bug

---
 cloud-server-management/src/main/resources/mapper/TStoreMapper.xml |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/cloud-server-management/src/main/resources/mapper/TStoreMapper.xml b/cloud-server-management/src/main/resources/mapper/TStoreMapper.xml
index 8a865a8..b8560ff 100644
--- a/cloud-server-management/src/main/resources/mapper/TStoreMapper.xml
+++ b/cloud-server-management/src/main/resources/mapper/TStoreMapper.xml
@@ -37,8 +37,7 @@
     <select id="listAll" resultType="com.dsh.guns.modular.system.model.TStoreListVo">
         select t1.*,
                coalesce(t2.name, t4.name) as userName,
-               coalesce(nullif(t2.phone, ''), nullif(t4.phone, ''), nullif(t1.phone, ''), '') as phone,
-               coalesce(nullif(t2.phone, ''), nullif(t4.phone, ''), nullif(t1.phone, ''), '') as userPhone,
+               coalesce(t1.phone, '') as phone,
                t3.name as yysName
         from t_store t1
         left join sys_user t2 on t1.storeStaffId = t2.id
@@ -56,7 +55,7 @@
             and coalesce(t2.name, t4.name) like concat("%",#{name},"%")
         </if>
         <if test="phone !=null and phone !=''">
-            and coalesce(nullif(t2.phone, ''), nullif(t4.phone, ''), nullif(t1.phone, '')) like concat("%",#{phone},"%")
+            and t1.phone like concat("%",#{phone},"%")
         </if>
         <if test="shopName !=null and shopName !=''">
             and t1.name like concat("%",#{shopName},"%")
@@ -185,8 +184,7 @@
     <select id="listAllStore" resultType="com.dsh.guns.modular.system.model.TStoreListVo">
         select t1.*,
                coalesce(t2.name, t4.name) as userName,
-               coalesce(nullif(t2.phone, ''), nullif(t4.phone, ''), nullif(t1.phone, ''), '') as phone,
-               coalesce(nullif(t2.phone, ''), nullif(t4.phone, ''), nullif(t1.phone, ''), '') as userPhone,
+               coalesce(t1.phone, '') as phone,
                t3.name as yysName
         from t_store t1
         left join sys_user t2 on t1.storeStaffId = t2.id
@@ -204,7 +202,7 @@
             and coalesce(t2.name, t4.name) like concat("%",#{name},"%")
         </if>
         <if test="phone !=null and phone !=''">
-            and coalesce(nullif(t2.phone, ''), nullif(t4.phone, ''), nullif(t1.phone, '')) like concat("%",#{phone},"%")
+            and t1.phone like concat("%",#{phone},"%")
         </if>
         <if test="shopName !=null and shopName !=''">
             and t1.name like concat("%",#{shopName},"%")
@@ -214,8 +212,7 @@
     <select id="listAllStoresByIds" resultType="com.dsh.guns.modular.system.model.TStoreListVo">
         select t1.*,
                coalesce(t2.name, t4.name) as userName,
-               coalesce(nullif(t2.phone, ''), nullif(t4.phone, ''), nullif(t1.phone, ''), '') as phone,
-               coalesce(nullif(t2.phone, ''), nullif(t4.phone, ''), nullif(t1.phone, ''), '') as userPhone,
+               coalesce(t1.phone, '') as phone,
                t3.name as yysName
         from t_store t1
         left join sys_user t2 on t1.storeStaffId = t2.id
@@ -236,7 +233,7 @@
             and coalesce(t2.name, t4.name) like concat("%",#{name},"%")
         </if>
         <if test="phone !=null and phone !=''">
-            and coalesce(nullif(t2.phone, ''), nullif(t4.phone, ''), nullif(t1.phone, '')) like concat("%",#{phone},"%")
+            and t1.phone like concat("%",#{phone},"%")
         </if>
         <if test="shopName !=null and shopName !=''">
             and t1.name like concat("%",#{shopName},"%")

--
Gitblit v1.7.1