From 69bb3fc403f9d44e9ac252e186885a80549be1b6 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 17 Apr 2024 08:46:21 +0800 Subject: [PATCH] 1 --- server/mailserver/mail/mail.go | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/server/mailserver/mail/mail.go b/server/mailserver/mail/mail.go index 98f99a8d..403b7fc0 100644 --- a/server/mailserver/mail/mail.go +++ b/server/mailserver/mail/mail.go @@ -1,12 +1,10 @@ package mail import ( + "q5" "f5" "sync" "main/common" - //"main/constant" - //"q5" - //"strings" ) type attachment struct { @@ -48,7 +46,23 @@ func (this *mail) GetMailId() int64 { return this.mailId } -func (this *mail) fillMailDto(mailDto *common.MailDto) bool { +func (this *mail) fillMailDto(p *common.MailDto) bool { + p.MailId = q5.ToString(this.mailId) + p.From = "" + p.To = "" + p.Subject = this.subject + p.Content = this.content + //p.Flags + p.SendTime = this.sendTime + p.ExpireTime = this.expireTime + p.MailType = this.mailType + //p.MailSubType = + //p.Ext + for _, ele := range(this.attachments) { + attachment := new(common.AttachmentDto) + attachment.ItemId = ele.itemId + attachment.ItemNum = ele.itemNum + } return true }