This commit is contained in:
aozhiwei 2024-04-17 08:32:03 +08:00
parent adcaf960c0
commit 9ccd6ecc38

View File

@ -132,7 +132,21 @@ func (this *mailMgr) caMarkMail(hum common.Player, c *gin.Context) {
}
func (this *mailMgr) caGetUnreadMailCnt(hum common.Player, c *gin.Context) {
rspObj := struct {
ErrCode int32 `json:"errcode"`
ErrMsg string `json:"errmsg"`
UnreadMailCnt int32 `json:"unread_mail_cnt"`
}{}
this.traversePlayerMail(
hum,
func (m *mail) bool {
if m.isValid(hum) {
rspObj.UnreadMailCnt++
return false
}
return true
})
c.JSON(200, rspObj)
}
func (this *mailMgr) caGetAttachment(hum common.Player, c *gin.Context) {