|
|
@ -81,16 +81,16 @@ func (t *GoodCtl) ListOrder() { |
|
|
|
orders, err := models.GetCustomerOrdersByActivityId(uid, activity.Id, activity.RehearsalId, |
|
|
|
areaId, statusList, t.Page, t.PageSize) |
|
|
|
t.CheckErr(err) |
|
|
|
outTradeNos := make([]string, 0) |
|
|
|
orderNos := make([]string, 0) |
|
|
|
for _, order := range orders { |
|
|
|
outTradeNos = append(outTradeNos, order.OutTradeNo) |
|
|
|
orderNos = append(orderNos, order.OrderNo) |
|
|
|
} |
|
|
|
subs, err := models.GetCustomerOrderSubByOutTradeNos(outTradeNos...) |
|
|
|
subs, err := models.GetCustomerOrderSubByOrderNos(orderNos...) |
|
|
|
t.CheckErr(err) |
|
|
|
for index, order := range orders { |
|
|
|
order.ServicePhone = option.MainServicePhone |
|
|
|
for _, sub := range subs { |
|
|
|
if order.OutTradeNo == sub["out_trade_no"] { |
|
|
|
if order.OrderNo == sub["order_no"] { |
|
|
|
orders[index].SubOrders = append(orders[index].SubOrders, sub) |
|
|
|
} |
|
|
|
} |
|
|
|