diff --git a/modules/mline/module.go b/modules/mline/module.go index 256b27d1f..54819d6d4 100644 --- a/modules/mline/module.go +++ b/modules/mline/module.go @@ -127,7 +127,31 @@ func (this *Mline) ModifyMlineDataByNanduID(session comm.IUserSession, id int32) this.modelMline.addNewChapter(session.GetUserId(), newData) } } + // 修改扩展数据 + if rst, err := this.ModuleUser.GetUserExpand(session.GetUserId()); err == nil { // 统计主线进度 + _mp := rst.Mline + var cType int32 + conf := this.configure.GetMainChapterConf(connf.Chapterid) + if conf != nil { + cType = conf.ChapterType + } + if _mp == nil { + _mp = make(map[int32]int32, 1) + _mp[cType] = id + } else { + if v, ok := _mp[cType]; ok { + if v <= id { + _mp[cType] = id + } + } else { + _mp[cType] = id + } + } + this.ModuleUser.ChangeUserExpand(session.GetUserId(), map[string]interface{}{ + "mline": _mp, + }) + } return } func (this *Mline) GetUsermLineData(uid string, chapterType int32) (chapterId int32) {