diff --git a/service/repositories/order.go b/service/repositories/order.go index 39b98d04..d7f5916c 100644 --- a/service/repositories/order.go +++ b/service/repositories/order.go @@ -956,9 +956,11 @@ func (d *defaultOrder) List(ctx context.Context, in *ListReq) (res *ListRes, err } orderDetailList = append(orderDetailList, ress.OrderDetail) } - } else { + } + if len(orderList) == 0 { orderDetailList = make([]gmodel.OrderDetail, 0) } + return &ListRes{ OrderDetailList: orderDetailList, Meta: map[string]int64{