添加判断

This commit is contained in:
mkm 2023-10-31 10:25:23 +08:00
parent 4a4065c691
commit 47e55b225e

View File

@ -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,