修复公会签到红点值

This commit is contained in:
wh_zcy 2022-11-25 18:00:28 +08:00
parent 9919a3797c
commit 8eaee8944a
2 changed files with 3 additions and 2 deletions

View File

@ -225,6 +225,7 @@ func (this *ModelSociaty) getUserSociaty(uid string) (sociaty *pb.DBSociaty) {
sociaty); err != nil { sociaty); err != nil {
this.moduleSociaty.Errorln(err) this.moduleSociaty.Errorln(err)
} }
log.Debug("跨服获取公会信息", log.Fields{"uid": uid, "sociatyId": sociaty.Id})
} }
} }
@ -680,6 +681,7 @@ func (this *ModelSociaty) sign(uid string, sociaty *pb.DBSociaty) error {
} }
// 是否已签到 // 是否已签到
// 已签到true 未签到false
func (this *ModelSociaty) IsSign(uid string, sociaty *pb.DBSociaty) bool { func (this *ModelSociaty) IsSign(uid string, sociaty *pb.DBSociaty) bool {
if _, ok := utils.Findx(sociaty.SignIds, uid); ok { if _, ok := utils.Findx(sociaty.SignIds, uid); ok {
return ok return ok

View File

@ -137,13 +137,12 @@ func (this *Sociaty) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (
if len(sociaty.ApplyRecord) > 0 { if len(sociaty.ApplyRecord) > 0 {
applyReddot = true applyReddot = true
} }
return
} }
for _, v := range rid { for _, v := range rid {
switch v { switch v {
case comm.Reddot3: case comm.Reddot3:
tf := this.modelSociaty.IsSign(session.GetUserId(), sociaty) tf := this.modelSociaty.IsSign(session.GetUserId(), sociaty)
reddot[comm.Reddot3] = tf reddot[comm.Reddot3] = !tf
case comm.Reddot29: case comm.Reddot29:
reddot[comm.Reddot29] = applyReddot reddot[comm.Reddot29] = applyReddot
} }