fix audit

This commit is contained in:
Tue 2022-10-18 17:18:11 +07:00
parent 5d864de6ce
commit c4db0d2d7c
1 changed files with 3 additions and 1 deletions

View File

@ -26,12 +26,14 @@ type AllQuery struct {
} }
// All ... // All ...
func (s Service) All(query AllQuery) (result []Audit, total int64) { func (s Service) All(query AllQuery) ([]Audit, int64) {
var ( var (
ctx = context.Background() ctx = context.Background()
colName = getColName(query.Target) colName = getColName(query.Target)
skip = query.Page * query.Limit skip = query.Page * query.Limit
wg sync.WaitGroup wg sync.WaitGroup
result = make([]Audit, 0)
total int64
) )
cond := s.getQueryCondition(query) cond := s.getQueryCondition(query)
wg.Add(1) wg.Add(1)