携程推送羁绊信息

This commit is contained in:
meixiongfeng 2022-10-14 11:19:52 +08:00
parent ae21093938
commit 6d4a95f461
3 changed files with 4 additions and 6 deletions

View File

@ -175,7 +175,7 @@ type (
ModifyHeroFetterData(uid string, obj string, data map[string]interface{}) (code pb.ErrorCode) // 修改羁绊信息
QueryHeroFetter(uid string) (data []*pb.DBHeroFetter) // 查询所有的羁绊信息
//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 {

View File

@ -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) {
_hero, err := this.modelHero.createHeroOverlying(session.GetUserId(), heroCfgId, num)
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 {
initUpdate := map[string]interface{}{}
sz := result.GetTujian()

View File

@ -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) {
uid := session.GetUserId()
func (this *Library) AddHeroFetterData(uid string, heroConfId string) (code pb.ErrorCode) {
// 推送
rsp := &pb.LibraryChangePush{}
_data := this.QueryOneHeroFetter(uid, heroConfId)
@ -176,7 +175,6 @@ func (this *Library) AddHeroFetterData(session comm.IUserSession, heroConfId str
rsp.Data = append(rsp.Data, obj)
}
this.SendMsgToUser(string(this.GetType()), LibraryChangePush, rsp, uid)
//session.SendMsg(string(this.GetType()), LibraryChangePush, rsp)
}
}