上传红点进度信息
This commit is contained in:
parent
09d202d65d
commit
37dc040fbe
@ -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)),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user