实现基本管理员数据访问接口

This commit is contained in:
2025-12-30 19:24:03 +08:00
parent 1262a8dae4
commit f638baec64
8 changed files with 311 additions and 102 deletions

View File

@@ -55,3 +55,25 @@ type PageResourceBatchReq struct {
TimeStart *time.Time `json:"time_start"`
TimeEnd *time.Time `json:"time_end"`
}
// PageBatchByAdmin 分页查询所有提取记录
func PageBatchByAdmin(c *fiber.Ctx) error {
_, err := auth.GetAuthCtx(c).PermitAdmin()
if err != nil {
return err
}
req := new(struct{ core.PageReq })
if err = g.Validator.ParseBody(c, req); err != nil {
return err
}
list, total, err := q.LogsUserUsage.FindByPage(req.GetOffset(), req.GetLimit())
return c.JSON(core.PageResp{
List: list,
Total: int(total),
Page: req.GetPage(),
Size: req.GetSize(),
})
}