This commit is contained in:
aozhiwei 2024-04-13 17:49:37 +08:00
parent d8f5577ac2
commit bb7718dae7
2 changed files with 12 additions and 0 deletions

View File

@ -1,6 +1,7 @@
package mail
import (
"f5"
//"main/common"
//"main/constant"
//"q5"
@ -30,6 +31,10 @@ func (this *mail) init() {
}
func (this *mail) loadFromDb(ds *f5.DataSet) {
}
func newMail() *mail {
p := new(mail)
p.init()

View File

@ -42,6 +42,9 @@ func (this *mailMgr) loadMails() {
constant.MAIL_DB,
"SELECT * FROM t_mail WHERE idx > %d AND deleted = 0 AND expiretime > " + q5.ToString(nowTime),
func (ds *f5.DataSet) {
p := newMail()
p.loadFromDb(ds)
this.addMail(p)
},
func (err error) {
panic(fmt.Sprintf("mailMgr.loadMails dberror:%s", err))
@ -74,3 +77,7 @@ func (this *mailMgr) caDeleteMails(hum common.Player, c *gin.Context) {
func (this *mailMgr) traversePlayerMail(hum common.Player, cb func(*mail) bool) {
}
func (this *mailMgr) addMail(m *mail) {
this.idHash[m.mailId] = m
}