赛季塔
This commit is contained in:
parent
8c8e785517
commit
87fb35d43c
@ -103,6 +103,8 @@ const (
|
|||||||
TableGourmet = "gourmet"
|
TableGourmet = "gourmet"
|
||||||
// 随机任务
|
// 随机任务
|
||||||
TableRtask = "rtask"
|
TableRtask = "rtask"
|
||||||
|
///爬塔排行
|
||||||
|
TablePagodaRank = "pagodarank"
|
||||||
)
|
)
|
||||||
|
|
||||||
//RPC服务接口定义处
|
//RPC服务接口定义处
|
||||||
|
@ -28,7 +28,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.PagodaChalleng
|
|||||||
code = pb.ErrorCode_PagodaNotFound
|
code = pb.ErrorCode_PagodaNotFound
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
cfg := this.module.configure.GetPagodaconfig(req.LevelID)
|
cfg := this.module.configure.GetPagodaConfigData(req.PagodaType, req.LevelID)
|
||||||
if cfg == nil {
|
if cfg == nil {
|
||||||
code = pb.ErrorCode_PagodaNotFound
|
code = pb.ErrorCode_PagodaNotFound
|
||||||
return
|
return
|
||||||
|
48
modules/pagoda/model_rank.go
Normal file
48
modules/pagoda/model_rank.go
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
package pagoda
|
||||||
|
|
||||||
|
import (
|
||||||
|
"go_dreamfactory/comm"
|
||||||
|
"go_dreamfactory/lego/core"
|
||||||
|
"go_dreamfactory/modules"
|
||||||
|
"go_dreamfactory/pb"
|
||||||
|
)
|
||||||
|
|
||||||
|
type ModelRank struct {
|
||||||
|
modules.MCompModel
|
||||||
|
moduleUser *Pagoda
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *ModelRank) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||||
|
this.TableName = comm.TablePagodaRank
|
||||||
|
err = this.MCompModel.Init(service, module, comp, options)
|
||||||
|
this.moduleUser = module.(*Pagoda)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取用户
|
||||||
|
func (this *ModelRank) getUserSession(uid string) (cuser *pb.CacheUser) {
|
||||||
|
cuser = &pb.CacheUser{}
|
||||||
|
if err := this.Get(uid, cuser); err != nil {
|
||||||
|
this.moduleUser.Errorf("GetUserSession err:%v", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取用户通过扩展表
|
||||||
|
// func (this *ModelRank) GetUserExpand(uid string) (result *pb.DBUserExpand, err error) {
|
||||||
|
// result = &pb.DBUserExpand{}
|
||||||
|
// if err = this.moduleUser.modelExpand.Get(uid, result); err != nil && redis.RedisNil != err {
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
// err = nil
|
||||||
|
// return result, err
|
||||||
|
// }
|
||||||
|
|
||||||
|
// func (this *ModelRank) ChangeUserExpand(uid string, value map[string]interface{}) (err error) {
|
||||||
|
// if len(value) == 0 {
|
||||||
|
// return nil
|
||||||
|
// }
|
||||||
|
// return this.moduleUser.modelExpand.Change(uid, value)
|
||||||
|
|
||||||
|
// }
|
Loading…
Reference in New Issue
Block a user