Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
c877dc479e
@ -35,18 +35,16 @@ func (this *apiComp) Randlist(session comm.IUserSession, req *pb.FriendRandlistR
|
||||
}
|
||||
|
||||
//在线玩家列表
|
||||
onlines, err = this.module.ModuleUser.UserRandOnlineList(10)
|
||||
if err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
onlines, _ = this.module.ModuleUser.UserRandOnlineList(10)
|
||||
// 在线玩家为0 直接返回
|
||||
if len(onlines) == 0 {
|
||||
session.SendMsg(string(this.module.GetType()), FriendSubTypeRandList, &pb.FriendRandlistResp{})
|
||||
return
|
||||
}
|
||||
for _, v := range onlines {
|
||||
userids = append(userids, v.Uid)
|
||||
}
|
||||
|
||||
//检查目标v中的申请列表中是否有自己,
|
||||
friends, err = this.module.modelFriend.GetFriends(userids)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user