From 11ef2223d3cee0cc05e9f1141d8b362c39afae3a Mon Sep 17 00:00:00 2001 From: momo <1012651275@qq.com> Date: Tue, 10 Oct 2023 11:29:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E8=AE=A2=E5=8D=95=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/repositories/order.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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{