diff --git a/app/common/dao/store/StoreActivityDao.php b/app/common/dao/store/StoreActivityDao.php index b8289bc4..21bacf82 100644 --- a/app/common/dao/store/StoreActivityDao.php +++ b/app/common/dao/store/StoreActivityDao.php @@ -119,7 +119,7 @@ class StoreActivityDao extends BaseDao public function canBuy($userId, $productId) { $activityId = Db::name('cloud_product')->where('product_id', $productId)->value('activity_id'); - $find = Db::name('store_activity_order_product')->where('user_id', $userId)->where('product_id',$productId)->where('status', 1)->find(); + $find = Db::name('store_activity_order_product')->where('user_id', $userId)->where('status', 1)->find(); $data=['activityId'=>$activityId,'is_true'=>true]; if ($find && $activityId == 2) { $data['is_true']=false; diff --git a/app/common/repositories/store/order/StoreOrderCreateRepository.php b/app/common/repositories/store/order/StoreOrderCreateRepository.php index 0551cade..73f704a2 100644 --- a/app/common/repositories/store/order/StoreOrderCreateRepository.php +++ b/app/common/repositories/store/order/StoreOrderCreateRepository.php @@ -105,12 +105,12 @@ class StoreOrderCreateRepository extends StoreOrderRepository if($source==103){ $canBuy = (new StoreActivityDao())->canBuy($cart['uid'], $cart['product_id']); if ($canBuy['is_true']==false) { - throw new ValidateException('活动商品限购13个'); + throw new ValidateException('活动商品限购1个'); } if ($canBuy['activityId']== 2) { $activityProductCount += $cart['cart_num']; if ($activityProductCount > 1){ - throw new ValidateException('活动商品限购12个'); + throw new ValidateException('活动商品限购1个'); } } }