修复判断
This commit is contained in:
parent
fa10cad90f
commit
6a5acd0287
@ -2537,6 +2537,7 @@ class StoreOrderRepository extends BaseRepository
|
|||||||
}else{
|
}else{
|
||||||
$store_product_attr_value_where['sku']=$attr_implode;
|
$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();
|
$store_product_attr_value = Db::name('store_product_attr_value')->where($store_product_attr_value_where)->find();
|
||||||
if ($store_product_attr_value) {
|
if ($store_product_attr_value) {
|
||||||
$datas['product_id'] = $find['product_id'];
|
$datas['product_id'] = $find['product_id'];
|
||||||
@ -2546,10 +2547,7 @@ class StoreOrderRepository extends BaseRepository
|
|||||||
$this->create_product_import_log($datas,0);
|
$this->create_product_import_log($datas,0);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$is_update = false;
|
|
||||||
foreach ($attr as $kk => $vv) {
|
foreach ($attr as $kk => $vv) {
|
||||||
|
|
||||||
/**查询当前规格属性是否存在 */
|
/**查询当前规格属性是否存在 */
|
||||||
$attr_values_find = Db::name('store_product_attr')->where('product_id', $find['product_id'])->where('attr_name', $kk)
|
$attr_values_find = Db::name('store_product_attr')->where('product_id', $find['product_id'])->where('attr_name', $kk)
|
||||||
->find();
|
->find();
|
||||||
@ -2569,7 +2567,6 @@ class StoreOrderRepository extends BaseRepository
|
|||||||
'attr_name' => $kk, 'attr_values' => $vv,
|
'attr_name' => $kk, 'attr_values' => $vv,
|
||||||
];
|
];
|
||||||
Db::name('store_product_attr')->insert($datas);
|
Db::name('store_product_attr')->insert($datas);
|
||||||
$is_update = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($is_update == false) {
|
if ($is_update == false) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user