diff --git a/app/store/lists/cart/CartList.php b/app/store/lists/cart/CartList.php index 3d872d49f..fdbd21fab 100644 --- a/app/store/lists/cart/CartList.php +++ b/app/store/lists/cart/CartList.php @@ -62,15 +62,16 @@ class CartList extends BaseAdminDataLists implements ListsSearchInterface, Lists if ($this->request->get('uid')) { $uid = $this->request->get('uid'); } + $user_ship=0; if ($uid > 0) { $user_ship = User::where('id', $uid)->value('user_ship'); - if (in_array($user_ship, [4, 5, 6, 7])) { + if (in_array($user_ship, [4, 6, 7])) { $off_activity = 1; } } foreach ($list as $key => &$item) { $find = StoreBranchProduct::where(['product_id' => $item['product_id'], 'store_id' => $item['store_id']]) - ->field('product_id,image,price,cost,store_name,unit,delete_time,vip_price') + ->field('product_id,image,price,cost,store_name,unit,delete_time,vip_price,top_cate_id') ->withTrashed() ->find(); if ($find) { @@ -79,6 +80,9 @@ class CartList extends BaseAdminDataLists implements ListsSearchInterface, Lists $item['price'] = $find['cost']; } else { $item['price'] = $find['price']; + if ($find['top_cate_id'] == 15189 && $user_ship == 5) { + $item['price'] = $find['cost']; + } } $item['pay_price'] = bcmul($item['cart_num'], $item['price'], 2); $item['total_price'] = bcmul($item['cart_num'], $find['price'], 2);