This commit is contained in:
aozhiwei 2024-06-05 16:09:32 +08:00
parent 9cdd25b360
commit 81bf779a96
2 changed files with 4 additions and 14 deletions

View File

@ -8,11 +8,6 @@ import (
"main/constant" "main/constant"
) )
type attachment struct {
itemId int32 `json:"itemid"`
itemNum int32 `json:"itemnum"`
}
type mail struct { type mail struct {
mailId int64 mailId int64
mailType int32 mailType int32
@ -22,13 +17,13 @@ type mail struct {
expireTime int32 expireTime int32
userRegStartTime int32 userRegStartTime int32
userRegEndTime int32 userRegEndTime int32
attachments []*attachment attachments []*common.AttachmentDto
recipients *sync.Map //account_id, int recipients *sync.Map //account_id, int
userGroups *sync.Map //group_id, *userGroup userGroups *sync.Map //group_id, *userGroup
} }
func (this *mail) init() { func (this *mail) init() {
this.attachments = []*attachment{} this.attachments = []*common.AttachmentDto{}
} }
func (this *mail) loadFromDb(ds *f5.DataSet) { func (this *mail) loadFromDb(ds *f5.DataSet) {
@ -107,12 +102,7 @@ func (this *mail) fillMailDto(hum common.Player, p *common.MailDto) bool {
p.MailType = this.mailType p.MailType = this.mailType
p.MailSubType = 0 p.MailSubType = 0
p.Ext = "" p.Ext = ""
p.Attachments = make([]*common.AttachmentDto, 0) p.Attachments = this.attachments
for _, ele := range(this.attachments) {
attachment := new(common.AttachmentDto)
attachment.ItemId = ele.itemId
attachment.ItemNum = ele.itemNum
}
return true return true
} }

View File

@ -127,7 +127,7 @@ func (this *mailMgr) CaGetMailList(c *gin.Context) {
rspObj := struct { rspObj := struct {
ErrCode int32 `json:"errcode"` ErrCode int32 `json:"errcode"`
ErrMsg string `json:"errmsg"` ErrMsg string `json:"errmsg"`
MailList []*common.MailDto `json:"mail_list"` MailList []*common.MailDto `json:"maillist"`
}{ }{
MailList: []*common.MailDto{}, MailList: []*common.MailDto{},
} }