后台邮件优化
This commit is contained in:
parent
b9bd656130
commit
4e8da1047f
@ -25,20 +25,22 @@ type MailData struct {
|
||||
}
|
||||
|
||||
type ServerMail struct {
|
||||
Id int
|
||||
Title string
|
||||
Content string
|
||||
TitleEn string
|
||||
ContentEn string
|
||||
TitlePtBr string
|
||||
ContentPtBr string
|
||||
Items []*item.Item
|
||||
Start_time int64
|
||||
Register_time int64
|
||||
End_time int64
|
||||
Send_type int
|
||||
Mail_type int
|
||||
To_uids []int
|
||||
Id int
|
||||
Title string
|
||||
Content string
|
||||
TitleEn string
|
||||
ContentEn string
|
||||
TitlePtBr string
|
||||
ContentPtBr string
|
||||
TitleEsLatam string
|
||||
ContentEsLatam string
|
||||
Items []*item.Item
|
||||
Start_time int64
|
||||
Register_time int64
|
||||
End_time int64
|
||||
Send_type int
|
||||
Mail_type int
|
||||
To_uids []int
|
||||
}
|
||||
|
||||
func (m *MailMgr) Init() {
|
||||
@ -77,20 +79,22 @@ func (r *MailMgr) LoadMail(msg *msg.Msg) (interface{}, error) {
|
||||
var items []interface{}
|
||||
json.Unmarshal([]byte(v.Items), &items)
|
||||
r.list[v.Id] = &ServerMail{
|
||||
Id: v.Id,
|
||||
Title: v.Title,
|
||||
Content: v.Content,
|
||||
TitleEn: v.TitleEn,
|
||||
ContentEn: v.ContentEn,
|
||||
TitlePtBr: v.TitlePtBr,
|
||||
ContentPtBr: v.ContentPtBr,
|
||||
Items: item.ParseItem(items),
|
||||
Start_time: v.Start_time,
|
||||
Register_time: v.Register_time,
|
||||
End_time: v.End_time,
|
||||
Mail_type: v.Mail_type,
|
||||
Send_type: v.Send_type,
|
||||
To_uids: Uids,
|
||||
Id: v.Id,
|
||||
Title: v.Title,
|
||||
Content: v.Content,
|
||||
TitleEn: v.TitleEn,
|
||||
ContentEn: v.ContentEn,
|
||||
TitlePtBr: v.TitlePtBr,
|
||||
ContentPtBr: v.ContentPtBr,
|
||||
TitleEsLatam: v.TitleEsLatam,
|
||||
ContentEsLatam: v.ContentEsLatam,
|
||||
Items: item.ParseItem(items),
|
||||
Start_time: v.Start_time,
|
||||
Register_time: v.Register_time,
|
||||
End_time: v.End_time,
|
||||
Mail_type: v.Mail_type,
|
||||
Send_type: v.Send_type,
|
||||
To_uids: Uids,
|
||||
}
|
||||
}
|
||||
return nil, nil
|
||||
|
||||
@ -540,14 +540,16 @@ func SyncMailMsg(p *Player) {
|
||||
}
|
||||
MailMod.ServerMail = append(MailMod.ServerMail, v.Id)
|
||||
MailMod.SendMail(&mail.MailStruct{
|
||||
Title: v.Title,
|
||||
Content: v.Content,
|
||||
TitleEn: v.TitleEn,
|
||||
ContentEn: v.ContentEn,
|
||||
Items: v.Items,
|
||||
Type: v.Mail_type,
|
||||
TitlePtBr: v.TitlePtBr,
|
||||
ContentPtBr: v.ContentPtBr,
|
||||
Title: v.Title,
|
||||
Content: v.Content,
|
||||
TitleEn: v.TitleEn,
|
||||
ContentEn: v.ContentEn,
|
||||
TitlePtBr: v.TitlePtBr,
|
||||
ContentPtBr: v.ContentPtBr,
|
||||
TitleEsLatam: v.TitleEsLatam,
|
||||
ContentEsLatam: v.ContentEsLatam,
|
||||
Items: v.Items,
|
||||
Type: v.Mail_type,
|
||||
})
|
||||
}
|
||||
p.PushClientRes(MailMod.BackData())
|
||||
|
||||
Loading…
Reference in New Issue
Block a user