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)
|
onlines, _ = this.module.ModuleUser.UserRandOnlineList(10)
|
||||||
if err != nil {
|
// 在线玩家为0 直接返回
|
||||||
errdata = &pb.ErrorData{
|
if len(onlines) == 0 {
|
||||||
Code: pb.ErrorCode_DBError,
|
session.SendMsg(string(this.module.GetType()), FriendSubTypeRandList, &pb.FriendRandlistResp{})
|
||||||
Title: pb.ErrorCode_DBError.ToString(),
|
|
||||||
Message: err.Error(),
|
|
||||||
}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
for _, v := range onlines {
|
for _, v := range onlines {
|
||||||
userids = append(userids, v.Uid)
|
userids = append(userids, v.Uid)
|
||||||
}
|
}
|
||||||
|
|
||||||
//检查目标v中的申请列表中是否有自己,
|
//检查目标v中的申请列表中是否有自己,
|
||||||
friends, err = this.module.modelFriend.GetFriends(userids)
|
friends, err = this.module.modelFriend.GetFriends(userids)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user