添加判断
This commit is contained in:
parent
47e55b225e
commit
0636147f98
@ -699,6 +699,9 @@ class CommunityRepository extends BaseRepository
|
||||
if ($value) {
|
||||
$attrValue = ProductAttrValue::where('unique', $value['product_attr_unique'])->find();
|
||||
if($attrValue){
|
||||
if($attrValue['mer_id']){
|
||||
throw new ValidateException('商户id不能为0');
|
||||
}
|
||||
$insert[] = [
|
||||
'community_id' => $id,
|
||||
'purchase_record_id' => 0,//$purchaseRecord['id'],
|
||||
@ -752,6 +755,9 @@ class CommunityRepository extends BaseRepository
|
||||
$cartRepo = app()->make(StoreCartRepository::class);
|
||||
$cartIds = [];
|
||||
foreach ($community['resale'] as $item) {
|
||||
if($item['mer_id']){
|
||||
throw new ValidateException('商户id不能为0');
|
||||
}
|
||||
$data = [
|
||||
'uid' => $uid,
|
||||
'mer_id' => $item['mer_id'],
|
||||
@ -801,6 +807,9 @@ class CommunityRepository extends BaseRepository
|
||||
$cartRepo = app()->make(StoreCartRepository::class);
|
||||
$cartIds = [];
|
||||
foreach ($community['entrust'] as $item) {
|
||||
if($item['mer_id']){
|
||||
throw new ValidateException('商户id不能为0');
|
||||
}
|
||||
$data = [
|
||||
'uid' => $uid,
|
||||
'mer_id' => $item['mer_id'],
|
||||
|
Loading…
x
Reference in New Issue
Block a user