优化
This commit is contained in:
parent
477d8fe6f9
commit
5ae0ad646e
|
@ -50,7 +50,10 @@ func pagination[T Model](db dbQuery, ctx context.Context, q QueryCondition) (r [
|
|||
}
|
||||
q.Offset = offset
|
||||
m := ctx.Value("handle=>")
|
||||
if m != nil {
|
||||
if m == nil {
|
||||
r, err = finds[T](db, ctx, q)
|
||||
return
|
||||
}
|
||||
mm, ok := m.(string)
|
||||
if ok && mm == "toMap" {
|
||||
v := ctx.Value("map")
|
||||
|
@ -63,8 +66,6 @@ func pagination[T Model](db dbQuery, ctx context.Context, q QueryCondition) (r [
|
|||
*vv = mx
|
||||
return
|
||||
}
|
||||
}
|
||||
r, err = finds[T](db, ctx, q)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user