@ -33,7 +33,7 @@
@@ -33,7 +33,7 @@
common_push_concern_fan cf JOIN sys_user u
ON
<choose >
<when test= "map.onType == 1" >
<when test= "map.dynamicJ oi nType == 1" >
cf.concern_user_id = u.id
</when>
<otherwise >
@ -89,7 +89,7 @@
@@ -89,7 +89,7 @@
common_push_concern_fan cf JOIN sys_user u
ON
<choose >
<when test= "onType == 1" >
<when test= "dynamicJ oi nType == 1" >
cf.concern_user_id = u.id
</when>
<otherwise >
@ -103,7 +103,6 @@
@@ -103,7 +103,6 @@
</where>
</select>
<!-- todo: 多条 common_push_concern_fan 相同跟 sys_user 关联可能会出现问题 -->
<select id= "selectPushFriendList" resultType= "Map" >
SELECT
cf.`status` cf_status,
@ -112,12 +111,22 @@
@@ -112,12 +111,22 @@
u.*
FROM
sys_user u
LEFT JOIN (select * FROM common_push_concern_fan
WHERE del_flag = 0
AND fan_user_id = ${@com.cloud.kicc.common.security.util.SecurityUtils@getUser().id}) cf
ON u.id = cf.concern_user_id
LEFT JOIN common_push_blacklist b
ON u.id = b.concern_user_id
LEFT JOIN (select * FROM common_push_concern_fan WHERE del_flag = 0
<choose >
<!-- 企业用户进行粉丝查询连表 -->
<when test= "map.dynamicJoinType == 1" >
AND concern_user_id = ${@com.cloud.kicc.common.security.util.SecurityUtils@getUser().id}) cf
ON u.id = cf.fan_user_id
LEFT JOIN common_push_blacklist b
ON u.id = b.fan_user_id
</when>
<otherwise >
AND fan_user_id = ${@com.cloud.kicc.common.security.util.SecurityUtils@getUser().id}) cf
ON u.id = cf.concern_user_id
LEFT JOIN common_push_blacklist b
ON u.id = b.concern_user_id
</otherwise>
</choose>
<where >
u.del_flag = 0
AND u.status = 0
@ -129,6 +138,7 @@
@@ -129,6 +138,7 @@
<if test= "map.nickName != null and map.nickName != ''" >
AND u.nick_name = #{map.nickName}
</if>
ORDER BY u.create_time ASC
</where>
</select>