Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
e75f63b070
@ -131,3 +131,31 @@ func (this *modelMail) MailQueryUserMailByReard(uId string) (mail []*pb.DBMailDa
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//附件红点
|
||||||
|
func (this *modelMail) checkReddot26(uid string) bool {
|
||||||
|
mailinfo, err := this.MailQueryUserMail(uid)
|
||||||
|
if err != nil {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
for _, v := range mailinfo {
|
||||||
|
if v.Reward && len(v.Items) > 0 {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// 未读红点
|
||||||
|
func (this *modelMail) checkReddot30(uid string) bool {
|
||||||
|
mailinfo, err := this.MailQueryUserMail(uid)
|
||||||
|
if err != nil {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
for _, v := range mailinfo {
|
||||||
|
if !v.Check {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
@ -121,3 +121,23 @@ func (this *Mail) SendNewMail(mail *pb.DBMailData, uid ...string) bool {
|
|||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//红点查询
|
||||||
|
func (this *Mail) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (reddot map[comm.ReddotType]bool) {
|
||||||
|
reddot = make(map[comm.ReddotType]bool)
|
||||||
|
for _, v := range rid {
|
||||||
|
switch v {
|
||||||
|
case comm.Reddot26:
|
||||||
|
if isredot := this.modelMail.checkReddot26(session.GetUserId()); isredot {
|
||||||
|
reddot[comm.Reddot26] = true
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case comm.Reddot30:
|
||||||
|
if isredot := this.modelMail.checkReddot30(session.GetUserId()); isredot {
|
||||||
|
reddot[comm.Reddot30] = true
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user