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"
)
type attachment struct {
itemId int32 `json:"itemid"`
itemNum int32 `json:"itemnum"`
}
type mail struct {
mailId int64
mailType int32
@ -22,13 +17,13 @@ type mail struct {
expireTime int32
userRegStartTime int32
userRegEndTime int32
attachments []*attachment
attachments []*common.AttachmentDto
recipients *sync.Map //account_id, int
userGroups *sync.Map //group_id, *userGroup
}
func (this *mail) init() {
this.attachments = []*attachment{}
this.attachments = []*common.AttachmentDto{}
}
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.MailSubType = 0
p.Ext = ""
p.Attachments = make([]*common.AttachmentDto, 0)
for _, ele := range(this.attachments) {
attachment := new(common.AttachmentDto)
attachment.ItemId = ele.itemId
attachment.ItemNum = ele.itemNum
}
p.Attachments = this.attachments
return true
}

View File

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