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