fix: filter private journal

pull/248/head
golangboy 2 years ago committed by 1379Monitor
parent 2d097e121d
commit 7bec1f6fde

@ -2,6 +2,7 @@ package model
import (
"context"
"github.com/go-sonic/sonic/consts"
"github.com/go-sonic/sonic/model/dto"
"github.com/go-sonic/sonic/model/param"
@ -29,14 +30,15 @@ type JournalModel struct {
func (p *JournalModel) Journals(ctx context.Context, model template.Model, page int) (string, error) {
pageSize := p.OptionService.GetOrByDefault(ctx, property.JournalPageSize).(int)
journals, total, err := p.JournalService.Page(ctx,
param.Page{
PageNum: page,
PageSize: pageSize,
},
&param.Sort{
journalType := consts.JournalTypePublic
journals, total, err := p.JournalService.ListJournal(ctx, param.JournalQuery{
Page: param.Page{PageNum: page, PageSize: pageSize},
Sort: &param.Sort{
Fields: []string{"createTime,desc"},
})
},
Keyword: nil,
JournalType: &journalType,
})
if err != nil {
return "", err
}

Loading…
Cancel
Save