获取数据断线问题
This commit is contained in:
parent
123132b175
commit
6368eee720
@ -30,7 +30,7 @@ func (this *apiComp) DrawCard(session comm.IUserSession, req *pb.HeroDrawCardReq
|
||||
pool string
|
||||
//heroRecord *pb.DBHeroRecord // 英雄扩展属性
|
||||
)
|
||||
req.DrawCount = 10 // test
|
||||
// test
|
||||
cfgDraw = this.module.configure.GetGlobalConf() // 读取抽卡配置文件
|
||||
if cfgDraw == nil {
|
||||
return
|
||||
|
@ -25,14 +25,15 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.PagodaGetListReq
|
||||
list, _ := this.module.modelPagoda.getPagodaList(session.GetUserId())
|
||||
|
||||
if list == nil { // redis没有数据
|
||||
|
||||
list.Id = primitive.NewObjectID().Hex()
|
||||
result := &pb.DBPagoda{}
|
||||
result.Id = primitive.NewObjectID().Hex()
|
||||
|
||||
_mData := make(map[string]interface{}, 0)
|
||||
list.Uid = session.GetUserId()
|
||||
_mData[list.Id] = list
|
||||
result.Uid = session.GetUserId()
|
||||
_mData[result.Id] = result
|
||||
this.module.modelPagoda.addNewPagoda(session.GetUserId(), _mData)
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), PagodaGetListResp, &pb.PagodaGetListResp{Data: result})
|
||||
return
|
||||
}
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), PagodaGetListResp, &pb.PagodaGetListResp{Data: list})
|
||||
|
Loading…
Reference in New Issue
Block a user