星座图推送属性变换

This commit is contained in:
liwei1dao 2022-11-04 16:20:14 +08:00
parent cee542a826
commit 22538f24d3
3 changed files with 4 additions and 3 deletions

View File

@ -42,7 +42,7 @@ func (this *apiComp) Reset(session comm.IUserSession, req *pb.HoroscopeResetReq)
} }
info.Nodes = make(map[int32]int32) info.Nodes = make(map[int32]int32)
info.Lastrest = time.Now().Unix() info.Lastrest = time.Now().Unix()
if err = this.module.modelHoroscope.updateInfo(info); err != nil { if err = this.module.modelHoroscope.updateInfo(session, info); err != nil {
code = pb.ErrorCode_DBError code = pb.ErrorCode_DBError
return return
} }

View File

@ -52,7 +52,7 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.HoroscopeUpgrade
return return
} }
info.Nodes[conf.NodeId] = conf.Lv + 1 info.Nodes[conf.NodeId] = conf.Lv + 1
if err = this.module.modelHoroscope.updateInfo(info); err != nil { if err = this.module.modelHoroscope.updateInfo(session, info); err != nil {
code = pb.ErrorCode_DBError code = pb.ErrorCode_DBError
return return
} }

View File

@ -43,7 +43,7 @@ func (this *modelHoroscope) queryInfo(uId string) (result *pb.DBHoroscope, err e
} }
///保存用户竞技场信息 ///保存用户竞技场信息
func (this *modelHoroscope) updateInfo(info *pb.DBHoroscope) (err error) { func (this *modelHoroscope) updateInfo(session comm.IUserSession, info *pb.DBHoroscope) (err error) {
var ( var (
model *db.DBModel model *db.DBModel
) )
@ -67,6 +67,7 @@ func (this *modelHoroscope) updateInfo(info *pb.DBHoroscope) (err error) {
return return
} }
} }
this.module.ModuleHero.PushHeroProperty(session, heros)
} }
return return
} }