diff --git a/app/common/repositories/community/CommunityRepository.php b/app/common/repositories/community/CommunityRepository.php index 18ea9a83..d689d70d 100644 --- a/app/common/repositories/community/CommunityRepository.php +++ b/app/common/repositories/community/CommunityRepository.php @@ -639,6 +639,9 @@ class CommunityRepository extends BaseRepository if ($value) { $attrValue = ProductAttrValue::where('unique', $value['product_attr_unique'])->find(); if($attrValue){ + if($attrValue['mer_id']<=0){ + throw new ValidateException('商户id不能为0'); + } $insert[] = [ 'community_id' => $id, 'purchase_record_id' => 0,