This commit is contained in:
oneao committed 2026-06-25 16:47:54 +08:00
1 parent 513a991b57
commit 8f8e8d03c8
22 files changed
+2212 -213

No files matched your search

@@ -50,6 +50,31 @@ func LoadDataBySql(c fiber.Ctx) error {
return httpx.OK(c, data)
}
func LoadDataPage(c fiber.Ctx) error {
var req types.LoadDataPageReq
err := httpx.BindAndValidate(c, &req)
if err != nil {
return errors.WithStack(err)
}
dbClient := db.New()
rows, total, err := dbClient.LoadDataPage(c.Context(), req.ViewName, req.SearchCondition, req.OrderBy, req.SearchColumns, req.Args, req.Page, req.PageSize)
if err != nil {
return errors.WithStack(err)
}
return httpx.OK(c, types.LoadDataPageRes{
Rows: rows,
Total: total,
Page: req.Page,
PageSize: req.PageSize,
})
}
func GetUniqueId(c fiber.Ctx) error {
var req types.GetUniqueIdReq