更新状态

This commit is contained in:
meixiongfeng 2023-04-14 14:18:05 +08:00
parent d18679f4cb
commit 2f99a821e9

View File

@ -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
}
}
}