workMoments

pull/455/head
wangchuxiao 3 years ago committed by Xinwei Xiong(cubxxw-openim)
parent 0122c4f9ce
commit 81ec54d6e4

@ -49,12 +49,12 @@ func GetFriendListByUserID(OwnerUserID string) ([]db.Friend, error) {
return friends, nil return friends, nil
} }
func GetFriendIDListByUserID(OwnerUserID string) ([]string, error) { func GetFriendIDListByUserID(OwnerUserID string) ([]*string, error) {
dbConn, err := db.DB.MysqlDB.DefaultGormDB() dbConn, err := db.DB.MysqlDB.DefaultGormDB()
if err != nil { if err != nil {
return nil, err return nil, err
} }
var friendIDList []string var friendIDList []*string
err = dbConn.Table("friends").Select("friend_user_id").Where("owner_user_id=?", OwnerUserID).Find(&friendIDList).Error err = dbConn.Table("friends").Select("friend_user_id").Where("owner_user_id=?", OwnerUserID).Find(&friendIDList).Error
if err != nil { if err != nil {
return nil, err return nil, err

Loading…
Cancel
Save