刘帅
7 天以前 d41e0da5df20d559b0b9b8c180d1bf70ba7c1845
cloud-server-management/src/main/resources/mapper/UserMapper.xml
@@ -84,7 +84,28 @@
                               select objectId as storeId from sys_user where id = #{userId} and objectType = 3 and objectId is not null
                               union all
                               select id as storeId from t_store where storeStaffId = #{userId}
                            ) relation_store
                         ) relation_store
   </select>
   <select id="getUserIdsByStoreIds" resultType="java.lang.Integer">
      select distinct userId from (
         select userId from sys_user_store
         where isDeleted = 0 and storeId in
         <foreach collection="storeIds" separator="," item="storeId" open="(" close=")">
            #{storeId}
         </foreach>
         union all
         select id as userId from sys_user
         where objectType = 3 and objectId in
         <foreach collection="storeIds" separator="," item="storeId" open="(" close=")">
            #{storeId}
         </foreach>
         union all
         select storeStaffId as userId from t_store
         where storeStaffId is not null and id in
         <foreach collection="storeIds" separator="," item="storeId" open="(" close=")">
            #{storeId}
         </foreach>
      ) relation_user
   </select>
   <select id="getByAccount" resultType="com.dsh.guns.modular.system.model.User">