修复判断

This commit is contained in:
mkm 2023-11-30 14:01:33 +08:00
parent fa10cad90f
commit 6a5acd0287

View File

@ -2537,6 +2537,7 @@ class StoreOrderRepository extends BaseRepository
}else{
$store_product_attr_value_where['sku']=$attr_implode;
}
$is_update = false;
$store_product_attr_value = Db::name('store_product_attr_value')->where($store_product_attr_value_where)->find();
if ($store_product_attr_value) {
$datas['product_id'] = $find['product_id'];
@ -2546,10 +2547,7 @@ class StoreOrderRepository extends BaseRepository
$this->create_product_import_log($datas,0);
continue;
}
$is_update = false;
foreach ($attr as $kk => $vv) {
/**查询当前规格属性是否存在 */
$attr_values_find = Db::name('store_product_attr')->where('product_id', $find['product_id'])->where('attr_name', $kk)
->find();
@ -2569,7 +2567,6 @@ class StoreOrderRepository extends BaseRepository
'attr_name' => $kk, 'attr_values' => $vv,
];
Db::name('store_product_attr')->insert($datas);
$is_update = true;
}
}
if ($is_update == false) {