diff --git a/server/mailserver/player/player.go b/server/mailserver/player/player.go index f7519b46..d2633953 100644 --- a/server/mailserver/player/player.go +++ b/server/mailserver/player/player.go @@ -3,6 +3,7 @@ package player import ( "q5" "f5" + "mt" "sync" "main/common" "main/constant" @@ -48,6 +49,10 @@ func (this *player) GetAccountId() string { return this.accountId } +func (this *player) GetSessionId() string { + return this.sessionId +} + func (this *player) GetRegisterTime() int32 { return this.registerTime } @@ -86,13 +91,32 @@ func (this *player) MarkMails(mails []common.Mail) error { func (this *player) GetAttachment(mails []common.Mail) error { this.checkLock() - /* cbParams := struct { + AccountId string `json:"account_id"` Mails []struct { MailId string `json:"mailid"` Attachments []*common.AttachmentDto `json:"attachments"` } `json:"mails"` - }{}*/ + }{} + rspObj := struct { + ErrCode interface{} `json:"errcode"` + ErrMsg string `json:"errmsg"` + }{} + signStr := q5.Md5Str(q5.EncodeJson(&cbParams)) + f5.GetHttpCliMgr().SendGoStyleJsonRspPost( + mt.Table.Config.GetGameApiUrl(), + map[string]string{ + "account_id": this.GetAccountId(), + "session_id": this.GetSessionId(), + "c": "Mail", + "a": "getAttachmentCb", + "sign": signStr, + }, + &rspObj, + "", + q5.EncodeJson(&cbParams), + func(rsp f5.HttpCliResponse) { + }) return this.DeleteMails(mails) }