fix: 统一分页请求的 offset 语义

This commit is contained in:
zetaloop
2026-04-07 17:56:38 +08:00
parent 424b2b1cca
commit d153b5cf51
46 changed files with 334 additions and 346 deletions
@@ -37,8 +37,8 @@ func NewListOrdersLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListOr
func (l *ListOrdersLogic) ListOrders(req *types.OrderListReq) (resp *types.OrderListResp, err error) {
searchReq := &orderservice.SearchOrdersReq{
Page: req.Offset,
Limit: req.Limit,
Offset: req.Offset,
Limit: req.Limit,
}
if req.Status != "" {
searchReq.Status = &req.Status
@@ -84,7 +84,7 @@ func (l *ListOrdersLogic) ListOrders(req *types.OrderListReq) (resp *types.Order
searchReq.PlayerId = &player.Id
case "owner":
shops, shopErr := l.svcCtx.ShopRpc.SearchShops(l.ctx, &shopservice.SearchShopsReq{
Page: 0,
Offset: 0,
Limit: 100,
OwnerId: uid,
})
@@ -96,7 +96,7 @@ func (l *ListOrdersLogic) ListOrders(req *types.OrderListReq) (resp *types.Order
for _, shop := range shops.GetShops() {
shopID := shop.GetId()
q := &orderservice.SearchOrdersReq{
Page: req.Offset,
Offset: req.Offset,
Limit: req.Limit,
ShopId: &shopID,
}