Update Offset
This commit is contained in:
parent
25c0344175
commit
451366daa5
@ -187,10 +187,8 @@ func (b *OrderRepository) GetAllHystoryOrders(ctx context.Context, req entity.Or
|
|||||||
return nil, 0, err
|
return nil, 0, err
|
||||||
}
|
}
|
||||||
|
|
||||||
page := (req.Offset - 1) * req.Limit
|
|
||||||
|
|
||||||
if req.Offset > 0 {
|
if req.Offset > 0 {
|
||||||
query = query.Offset(page)
|
query = query.Offset(req.Offset)
|
||||||
}
|
}
|
||||||
|
|
||||||
if req.Limit > 0 {
|
if req.Limit > 0 {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user