diff --git a/modules/mail/api_getAttachment.go b/modules/mail/api_getAttachment.go index baf10d3a7..f78a023fe 100644 --- a/modules/mail/api_getAttachment.go +++ b/modules/mail/api_getAttachment.go @@ -29,8 +29,7 @@ func (this *apiComp) GetUserMailAttachment(session comm.IUserSession, req *pb.Ma code = pb.ErrorCode_StateInvalid return } - _data, err := this.module.modelMail.MailGetMailAttachment(req.ObjID) - if err == nil { + if _data, err := this.module.modelMail.MailGetMailAttachment(req.ObjID); err == nil { if len(_data) > 0 { res := make([]*cfg.Gameatn, 0) for _, v := range _data { @@ -44,6 +43,8 @@ func (this *apiComp) GetUserMailAttachment(session comm.IUserSession, req *pb.Ma if code = this.module.DispenseRes(session, res, true); code == pb.ErrorCode_Success { // 修改状态 this.module.modelMail.MailUpdateMailAttachmentState(req.ObjID) + mail.Reward = true + mail.Check = true } } }