1
This commit is contained in:
parent
619efdb644
commit
5c0474861b
@ -32,6 +32,8 @@ func (this *mailMgr) Init() {
|
|||||||
this.allMails = make(map[int64]*mail)
|
this.allMails = make(map[int64]*mail)
|
||||||
this.groupHash = make(map[int64]*userGroup)
|
this.groupHash = make(map[int64]*userGroup)
|
||||||
this.loadMails()
|
this.loadMails()
|
||||||
|
this.loadGroups()
|
||||||
|
this.loadGroupMembers()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *mailMgr) UnInit() {
|
func (this *mailMgr) UnInit() {
|
||||||
@ -56,6 +58,42 @@ func (this *mailMgr) loadMails() {
|
|||||||
len(this.idHash))
|
len(this.idHash))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *mailMgr) loadGroups() {
|
||||||
|
f5.GetSysLog().Info("mailMgr.loadGroups begin")
|
||||||
|
lastIdx := f5.GetJsStyleDb().SyncBatchLoadFullTable(
|
||||||
|
constant.MAIL_DB,
|
||||||
|
"SELECT * FROM t_group WHERE idx > %d AND deleted = 0",
|
||||||
|
func (ds *f5.DataSet) {
|
||||||
|
p := newMail()
|
||||||
|
p.loadFromDb(ds)
|
||||||
|
this.addMail(p)
|
||||||
|
},
|
||||||
|
func (err error) {
|
||||||
|
panic(fmt.Sprintf("mailMgr.loadGroups dberror:%s", err))
|
||||||
|
})
|
||||||
|
f5.GetSysLog().Info("mailMgr.loadGroups end lastIdx:%d mailNum:%d",
|
||||||
|
lastIdx,
|
||||||
|
len(this.idHash))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *mailMgr) loadGroupMembers() {
|
||||||
|
f5.GetSysLog().Info("mailMgr.loadGroupMembers begin")
|
||||||
|
lastIdx := f5.GetJsStyleDb().SyncBatchLoadFullTable(
|
||||||
|
constant.MAIL_DB,
|
||||||
|
"SELECT * FROM t_member WHERE idx > %d AND deleted = 0",
|
||||||
|
func (ds *f5.DataSet) {
|
||||||
|
p := newMail()
|
||||||
|
p.loadFromDb(ds)
|
||||||
|
this.addMail(p)
|
||||||
|
},
|
||||||
|
func (err error) {
|
||||||
|
panic(fmt.Sprintf("mailMgr.loadGroupMembers dberror:%s", err))
|
||||||
|
})
|
||||||
|
f5.GetSysLog().Info("mailMgr.loadGroupMembers end lastIdx:%d mailNum:%d",
|
||||||
|
lastIdx,
|
||||||
|
len(this.idHash))
|
||||||
|
}
|
||||||
|
|
||||||
func (this *mailMgr) caGetMailList(hum common.Player, c *gin.Context) {
|
func (this *mailMgr) caGetMailList(hum common.Player, c *gin.Context) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user