Compare commits
2 Commits
928cdd3064
...
a145e6c1e6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a145e6c1e6 | ||
|
|
647227f3b5 |
@ -22,6 +22,8 @@ func (annualReportsDao) List(req *reports.GetAnnualReportListReq) (data []model.
|
|||||||
dbQuery = dbQuery.Where("status = ?", req.Filtrate.Status)
|
dbQuery = dbQuery.Where("status = ?", req.Filtrate.Status)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 按更新时间倒序排列
|
||||||
|
dbQuery = dbQuery.Order("updated_at DESC")
|
||||||
//数据查询
|
//数据查询
|
||||||
dbQuery.Count(&total)
|
dbQuery.Count(&total)
|
||||||
err = dbQuery.Scopes(db.Pagination(req.Page, req.PageSize)).Find(&data).Error
|
err = dbQuery.Scopes(db.Pagination(req.Page, req.PageSize)).Find(&data).Error
|
||||||
|
|||||||
@ -22,6 +22,8 @@ func (quarterlyReportsDao) List(req *reports.GetQuarterlyReportListReq) (data []
|
|||||||
dbQuery = dbQuery.Where("status = ?", req.Filtrate.Status)
|
dbQuery = dbQuery.Where("status = ?", req.Filtrate.Status)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 按更新时间倒序排列
|
||||||
|
dbQuery = dbQuery.Order("updated_at DESC")
|
||||||
dbQuery.Count(&total)
|
dbQuery.Count(&total)
|
||||||
err = dbQuery.Scopes(db.Pagination(req.Page, req.PageSize)).Find(&data).Error
|
err = dbQuery.Scopes(db.Pagination(req.Page, req.PageSize)).Find(&data).Error
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user