|
@@ -157,7 +157,7 @@ class StoreCart extends BaseModel
|
|
|
|
|
|
public static function getUserProductCartList($uid, $cartIds = '', $status = 0)
|
|
public static function getUserProductCartList($uid, $cartIds = '', $status = 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,store_type';
|
|
|
|
|
|
+ $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,store_type,is_best';
|
|
$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';
|
|
$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';
|
|
$bargainInfoField = 'id,image,min_price as price,price as ot_price,postage,give_integral,sales,stock,title as store_name,unit_name,status as is_show,is_del,is_postage,cost,temp_id,weight,volume';
|
|
$bargainInfoField = 'id,image,min_price as price,price as ot_price,postage,give_integral,sales,stock,title as store_name,unit_name,status as is_show,is_del,is_postage,cost,temp_id,weight,volume';
|
|
$combinationInfoField = 'id,image,price,postage,sales,stock,title as store_name,is_show,is_del,is_postage,cost,temp_id,weight,volume';
|
|
$combinationInfoField = 'id,image,price,postage,sales,stock,title as store_name,is_show,is_del,is_postage,cost,temp_id,weight,volume';
|
|
@@ -171,6 +171,7 @@ class StoreCart extends BaseModel
|
|
$list = $model->select()->toArray();
|
|
$list = $model->select()->toArray();
|
|
if (!count($list)) return compact('valid', 'invalid');
|
|
if (!count($list)) return compact('valid', 'invalid');
|
|
$now = time();
|
|
$now = time();
|
|
|
|
+ $store_order = 0;
|
|
foreach ($list as $k => $cart) {
|
|
foreach ($list as $k => $cart) {
|
|
if ($cart['seckill_id']) {
|
|
if ($cart['seckill_id']) {
|
|
$product = StoreSeckill::field($seckillInfoField)
|
|
$product = StoreSeckill::field($seckillInfoField)
|
|
@@ -270,6 +271,10 @@ class StoreCart extends BaseModel
|
|
$cart['cart_num'] = $cart['trueStock'];
|
|
$cart['cart_num'] = $cart['trueStock'];
|
|
$model->where('id', $cart['id'])->update(['cart_num' => $cart['cart_num']]);
|
|
$model->where('id', $cart['id'])->update(['cart_num' => $cart['cart_num']]);
|
|
$valid[$k] = $cart;
|
|
$valid[$k] = $cart;
|
|
|
|
+ if (($valid[$k]['productInfo']['is_best'] ?? 0) > 0) {
|
|
|
|
+ $store_order = 1;
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
unset($valid[$k]['uid'], $valid[$k]['is_del'], $valid[$k]['is_new'], $valid[$k]['is_pay'], $valid[$k]['add_time']);
|
|
unset($valid[$k]['uid'], $valid[$k]['is_del'], $valid[$k]['is_new'], $valid[$k]['is_pay'], $valid[$k]['add_time']);
|
|
@@ -284,7 +289,7 @@ class StoreCart extends BaseModel
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- return compact('valid', 'invalid');
|
|
|
|
|
|
+ return compact('valid', 'invalid', 'store_order');
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|