1
This commit is contained in:
parent
5d40750280
commit
168b1c410e
@ -6,5 +6,6 @@ type inbox struct {
|
|||||||
|
|
||||||
var Inbox = new(inbox)
|
var Inbox = new(inbox)
|
||||||
|
|
||||||
func (this *inbox) Mark(accountId string, mailId int64) {
|
func (this *inbox) Mark(accountId string, mailId int64, nowTime int64) error {
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -46,11 +46,17 @@ func (this *player) GetAccountId() string {
|
|||||||
func (this *player) MarkMails(mails []common.Mail) error {
|
func (this *player) MarkMails(mails []common.Mail) error {
|
||||||
this.checkLock()
|
this.checkLock()
|
||||||
var resultErr error
|
var resultErr error
|
||||||
|
var nowTime int64
|
||||||
for _, m := range(mails) {
|
for _, m := range(mails) {
|
||||||
if m.IsValid(this) {
|
if m.IsValid(this) {
|
||||||
mi := this.getInbox(m.GetMailId())
|
mi := this.getInbox(m.GetMailId())
|
||||||
if mi == nil {
|
if mi == nil {
|
||||||
model.Inbox.Mark(this.GetAccountId(), m.GetMailId())
|
err := model.Inbox.Mark(this.GetAccountId(), m.GetMailId(), nowTime)
|
||||||
|
if err != nil {
|
||||||
|
resultErr = err
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if resultErr != nil {
|
if resultErr != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user