From 44118c0312f656e200def2e59186237999a6908d Mon Sep 17 00:00:00 2001
From: 刘帅 <rr.iii@qq.com>
Date: 星期三, 23 九月 2026 11:07:11 +0800
Subject: [PATCH] bug:员工权限

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

diff --git a/cloud-server-management/src/main/resources/mapper/TStoreMapper.xml b/cloud-server-management/src/main/resources/mapper/TStoreMapper.xml
index 7ebf93d..1c1f66c 100644
--- a/cloud-server-management/src/main/resources/mapper/TStoreMapper.xml
+++ b/cloud-server-management/src/main/resources/mapper/TStoreMapper.xml
@@ -207,6 +207,36 @@
         </if>
         order by t1.id desc
     </select>
+    <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,
+               t3.name as yysName
+        from t_store t1
+        left join sys_user t2 on t1.storeStaffId = t2.id
+        left join t_operator t3 on t1.operatorId = t3.id
+        where t1.id in
+        <foreach collection="ids" item="id" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+        <if test="provinceCode !=null and provinceCode !=''">
+            and t1.provinceCode = #{provinceCode}
+        </if>
+        <if test="cityCode !=null and cityCode !=''">
+            and t1.cityCode = #{cityCode}
+        </if>
+        <if test="name !=null and name !=''">
+            and t2.name like concat("%",#{name},"%")
+        </if>
+        <if test="phone !=null and phone !=''">
+            and coalesce(nullif(t2.phone, ''), nullif(t1.phone, '')) like concat("%",#{phone},"%")
+        </if>
+        <if test="shopName !=null and shopName !=''">
+            and t1.name like concat("%",#{shopName},"%")
+        </if>
+        order by t1.id desc
+    </select>
     <select id="querySiteListOfpage" resultType="java.util.Map">
         SELECT t1.id, t2.operatorId, t1.province, t1.city, t2.name,t1.ids,t1.name as siteName
         ,t2.type as `type`

--
Gitblit v1.7.1