ソースを参照

feat:优化手机端只能让看到销售自己的会员

caoliqin 2 日 前
コミット
332b581fa9

+ 11 - 0
fs-service-system/src/main/resources/mapper/store/FsUserMapper.xml

@@ -998,6 +998,9 @@
             LEFT JOIN fs_user ON fs_user.user_id = fcc.user_id
             WHERE 1=1
             AND FIND_IN_SET(#{companyId}, fpd.company_id)
+            <if test="userId != null and userId != ''">
+                AND fs_user.company_user_id = #{userId}
+            </if>
             <if test="periodId != null and periodId != ''">
                 AND fcpd.period_id =  #{periodId}
             </if>
@@ -1014,6 +1017,9 @@
             LEFT JOIN fs_user ON fs_user.user_id = fcc.user_id
             WHERE 1=1
             AND FIND_IN_SET(#{companyId}, fpd.company_id)
+            <if test="userId != null and userId != ''">
+                AND fs_user.company_user_id = #{userId}
+            </if>
             <if test="periodId != null and periodId != ''">
                 AND fcpd.period_id =  #{periodId}
             </if>
@@ -1039,6 +1045,11 @@
         <if test="companyUserId != null and companyUserId != ''">
             AND fs_user.company_user_id = #{companyUserId}
         </if>
+        <where>
+            <if test="userId != null and userId != ''">
+                AND fs_user.company_user_id = #{userId}
+            </if>
+        </where>
          ) as courseUserNum
     </select>