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