1
This commit is contained in:
parent
84be8df2b0
commit
cd419da1f8
@ -37,6 +37,7 @@ type Player interface {
|
|||||||
MarkMails([]Mail) error
|
MarkMails([]Mail) error
|
||||||
GetAttachment([]Mail) error
|
GetAttachment([]Mail) error
|
||||||
DeleteMails([]Mail) error
|
DeleteMails([]Mail) error
|
||||||
|
IsReadable(Mail) bool
|
||||||
}
|
}
|
||||||
|
|
||||||
type PlayerMgr interface {
|
type PlayerMgr interface {
|
||||||
|
@ -115,11 +115,13 @@ func (this *mailMgr) CaGetMailList(c *gin.Context) {
|
|||||||
hum,
|
hum,
|
||||||
func (m *mail) bool {
|
func (m *mail) bool {
|
||||||
if m.IsValid(hum) {
|
if m.IsValid(hum) {
|
||||||
|
if hum.IsReadable(m) {
|
||||||
mailDto := new(common.MailDto)
|
mailDto := new(common.MailDto)
|
||||||
if m.fillMailDto(mailDto) {
|
if m.fillMailDto(mailDto) {
|
||||||
q5.AppendSlice(&rspObj.MailList, mailDto)
|
q5.AppendSlice(&rspObj.MailList, mailDto)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return true
|
return true
|
||||||
})
|
})
|
||||||
c.JSON(200, rspObj)
|
c.JSON(200, rspObj)
|
||||||
|
@ -140,6 +140,10 @@ func (this *player) getInbox(mailId int64) *inbox {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this* player) IsReadable(mail common.Mail) bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
func newPlayer() *player {
|
func newPlayer() *player {
|
||||||
p := new(player)
|
p := new(player)
|
||||||
p.init()
|
p.init()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user