fix
This commit is contained in:
@@ -48,8 +48,8 @@ func (l *ItemsLogic) Items(in *order.OrderItemsRequest) (*order.Response, error)
|
||||
}
|
||||
|
||||
w.Like = make(map[string]string)
|
||||
w.Eq = make(map[string]string)
|
||||
w.Other = make(map[string]string)
|
||||
w.Eq = make(map[string]string)
|
||||
if in.ProductId > utils.NumberZero {
|
||||
w.Other["FIND_IN_SET(?, product_ids)"] = strconv.FormatInt(in.ProductId, utils.NumberTen)
|
||||
}
|
||||
@@ -86,8 +86,19 @@ func (l *ItemsLogic) Items(in *order.OrderItemsRequest) (*order.Response, error)
|
||||
l.Logger.Error(err)
|
||||
return l.fail(utils.ErrorNotFund)
|
||||
}
|
||||
|
||||
var ids []string
|
||||
for _, v := range info {
|
||||
l.Logger.Error("order_sn:", v.OrderSn)
|
||||
ids = append(ids, v.OrderSn)
|
||||
}
|
||||
l.Logger.Error("ids:", ids)
|
||||
l.Logger.Error(len(ids), utils.NumberOne)
|
||||
var productItems []dao.OrderProducts
|
||||
err = model.OrderProductModel{}.Init().Items(w, &productItems)
|
||||
ww := modelbase.Params{
|
||||
In: map[string][]string{"order_sn": ids},
|
||||
}
|
||||
err = model.OrderProductModel{}.Init().Items(ww, &productItems)
|
||||
if err != nil {
|
||||
utils.Logger.Error("product err:", err)
|
||||
return l.fail(utils.ErrorNotFund)
|
||||
|
||||
Reference in New Issue
Block a user