This commit is contained in:
xing 2023-02-26 22:03:30 +08:00
parent 477d8fe6f9
commit 5ae0ad646e

View File

@ -50,7 +50,10 @@ func pagination[T Model](db dbQuery, ctx context.Context, q QueryCondition) (r [
} }
q.Offset = offset q.Offset = offset
m := ctx.Value("handle=>") m := ctx.Value("handle=>")
if m != nil { if m == nil {
r, err = finds[T](db, ctx, q)
return
}
mm, ok := m.(string) mm, ok := m.(string)
if ok && mm == "toMap" { if ok && mm == "toMap" {
v := ctx.Value("map") v := ctx.Value("map")
@ -63,8 +66,6 @@ func pagination[T Model](db dbQuery, ctx context.Context, q QueryCondition) (r [
*vv = mx *vv = mx
return return
} }
}
r, err = finds[T](db, ctx, q)
return return
} }