2 Commits 3e6928671f ... 0f8adfeef7

Author SHA1 Message Date
  caoliqin 0f8adfeef7 Merge branch 'master' of http://1.14.104.71:10880/root/ylrz_scrm_java 4 days ago
  caoliqin f5c5e4184f fix:添加过滤被删除掉的会员 4 days ago

+ 6 - 3
fs-service-system/src/main/resources/mapper/store/FsUserMapper.xml

@@ -528,7 +528,7 @@
         LEFT JOIN fs_user_course_count ON fs_user.user_id = fs_user_course_count.user_id
         LEFT JOIN company_tag_user ON fs_user.user_id = company_tag_user.user_id
         LEFT JOIN company_tag ON FIND_IN_SET(company_tag.tag_id, company_tag_user.tag_ids) > 0
-        where 1 = 1
+        where fs_user.is_del = 0
         <if test="userId != null and userId !='' ">
             and (company_user.user_id = #{userId} OR company_user.parent_id = #{userId} )
         </if>
@@ -626,7 +626,8 @@
             fs_user
                 LEFT JOIN company_user ON fs_user.company_user_id = company_user.user_id
         WHERE
-            company_user.parent_id = #{userId}
+           (company_user.user_id = #{userId} OR company_user.parent_id = #{userId} )
+            and fs_user.is_del = 0
         GROUP BY
             fs_user.`status`
     </select>
@@ -755,11 +756,12 @@
                 WHERE (
                           company_user.user_id = #{userId}
                               OR company_user.parent_id = #{userId}
-                          )) as userTotal,
+                          ) and fs_user.is_del = 0) as userTotal,
                (SELECT count(fs_user.user_id)
                 FROM fs_user
                          LEFT JOIN company_user ON fs_user.company_user_id = company_user.user_id
                 WHERE (company_user.user_id = #{userId} OR company_user.parent_id = #{userId})
+                and fs_user.is_del = 0
                   AND to_days(fs_user.create_time) = to_days(now())) as todayNewUser
     </select>
 
@@ -1272,6 +1274,7 @@
                         LEFT JOIN company_user ON fs_user.company_user_id = company_user.user_id
                 WHERE
                     company_user.user_id = #{companyUserId}
+                  and fs_user.is_del = 0
                   AND to_days( fs_user.create_time ) = to_days(
                         now())
             ) AS todayNewUser