修复运行边界条件问题

This commit is contained in:
2026-04-22 17:11:55 +08:00
parent 6e14ea65d0
commit d26106eb00
3 changed files with 11 additions and 2 deletions

View File

@@ -84,6 +84,7 @@ func PageResourceShort(c *fiber.Ctx) error {
total = int64(len(resource) + req.GetOffset())
} else {
total, err = q.Resource.
Joins(q.Resource.Short).
Where(do).
Count()
if err != nil {
@@ -180,6 +181,7 @@ func PageResourceLong(c *fiber.Ctx) error {
total = int64(len(resource) + req.GetOffset())
} else {
total, err = q.Resource.
Joins(q.Resource.Long).
Where(do).
Count()
if err != nil {