This commit is contained in:
aozhiwei 2024-05-09 17:04:46 +08:00
parent 84be8df2b0
commit cd419da1f8
3 changed files with 10 additions and 3 deletions

View File

@ -37,6 +37,7 @@ type Player interface {
MarkMails([]Mail) error
GetAttachment([]Mail) error
DeleteMails([]Mail) error
IsReadable(Mail) bool
}
type PlayerMgr interface {

View File

@ -115,11 +115,13 @@ func (this *mailMgr) CaGetMailList(c *gin.Context) {
hum,
func (m *mail) bool {
if m.IsValid(hum) {
if hum.IsReadable(m) {
mailDto := new(common.MailDto)
if m.fillMailDto(mailDto) {
q5.AppendSlice(&rspObj.MailList, mailDto)
}
}
}
return true
})
c.JSON(200, rspObj)

View File

@ -140,6 +140,10 @@ func (this *player) getInbox(mailId int64) *inbox {
}
}
func (this* player) IsReadable(mail common.Mail) bool {
return true
}
func newPlayer() *player {
p := new(player)
p.init()