根據二度人脈推薦好友sql,推薦好友sql

來源:互聯網
上載者:User

根據二度人脈推薦好友sql,推薦好友sql

friend表結構

DROP TABLE IF EXISTS FRIEND;
create table friend(
    uid        bigint not null comment '使用者標識',
    friend_uid    bigint not null comment '申請加為好友的使用者標識',
    sys_create_date datetime not null comment '申請時間',
    sys_last_update datetime not null comment '更新時間',
    state tinyint not null comment '好友狀態 0 : 刪除, 1:申請好友, 2 : 好友',
    primary key(uid, friend_uid)
)ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT '好友表';


select friend_uid from

friend where state=2 and
uid in (select friend_uid from friend where uid=13 and state=2)

and friend_uid not in (select friend_uid from friend where uid=13 ) and friend_uid != 13 limit 6


uid為目前使用者的ID,為id為13的使用者查詢二度人脈好友



qq校友的 一度人脈與二度人脈怎顯示出來?怎有些人有但有些人就沒有?

您看到有些使用者的校友裡有顯示一度人脈和二度人脈,是由於這些使用者的校友已經升級為最新的朋友版本,升級後的朋友版本增加了行業、公司等相關的功能,不過目前朋友版本還處於內側放量階段,所以只有一部分使用者有體驗資格,如果您想要使用朋友版本的校友,您可以讓已經升級為朋友版本的好友邀請您加入就可以了,還請您參考,真誠的希望可以協助到您,謝謝!
 
QQ校友怎關閉二度人脈,或者不讓我的好友看到我的其他人脈資訊?

1、進入校友網頁點擊頁面右上方的“設定”—》“隱私權設定”, 2、在隱私權設定頁面,可以對自己的資料、首頁進行隱私權設定,可以設定誰可以瀏覽查看我的資訊,其中包括:所有使用者可見、我的校友和我的好友可見、我的同班同學和我的好友可見、我的好友可見、我的同班同學可見、僅自己可見等;
3、同時還可以設定誰可以給我發小紙條和誰可以給我發好友申請等,同樣包括:所有人、我的校友和好友、我的同班同學和我的好友、我的好友、我的同班同學、不接收。
 

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.