diff --git a/modules/sociaty/module.go b/modules/sociaty/module.go index 634caeefb..06a9cbab4 100644 --- a/modules/sociaty/module.go +++ b/modules/sociaty/module.go @@ -175,12 +175,18 @@ func (this *Sociaty) GetSociatys(sociatyIds []string) (result []*pb.DBSociaty, e // 公会 func (this *Sociaty) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (reddot map[comm.ReddotType]*pb.ReddotItem) { + var ( + applyReddot bool + tasks *pb.DBSociatyTask + nocomplete int32 + err error + ) + reddot = make(map[comm.ReddotType]*pb.ReddotItem) sociaty := this.modelSociaty.getUserSociaty(session.GetUserId()) if sociaty == nil || sociaty.Id == "" { return } - var applyReddot bool if this.modelSociaty.isRight(session.GetUserId(), sociaty, pb.SociatyJob_PRESIDENT, pb.SociatyJob_VICEPRESIDENT, @@ -212,6 +218,22 @@ func (this *Sociaty) Reddot(session comm.IUserSession, rid ...comm.ReddotType) ( Activated: applyReddot, Nextchanagetime: 0, } + case comm.Reddot15401: + if tasks, err = this.modelSociatyTask.getUserTask(session.GetUserId(), sociaty.Id); err != nil { + continue + } + for _, v := range tasks.TaskList { + if v.Status != 1 { + nocomplete++ + } + } + reddot[comm.Reddot15401] = &pb.ReddotItem{ + Rid: int32(comm.Reddot15401), + Activated: true, + Nextchanagetime: 0, + Progress: nocomplete, + Total: int32(len(tasks.TaskList)), + } } }