1
This commit is contained in:
parent
9cdd25b360
commit
81bf779a96
@ -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
|
||||
}
|
||||
|
||||
|
@ -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{},
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user