diff --git a/comm/const.go b/comm/const.go index 7d3af16a2..5de1b09bc 100644 --- a/comm/const.go +++ b/comm/const.go @@ -402,7 +402,7 @@ const ( Diamond int32 = 2 //钻石 ) -//定时通知类型 +// 定时通知类型 type NotifyType int32 const ( @@ -463,6 +463,9 @@ const ( Reddot19105 ReddotType = 19105 //当英雄等级解锁到一定程度,下方传记解锁新的传记的时候 Reddot19109 ReddotType = 19109 // 当存在好感度羁绊可以激活的时候 Reddot19110 ReddotType = 19110 // 当存在好感度羁绊可以升级的时候,好感度羁绊界面激活 + + // 好友 + Reddot21101 ReddotType = 21101 //当好友申请存在时,一级位置:好友界面左边申请列表图标上右上角位置 当好友申请处理完红点消失 ) type TaskType int32 diff --git a/comm/imodule.go b/comm/imodule.go index 64a013788..14b4a6d63 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -246,6 +246,8 @@ type ( UseAssistHero(uid, friendId string) (*pb.DBHero, error) // 切磋结束通知 QiecuoFinishNotify(redUid, matchId string) error + // 红点 + IGetReddot } //聊天系统 diff --git a/modules/friend/module.go b/modules/friend/module.go index 98280e65d..287ab0c49 100644 --- a/modules/friend/module.go +++ b/modules/friend/module.go @@ -198,3 +198,24 @@ func (this *Friend) QiecuoFinishNotify(redUid, matchId string) error { } return nil } + +func (this *Friend) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (reddot map[comm.ReddotType]bool) { + reddot = make(map[comm.ReddotType]bool) + friend := this.modelFriend.GetFriend(session.GetUserId()) + if friend == nil { + for _, v := range rid { + reddot[v] = false + } + } else { + for _, v := range rid { + switch v { + case comm.Reddot21101: + if len(friend.ApplyIds) > 0 { + reddot[comm.Reddot15102] = true + } + } + } + } + + return +}