|
@@ -790,11 +790,14 @@ class OrderService implements OrderServiceInterface
|
|
|
*/
|
|
|
public function getShoppingCartAD(array $data): array
|
|
|
{
|
|
|
- $result = ShoppingCart::where('shopping_id', $data['shopping_id'])
|
|
|
+ $shopcart = ShoppingCart::where('shopping_id', $data['shopping_id'])
|
|
|
->where('user_id',$data['user_id'])
|
|
|
->orderBy('pid')
|
|
|
- ->get()
|
|
|
+ ->pluck('pid')
|
|
|
->toArray();
|
|
|
+
|
|
|
+ $result['pid'] = $shopcart;
|
|
|
+
|
|
|
if (empty($result)) {
|
|
|
return Result::error("购物车id错误");
|
|
|
}else{
|