|
|
@@ -120,8 +120,9 @@ class StoreCart extends BaseModel
|
|
|
$is_award = (!$combination_id && !$seckill_id && !$bargain_id && StoreProduct::where('id', $product_id)->value('is_award')) ? 1 : 0;
|
|
|
$store_bag = (!$combination_id && !$seckill_id && !$bargain_id && StoreProduct::where('id', $product_id)->value('store_bag')) ? 1 : 0;
|
|
|
$is_bind = (!$combination_id && !$seckill_id && !$bargain_id && StoreProduct::where('id', $product_id)->value('is_bind')) ? 1 : 0;
|
|
|
+ $is_integral = (!$combination_id && !$seckill_id && !$bargain_id && StoreProduct::where('id', $product_id)->value('max_use_integral')) ? 1 : 0;
|
|
|
// var_dump(compact('uid', 'is_award', 'product_id', 'cart_num', 'product_attr_unique', 'is_new', 'type', 'combination_id', 'add_time', 'bargain_id', 'seckill_id', 'id', 'is_consumer', 'is_suit', 'store_id'));
|
|
|
- $rs = self::create(compact('store_bag', 'is_bind', 'uid', 'is_award', 'product_id', 'cart_num', 'product_attr_unique', 'is_new', 'type', 'combination_id', 'add_time', 'bargain_id', 'seckill_id', 'id', 'is_consumer', 'is_suit', 'store_id'));
|
|
|
+ $rs = self::create(compact('is_integral', 'store_bag', 'is_bind', 'uid', 'is_award', 'product_id', 'cart_num', 'product_attr_unique', 'is_new', 'type', 'combination_id', 'add_time', 'bargain_id', 'seckill_id', 'id', 'is_consumer', 'is_suit', 'store_id'));
|
|
|
// @file_put_contents("cart.txt", self::getlastsql(), 8);
|
|
|
return $rs;
|
|
|
}
|
|
|
@@ -204,8 +205,11 @@ class StoreCart extends BaseModel
|
|
|
case 3:
|
|
|
$model = $model->where('c.is_bind', 1);
|
|
|
break;
|
|
|
+ case 4:
|
|
|
+ $model = $model->where('c.is_integral', 1);
|
|
|
+ break;
|
|
|
default:
|
|
|
- $model = $model->where('c.is_suit', 0)->where('c.store_bag', 0)->where('c.is_bind', 0);
|
|
|
+ $model = $model->where('c.is_suit', 0)->where('c.store_bag', 0)->where('c.is_bind', 0)->where('c.is_integral', 0);
|
|
|
break;
|
|
|
}
|
|
|
$model = $model->order('c.add_time DESC');
|