1
This commit is contained in:
parent
38dd0e3b36
commit
8e487c9898
@ -44,6 +44,10 @@ func (this *mail) isValid(hum common.Player) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (this *mail) fillMailDto(mailDto *common.MailDto) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func newMail() *mail {
|
||||
p := new(mail)
|
||||
p.init()
|
||||
|
@ -95,20 +95,33 @@ func (this *mailMgr) loadGroupMembers() {
|
||||
}
|
||||
|
||||
func (this *mailMgr) caGetMailList(hum common.Player, c *gin.Context) {
|
||||
this.traversePlayerMail(
|
||||
hum,
|
||||
func (m *mail) bool {
|
||||
return true
|
||||
})
|
||||
rspObj := struct {
|
||||
ErrCode int32 `json:"errcode"`
|
||||
ErrMsg string `json:"errmsg"`
|
||||
MailList []common.MailDto `json:"maillis"`
|
||||
MailList []*common.MailDto `json:"maillis"`
|
||||
}{}
|
||||
this.traversePlayerMail(
|
||||
hum,
|
||||
func (m *mail) bool {
|
||||
if m.isValid(hum) {
|
||||
mailDto := new(common.MailDto)
|
||||
if m.fillMailDto(mailDto) {
|
||||
q5.AppendSlice(&rspObj.MailList, mailDto)
|
||||
}
|
||||
}
|
||||
return true
|
||||
})
|
||||
c.JSON(200, rspObj)
|
||||
}
|
||||
|
||||
func (this *mailMgr) caMarkMail(hum common.Player, c *gin.Context) {
|
||||
mailIds := q5.StrSplit(c.DefaultQuery("mail_ids", ""), ",")
|
||||
for _, str := range(mailIds) {
|
||||
m := this.getMail(str)
|
||||
if m != nil {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (this *mailMgr) caGetUnreadMailCnt(hum common.Player, c *gin.Context) {
|
||||
@ -176,3 +189,11 @@ func (this *mailMgr) getGroup(groupId int64) *userGroup {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func (this *mailMgr) getMail(mailId string) *mail {
|
||||
if p, ok := this.idHash.Load(mailId); ok {
|
||||
return p.(*mail)
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user