|
|
@@ -25,7 +25,15 @@
|
|
|
</foreach>) cut left join `corp_user_follow_relation` cufr on cufr.id = cut.relation_id
|
|
|
left join `corp_user_auth` ca on ca.external_userid = cufr.corp_user_id
|
|
|
left join `corp_user` cu on cu.id = ca.corp_user_id
|
|
|
- where cufr.wx_corp_id = #{wxCorpId} and cu.user_id != 0
|
|
|
+ where cufr.wx_corp_id = #{wxCorpId}
|
|
|
+ <choose>
|
|
|
+ <when test="userScope == 2">
|
|
|
+ and cu.user_id != 0
|
|
|
+ </when>
|
|
|
+ <when test="userScope == 3">
|
|
|
+ and cu.user_id = 0
|
|
|
+ </when>
|
|
|
+ </choose>
|
|
|
and ca.wx_corp_id = #{wxCorpId}
|
|
|
<if test="followIds != null and followIds.size() > 0">
|
|
|
and cufr.follow_id in
|
|
|
@@ -42,7 +50,7 @@
|
|
|
any_value(cu.user_id) as user_id
|
|
|
from `corp_user_follow_relation` cufr left join `corp_user_auth` ca on ca.external_userid = cufr.corp_user_id
|
|
|
left join `corp_user` cu on cu.id = ca.corp_user_id
|
|
|
- where cufr.wx_corp_id = #{wxCorpId} and cu.user_id != 0
|
|
|
+ where cufr.wx_corp_id = #{wxCorpId}
|
|
|
and ca.wx_corp_id = #{wxCorpId}
|
|
|
<if test="followIds != null and followIds.size() > 0">
|
|
|
and cufr.follow_id in
|