|
@@ -42,7 +42,7 @@ class StoreCart extends BaseModel
|
|
|
return date("Y-m-d H:i:s");
|
|
|
}
|
|
|
|
|
|
- public static function setCart($uid, $product_id, $cart_num = 1, $product_attr_unique = '', $type = 'product', $is_new = 0, $combination_id = 0, $seckill_id = 0, $bargain_id = 0, $is_consumer = 0)
|
|
|
+ public static function setCart($uid, $product_id, $cart_num = 1, $product_attr_unique = '', $type = 'product', $is_new = 0, $combination_id = 0, $seckill_id = 0, $bargain_id = 0, $is_consumer = 0, $store_id = 0)
|
|
|
{
|
|
|
if ($cart_num < 0.001) $cart_num = 1;
|
|
|
if (!$product_attr_unique) {
|
|
@@ -175,7 +175,7 @@ class StoreCart extends BaseModel
|
|
|
return self::where('uid', $uid)->where('id', $cartId)->update(['cart_num' => $cartNum]);
|
|
|
}
|
|
|
|
|
|
- public static function getUserProductCartList($uid, $cartIds = '', $status = 0)
|
|
|
+ public static function getUserProductCartList($uid, $cartIds = '', $status = 0, $store_id = 0)
|
|
|
{
|
|
|
$productInfoField = 'id,image,price,ot_price,vip_price,postage,give_integral,sales,stock,store_name,unit_name,is_show,is_del,is_postage,cost,is_sub,temp_id,is_consumer,is_suit,max_use_integral,store_id,store_bag';
|
|
|
$seckillInfoField = 'id,image,price,ot_price,postage,give_integral,sales,stock,title as store_name,unit_name,is_show,is_del,is_postage,cost,temp_id,weight,volume,start_time,stop_time,time_id';
|
|
@@ -189,6 +189,7 @@ class StoreCart extends BaseModel
|
|
|
->where('c.is_del', 0);
|
|
|
if (!$status) $model = $model->where('c.is_new', 0);
|
|
|
if ($cartIds) $model = $model->where('c.id', 'IN', $cartIds);
|
|
|
+ if ($store_id) $model = $model->where('c.store_id', 'IN', $store_id);
|
|
|
$model = $model->order('c.add_time DESC');
|
|
|
$list = $model->select()->toArray();
|
|
|
if (!count($list)) return compact('valid', 'invalid');
|