From dcb96821f905f3fd93c059d8703517bdcac4d336 Mon Sep 17 00:00:00 2001
From: 刘帅 <rr.iii@qq.com>
Date: 星期二, 29 九月 2026 20:02:02 +0800
Subject: [PATCH] 排序问题及门店手机号展示问题

---
 cloud-server-management/src/main/resources/mapper/TStoreMapper.xml |   18 +++++++++---------
 1 files changed, 9 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 1c1f66c..b307188 100644
--- a/cloud-server-management/src/main/resources/mapper/TStoreMapper.xml
+++ b/cloud-server-management/src/main/resources/mapper/TStoreMapper.xml
@@ -37,8 +37,8 @@
     <select id="listAll" resultType="com.dsh.guns.modular.system.model.TStoreListVo">
         select t1.*,
                t2.name as userName,
-               coalesce(nullif(t1.phone, ''), nullif(t2.phone, '')) as phone,
-               coalesce(nullif(t2.phone, ''), nullif(t1.phone, '')) as userPhone,
+               coalesce(nullif(t1.phone, ''), nullif(t2.phone, ''), nullif(t2.account, ''), '') as phone,
+               coalesce(nullif(t2.phone, ''), nullif(t2.account, ''), nullif(t1.phone, ''), '') as userPhone,
                t3.name as yysName
         from t_store t1
         left join sys_user t2 on t1.storeStaffId = t2.id
@@ -54,7 +54,7 @@
             and t2.name like concat("%",#{name},"%")
         </if>
         <if test="phone !=null and phone !=''">
-            and coalesce(nullif(t2.phone, ''), nullif(t1.phone, '')) like concat("%",#{phone},"%")
+            and coalesce(nullif(t2.phone, ''), nullif(t2.account, ''), nullif(t1.phone, '')) like concat("%",#{phone},"%")
         </if>
         <if test="shopName !=null and shopName !=''">
             and t1.name like concat("%",#{shopName},"%")
@@ -183,8 +183,8 @@
     <select id="listAllStore" resultType="com.dsh.guns.modular.system.model.TStoreListVo">
         select t1.*,
                t2.name as userName,
-               coalesce(nullif(t1.phone, ''), nullif(t2.phone, '')) as phone,
-               coalesce(nullif(t2.phone, ''), nullif(t1.phone, '')) as userPhone,
+               coalesce(nullif(t1.phone, ''), nullif(t2.phone, ''), nullif(t2.account, ''), '') as phone,
+               coalesce(nullif(t2.phone, ''), nullif(t2.account, ''), nullif(t1.phone, ''), '') as userPhone,
                t3.name as yysName
         from t_store t1
         left join sys_user t2 on t1.storeStaffId = t2.id
@@ -200,7 +200,7 @@
             and t2.name like concat("%",#{name},"%")
         </if>
         <if test="phone !=null and phone !=''">
-            and coalesce(nullif(t2.phone, ''), nullif(t1.phone, '')) like concat("%",#{phone},"%")
+            and coalesce(nullif(t2.phone, ''), nullif(t2.account, ''), nullif(t1.phone, '')) like concat("%",#{phone},"%")
         </if>
         <if test="shopName !=null and shopName !=''">
             and t1.name like concat("%",#{shopName},"%")
@@ -210,8 +210,8 @@
     <select id="listAllStoresByIds" resultType="com.dsh.guns.modular.system.model.TStoreListVo">
         select t1.*,
                t2.name as userName,
-               coalesce(nullif(t1.phone, ''), nullif(t2.phone, '')) as phone,
-               coalesce(nullif(t2.phone, ''), nullif(t1.phone, '')) as userPhone,
+               coalesce(nullif(t1.phone, ''), nullif(t2.phone, ''), nullif(t2.account, ''), '') as phone,
+               coalesce(nullif(t2.phone, ''), nullif(t2.account, ''), nullif(t1.phone, ''), '') as userPhone,
                t3.name as yysName
         from t_store t1
         left join sys_user t2 on t1.storeStaffId = t2.id
@@ -230,7 +230,7 @@
             and t2.name like concat("%",#{name},"%")
         </if>
         <if test="phone !=null and phone !=''">
-            and coalesce(nullif(t2.phone, ''), nullif(t1.phone, '')) like concat("%",#{phone},"%")
+            and coalesce(nullif(t2.phone, ''), nullif(t2.account, ''), nullif(t1.phone, '')) like concat("%",#{phone},"%")
         </if>
         <if test="shopName !=null and shopName !=''">
             and t1.name like concat("%",#{shopName},"%")

--
Gitblit v1.7.1