扩展数据初始化
This commit is contained in:
parent
90120d9ea9
commit
dd7b8379f5
@ -134,14 +134,19 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.MlineChall
|
||||
if first { // 发奖
|
||||
if rst, err := this.module.ModuleUser.GetUserExpand(session.GetUserId()); err == nil { // 统计主线进度
|
||||
_mp := rst.Mline
|
||||
if v, ok := _mp[curChapter.CType]; ok {
|
||||
if v <= req.StageId {
|
||||
if _mp == nil {
|
||||
_mp = make(map[int32]int32, 1)
|
||||
_mp[curChapter.CType] = req.StageId
|
||||
} else {
|
||||
if v, ok := _mp[curChapter.CType]; ok {
|
||||
if v <= req.StageId {
|
||||
_mp[curChapter.CType] = req.StageId
|
||||
}
|
||||
} else {
|
||||
_mp[curChapter.CType] = req.StageId
|
||||
}
|
||||
} else {
|
||||
_mp = make(map[int32]int32, 0)
|
||||
_mp[curChapter.CType] = req.StageId
|
||||
}
|
||||
|
||||
this.module.ModuleUser.ChangeUserExpand(session.GetUserId(), map[string]interface{}{
|
||||
"mline": _mp,
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user