This commit is contained in:
aozhiwei 2024-05-09 13:24:58 +08:00
parent 08e7eddaa5
commit fe8e06e3a4
3 changed files with 14 additions and 7 deletions

View File

@ -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 {

View File

@ -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) {

2
third_party/q5 vendored

@ -1 +1 @@
Subproject commit 4f7255c731cdcba363f4365b3f4ef387e796a08f
Subproject commit 06880e9f728728ed4ab1b35b055d230c0e823dbd