diff --git a/server/mailserver/mail/mail.go b/server/mailserver/mail/mail.go index a479b77d..0e40e0b5 100644 --- a/server/mailserver/mail/mail.go +++ b/server/mailserver/mail/mail.go @@ -8,8 +8,8 @@ import ( ) type attachment struct { - itemId int32 - itemNum int32 + itemId int32 `json:"item_id"` + itemNum int32 `json:"item_num"` } type mail struct { @@ -19,8 +19,8 @@ type mail struct { content string sendTime int32 expireTime int32 - userRegStart int32 - userRegEnd int32 + userRegStartTime int32 + userRegEndTime int32 attachments []*attachment userGroups *sync.Map } @@ -30,7 +30,14 @@ func (this *mail) init() { } func (this *mail) loadFromDb(ds *f5.DataSet) { - + this.mailId = q5.ToInt64(ds.GetByName("mail_id")) + this.mailType = q5.ToInt32(ds.GetByName("mail_type")) + this.subject = ds.GetByName("subject") + this.content = ds.GetByName("content") + this.sendTime = q5.ToInt32(ds.GetByName("sendTime")) + this.expireTime = q5.ToInt32(ds.GetByName("expireTime")) + this.userRegStartTime = q5.ToInt32(ds.GetByName("user_reg_start_time")) + this.userRegEndTime = q5.ToInt32(ds.GetByName("user_reg_end_time")) } func (this *mail) isType(mailType int32) bool { diff --git a/server/mailserver/mail/mailmgr.go b/server/mailserver/mail/mailmgr.go index e95c0167..65c8fff0 100644 --- a/server/mailserver/mail/mailmgr.go +++ b/server/mailserver/mail/mailmgr.go @@ -298,7 +298,7 @@ func (this *mailMgr) pullEvent() { return } this.pullingEvent = true - f5.GetJsStyleDb().SyncSelectCustomQuery( + f5.GetJsStyleDb().SelectCustomQuery( constant.MAIL_DB, fmt.Sprintf("SELECT * FROM t_event WHERE idx > %d;", this.lastSyncEventIdx), func(err error, ds *f5.DataSet) { diff --git a/third_party/q5 b/third_party/q5 index 4f7255c7..06880e9f 160000 --- a/third_party/q5 +++ b/third_party/q5 @@ -1 +1 @@ -Subproject commit 4f7255c731cdcba363f4365b3f4ef387e796a08f +Subproject commit 06880e9f728728ed4ab1b35b055d230c0e823dbd