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