Compare commits

..

No commits in common. "6de6a1a3188150c6ab6e25bcb7e25340742edc1a" and "147d3f12cda9268540ba57806d2613f79cadd903" have entirely different histories.

1 changed files with 4 additions and 5 deletions

View File

@ -231,10 +231,9 @@ func FindFriend(from_user_id, to_user_id int) []Friend {
}
type FriendRet struct {
ID int `json:"id"` //用户id
Name string `json:"name"` //用户名
Email string `json:"email"` //邮箱
Avatar string `json:"avatar"` //头像
ID int `json:"id"` //用户id
Name string `json:"name"` //用户名
Email string `json:"email"` //邮箱
}
func FindFriendsIDs(user_id int) []Friend {
@ -245,7 +244,7 @@ func FindFriendsIDs(user_id int) []Friend {
func FindFriends(user_id int) []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 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
}
func GetGroups(user_id int) []Group {