This commit is contained in:
aozhiwei 2024-04-13 17:29:31 +08:00
parent 58c8b73ca3
commit bc986a954f
3 changed files with 6 additions and 10 deletions

View File

@ -1,9 +1,5 @@
package constant package constant
const (
MAX_PACKET_LEN = 1024 * 64
)
const ( const (
MAIL_DB = "maildb" MAIL_DB = "maildb"
) )
@ -16,8 +12,8 @@ const (
MAX_MODULE_IDX MAX_MODULE_IDX
) )
// mail
const ( const (
MAIL_TYPE_PLAYER = 1 MAIL_TYPE_PERSONAL = 1
MAIL_TYPE_GROUP = 2 MAIL_TYPE_GROUP = 2
MAIL_TYPE_ALL = 3
) )

View File

@ -19,6 +19,8 @@ type mail struct {
content string content string
sendTime int32 sendTime int32
expireTime int32 expireTime int32
userRegStart int32
userRegEnd int32
attachments []*attachment attachments []*attachment
userGroups map[int64]*userGroup userGroups map[int64]*userGroup
reciver string reciver string

View File

@ -18,21 +18,19 @@ type userGroup struct {
type mailMgr struct { type mailMgr struct {
idHash map[int64]*mail idHash map[int64]*mail
allMails map[int64]*mail
userMailArr [1024]*userMail userMailArr [1024]*userMail
groupHash map[int64]*userGroup groupHash map[int64]*userGroup
} }
func (this *mailMgr) Init() { func (this *mailMgr) Init() {
this.idHash = make(map[int64]*mail) this.idHash = make(map[int64]*mail)
this.fetchmailFromDB() this.loadFromDB()
} }
func (this *mailMgr) UnInit() { func (this *mailMgr) UnInit() {
} }
func (this *mailMgr) fetchmailFromDB() {
}
func (this *mailMgr) loadFromDB() { func (this *mailMgr) loadFromDB() {
} }