mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
封禁用户列表
This commit is contained in:
parent
d1985a6de8
commit
ae2342353f
@ -246,6 +246,10 @@ func GetBlockUsers(c *gin.Context) {
|
||||
ProfilePhoto: v.User.ProfilePhoto,
|
||||
Nickname: v.User.Nickname,
|
||||
IsBlock: v.User.IsBlock,
|
||||
Birth: v.User.Birth,
|
||||
PhoneNumber: v.User.PhoneNumber,
|
||||
Email: v.User.Email,
|
||||
Gender: int(v.User.Gender),
|
||||
CreateTime: v.User.CreateTime,
|
||||
},
|
||||
BeginDisableTime: v.BeginDisableTime,
|
||||
|
@ -559,6 +559,10 @@ func (s *userServer) GetBlockUsers(ctx context.Context, req *pbUser.GetBlockUser
|
||||
Nickname: v.User.Nickname,
|
||||
UserId: v.User.UserID,
|
||||
IsBlock: true,
|
||||
Birth: v.User.Birth.Format("2006-01-02"),
|
||||
PhoneNumber: v.User.PhoneNumber,
|
||||
Email: v.User.Email,
|
||||
Gender: v.User.Gender,
|
||||
},
|
||||
BeginDisableTime: (v.BeginDisableTime).String(),
|
||||
EndDisableTime: (v.EndDisableTime).String(),
|
||||
@ -590,6 +594,10 @@ func (s *userServer) GetBlockUserById(_ context.Context, req *pbUser.GetBlockUse
|
||||
Nickname: user.User.Nickname,
|
||||
UserId: user.User.UserID,
|
||||
IsBlock: true,
|
||||
Birth: user.User.Birth.Format("2006-01-02"),
|
||||
PhoneNumber: user.User.PhoneNumber,
|
||||
Email: user.User.Email,
|
||||
Gender: user.User.Gender,
|
||||
},
|
||||
BeginDisableTime: (user.BeginDisableTime).String(),
|
||||
EndDisableTime: (user.EndDisableTime).String(),
|
||||
|
@ -248,8 +248,12 @@ func GetBlockUserById(userId string) (BlockUserInfo, error) {
|
||||
return blockUserInfo, err
|
||||
}
|
||||
blockUserInfo.User.UserID = user.UserID
|
||||
blockUserInfo.User.FaceURL = user.UserID
|
||||
blockUserInfo.User.FaceURL = user.FaceURL
|
||||
blockUserInfo.User.Nickname = user.Nickname
|
||||
blockUserInfo.User.Birth = user.Birth
|
||||
blockUserInfo.User.PhoneNumber = user.PhoneNumber
|
||||
blockUserInfo.User.Email = user.Email
|
||||
blockUserInfo.User.Gender = user.Gender
|
||||
blockUserInfo.BeginDisableTime = blockUser.BeginDisableTime
|
||||
blockUserInfo.EndDisableTime = blockUser.EndDisableTime
|
||||
return blockUserInfo, nil
|
||||
@ -271,9 +275,13 @@ func GetBlockUsers(showNumber, pageNumber int32) ([]BlockUserInfo, error) {
|
||||
if err := dbConn.Table("users").Where("user_id=?", blockUser.UserId).First(&user).Error; err == nil {
|
||||
blockUserInfos = append(blockUserInfos, BlockUserInfo{
|
||||
User: db.User{
|
||||
UserID: user.UserID,
|
||||
Nickname: user.Nickname,
|
||||
FaceURL: user.FaceURL,
|
||||
UserID: user.UserID,
|
||||
Nickname: user.Nickname,
|
||||
FaceURL: user.FaceURL,
|
||||
Birth: user.Birth,
|
||||
PhoneNumber: user.PhoneNumber,
|
||||
Email: user.Email,
|
||||
Gender: user.Gender,
|
||||
},
|
||||
BeginDisableTime: blockUser.BeginDisableTime,
|
||||
EndDisableTime: blockUser.EndDisableTime,
|
||||
|
Loading…
x
Reference in New Issue
Block a user