|
|
@@ -37,10 +37,10 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="getCanBindFriendList" resultType="com.mokamrp.privates.mapper.pangu.pojo.FosterwxWxfriend">
|
|
|
- SELECT A.*,ifnull(B.bind_mobile_cnt,0) as bind_mobile_cnt FROM pan_fosterwx_wxfriend AS A
|
|
|
+ SELECT t.* from (SELECT A.*,ifnull(B.bind_mobile_cnt,0) as bind_mobile_cnt FROM pan_fosterwx_wxfriend AS A
|
|
|
LEFT JOIN (SELECT count(friend_id) as bind_mobile_cnt,friend_id FROM pan_fosterwx_mobile_wxfriend GROUP BY friend_id) AS B ON A.id = B.friend_id
|
|
|
- Where B.bind_mobile_cnt < 3
|
|
|
- And A.status = 1
|
|
|
+ WHERE A.status = 1) AS t
|
|
|
+ WHERE t.bind_mobile_cnt < 3
|
|
|
</select>
|
|
|
<select id="getListPro" resultType="com.mokamrp.privates.mapper.pangu.pojo.FosterwxMobileWxfriend">
|
|
|
SELECT GROUP_CONCAT(B.wx_name,'#',B.wx_username,'#',B.id) as wx_str,
|