携程推送羁绊信息
This commit is contained in:
parent
ae21093938
commit
6d4a95f461
@ -175,7 +175,7 @@ type (
|
|||||||
ModifyHeroFetterData(uid string, obj string, data map[string]interface{}) (code pb.ErrorCode) // 修改羁绊信息
|
ModifyHeroFetterData(uid string, obj string, data map[string]interface{}) (code pb.ErrorCode) // 修改羁绊信息
|
||||||
QueryHeroFetter(uid string) (data []*pb.DBHeroFetter) // 查询所有的羁绊信息
|
QueryHeroFetter(uid string) (data []*pb.DBHeroFetter) // 查询所有的羁绊信息
|
||||||
//QueryOneHeroFetter(uid string, cid string) *pb.DBHeroFetter // 通过英雄配置id 查询羁绊信息
|
//QueryOneHeroFetter(uid string, cid string) *pb.DBHeroFetter // 通过英雄配置id 查询羁绊信息
|
||||||
AddHeroFetterData(session IUserSession, heroConfId ...string) (code pb.ErrorCode) // 创建一条羁绊信息
|
AddHeroFetterData(uid string, heroConfId ...string) (code pb.ErrorCode) // 创建一条羁绊信息
|
||||||
}
|
}
|
||||||
//月子秘境
|
//月子秘境
|
||||||
IMoonFantasy interface {
|
IMoonFantasy interface {
|
||||||
|
@ -67,9 +67,9 @@ func (this *Hero) CreateHeroes(uid string, heroCfgId ...string) error {
|
|||||||
func (this *Hero) CreateRepeatHero(session comm.IUserSession, heroCfgId string, num int32, bPush bool) (code pb.ErrorCode) {
|
func (this *Hero) CreateRepeatHero(session comm.IUserSession, heroCfgId string, num int32, bPush bool) (code pb.ErrorCode) {
|
||||||
_hero, err := this.modelHero.createHeroOverlying(session.GetUserId(), heroCfgId, num)
|
_hero, err := this.modelHero.createHeroOverlying(session.GetUserId(), heroCfgId, num)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
this.moduleFetter.AddHeroFetterData(session, heroCfgId)
|
|
||||||
go func(uid string, heroCfgId string) { // 携程处理 图鉴数据
|
|
||||||
|
|
||||||
|
go func(uid string, heroCfgId string) { // 携程处理 图鉴数据
|
||||||
|
this.moduleFetter.AddHeroFetterData(uid, heroCfgId)
|
||||||
if result, err1 := this.ModuleUser.GetUserExpand(uid); err1 == nil {
|
if result, err1 := this.ModuleUser.GetUserExpand(uid); err1 == nil {
|
||||||
initUpdate := map[string]interface{}{}
|
initUpdate := map[string]interface{}{}
|
||||||
sz := result.GetTujian()
|
sz := result.GetTujian()
|
||||||
|
@ -135,8 +135,7 @@ func (this *Library) QueryOneHeroFetter(uid string, cid string) *pb.DBHeroFetter
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 创建一条羁绊信息
|
// 创建一条羁绊信息
|
||||||
func (this *Library) AddHeroFetterData(session comm.IUserSession, heroConfId string) (code pb.ErrorCode) {
|
func (this *Library) AddHeroFetterData(uid string, heroConfId string) (code pb.ErrorCode) {
|
||||||
uid := session.GetUserId()
|
|
||||||
// 推送
|
// 推送
|
||||||
rsp := &pb.LibraryChangePush{}
|
rsp := &pb.LibraryChangePush{}
|
||||||
_data := this.QueryOneHeroFetter(uid, heroConfId)
|
_data := this.QueryOneHeroFetter(uid, heroConfId)
|
||||||
@ -176,7 +175,6 @@ func (this *Library) AddHeroFetterData(session comm.IUserSession, heroConfId str
|
|||||||
rsp.Data = append(rsp.Data, obj)
|
rsp.Data = append(rsp.Data, obj)
|
||||||
}
|
}
|
||||||
this.SendMsgToUser(string(this.GetType()), LibraryChangePush, rsp, uid)
|
this.SendMsgToUser(string(this.GetType()), LibraryChangePush, rsp, uid)
|
||||||
//session.SendMsg(string(this.GetType()), LibraryChangePush, rsp)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user