Merge branches 'dev' and 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
cf91bd07e2
@ -136,7 +136,7 @@ const (
|
||||
//
|
||||
TableHunting = "hunting"
|
||||
// 维京远征排行榜
|
||||
TableHuntingRank = "huntingrank"
|
||||
TableHuntingRecord = "huntingrecord"
|
||||
TableHuntingRankList = "huntingrankList"
|
||||
// 支线剧情任务
|
||||
TableLinestory = "linestory"
|
||||
|
@ -183,6 +183,9 @@ type (
|
||||
Trigger(session IUserSession, source *pb.BattleReport)
|
||||
}
|
||||
IViking interface {
|
||||
CheckUserBaseVikingInfo(uid string) (data *pb.DBViking) // 查询玩家最佳通关记录
|
||||
CheckUserBaseVikingInfo(uid string) (data []*pb.DBViking) // 查询玩家最佳通关记录
|
||||
}
|
||||
IHunting interface {
|
||||
CheckUserBaseHuntingInfo(uid string) (data []*pb.DBHuntingRank) // 查询玩家最佳通关记录
|
||||
}
|
||||
)
|
||||
|
@ -12,6 +12,12 @@ import (
|
||||
"unicode"
|
||||
"unsafe"
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
"go_dreamfactory/lego/utils/codec/codecore"
|
||||
|
||||
>>>>>>> 830997df434fe5d5d1769768c53efaa0caff2969
|
||||
"github.com/modern-go/reflect2"
|
||||
)
|
||||
|
||||
|
@ -15,14 +15,15 @@ type ModelRank struct {
|
||||
}
|
||||
|
||||
func (this *ModelRank) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||
this.TableName = comm.TableHuntingRank
|
||||
this.TableName = comm.TableHuntingRecord // 挑战记录
|
||||
err = this.MCompModel.Init(service, module, comp, options)
|
||||
this.moduleHunting = module.(*Hunting)
|
||||
return
|
||||
}
|
||||
|
||||
func (this *ModelRank) AddRank(uId string, data *pb.DBHuntingRank) (err error) {
|
||||
if err = this.Add(uId, data); err != nil {
|
||||
func (this *ModelRank) AddRankList(uId string, objId string, data *pb.DBHuntingRank) (err error) {
|
||||
|
||||
if err = this.AddList(uId, objId, data); err != nil {
|
||||
return
|
||||
}
|
||||
return nil
|
||||
@ -91,7 +92,7 @@ func (this *ModelRank) updatehuntingRankList(session comm.IUserSession, difficul
|
||||
Line: line,
|
||||
CostTime: costTime,
|
||||
}
|
||||
this.AddList(session.GetUserId(), new.Id, new)
|
||||
this.AddRankList(session.GetUserId(), new.Id, new)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -58,3 +58,16 @@ func (this *Hunting) ModifyHuntingData(uid string, data map[string]interface{})
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (this *Hunting) CheckUserBaseHuntingInfo(uid string) (data []*pb.DBHuntingRank) {
|
||||
list, err := this.modelHunting.getHuntingList(uid)
|
||||
if err != nil {
|
||||
for k := range list.Boss {
|
||||
_d := this.modulerank.getHuntingRankListByBossType(uid, k)
|
||||
if _d != nil {
|
||||
data = append(data, _d)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ type HuntingRank struct {
|
||||
|
||||
//组件初始化接口
|
||||
func (this *HuntingRank) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||
this.DbName = comm.TableHuntingRank
|
||||
this.DbName = comm.TableHuntingRecord
|
||||
this.TableName = comm.TableHuntingRankList
|
||||
this.MCompModel.Init(service, module, comp, options)
|
||||
this.service = service
|
||||
|
Loading…
Reference in New Issue
Block a user