上传故事线代码
This commit is contained in:
parent
e7e6b6864e
commit
7a86e715f0
@ -342,6 +342,9 @@ const (
|
||||
TableGamePuzzle = "puzzle"
|
||||
|
||||
TableGameLattice = "lattice"
|
||||
|
||||
//开服任务
|
||||
TableStoryline = "storyline"
|
||||
)
|
||||
|
||||
// RPC服务接口定义处
|
||||
|
@ -21,7 +21,7 @@ func (this *apiComp) Info(session comm.IUserSession, req *pb.StorylineInfoReq) (
|
||||
return
|
||||
}
|
||||
|
||||
if info, err = this.module.modeltask.getUserDTasks(session.GetUserId()); err != nil {
|
||||
if info, err = this.module.modeltask.getUserStoryline(session.GetUserId()); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
|
@ -37,7 +37,7 @@ func (this *apiComp) Complete(session comm.IUserSession, req *pb.StorylineComple
|
||||
return
|
||||
}
|
||||
|
||||
if info, err = this.module.modeltask.getUserDTasks(session.GetUserId()); err != nil {
|
||||
if info, err = this.module.modeltask.getUserStoryline(session.GetUserId()); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
|
@ -49,7 +49,7 @@ func (this *apiComp) Turnon(session comm.IUserSession, req *pb.StorylineTurnonRe
|
||||
isprotect = true
|
||||
}
|
||||
|
||||
if info, err = this.module.modeltask.getUserDTasks(session.GetUserId()); err != nil {
|
||||
if info, err = this.module.modeltask.getUserStoryline(session.GetUserId()); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
|
@ -19,7 +19,7 @@ type Modeltask struct {
|
||||
|
||||
func (this *Modeltask) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||
err = this.MCompModel.Init(service, module, comp, options)
|
||||
this.TableName = comm.Tablekftask
|
||||
this.TableName = comm.TableStoryline
|
||||
this.module = module.(*StoryLine)
|
||||
this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{
|
||||
Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}},
|
||||
@ -28,7 +28,7 @@ func (this *Modeltask) Init(service core.IService, module core.IModule, comp cor
|
||||
}
|
||||
|
||||
// 获取用户全部的埋点数据
|
||||
func (this *Modeltask) getUserDTasks(uid string) (results *pb.DBStoryline, err error) {
|
||||
func (this *Modeltask) getUserStoryline(uid string) (results *pb.DBStoryline, err error) {
|
||||
results = &pb.DBStoryline{}
|
||||
if err = this.Get(uid, results); err != nil && err != mgo.MongodbNil {
|
||||
this.module.Errorln(err)
|
||||
|
Loading…
Reference in New Issue
Block a user