查询好友添加avatar
This commit is contained in:
parent
6880e033a8
commit
8d9a953c53
|
|
@ -245,7 +245,7 @@ func FindFriendsIDs(user_id int) []Friend {
|
||||||
|
|
||||||
func FindFriends(user_id int) []FriendRet {
|
func FindFriends(user_id int) []FriendRet {
|
||||||
var friends []FriendRet
|
var friends []FriendRet
|
||||||
DB.Raw("select distinct users.id, users.name, users.email,user.avatar from users join friends on users.id = friends.friend_id where friends.user_id = ? and friends.deleted_at is null", user_id).Scan(&friends)
|
DB.Raw("select distinct users.id, users.name, users.email,users.avatar from users join friends on users.id = friends.friend_id where friends.user_id = ? and friends.deleted_at is null", user_id).Scan(&friends)
|
||||||
return friends
|
return friends
|
||||||
}
|
}
|
||||||
func GetGroups(user_id int) []Group {
|
func GetGroups(user_id int) []Group {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue