订单生成提示

parent 73677bf6
......@@ -42,7 +42,7 @@ class OrderApiController extends Controller
]);
$result = OrderService::addOrder($data, $request->user->id);
return !$result ? $this->setError('Add cart failed , please contact administrator'):$this->setSuccess('Add inquiry success');
return !$result ? $this->setError('Add order failed , please contact administrator'):$this->setSuccess('Add order success');
}
//订单列表
......
......@@ -221,6 +221,7 @@ class CartService
$redis = Redis::connection();
$goodsInfoArr = ThirdService::getGoodsInfo(array_column($result,"goods_id"));
$cartList = [];
foreach ($result as $v) {
$goods_id = $v['goods_id'];
......@@ -259,7 +260,7 @@ class CartService
}
}
$temp["status"] = $temp["buy_number"] > 0 ? CartModel::status_yes:CartModel::status_no;
$temp["status"] = $temp["buy_number"] >0 && $skuInfo["is_buy"] ==1 ? CartModel::status_yes:CartModel::status_no;
$temp["buy_price"] = $buy_price;
$temp["update_time"] = time();
$flag = CartModel::where(["cart_id"=>$v["cart_id"]])->update($temp);
......@@ -267,7 +268,6 @@ class CartService
continue;
}
//格式化数据
$skuInfo = self::dullDataInfo($skuInfo);
$cartList[] = [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment