修复错误
This commit is contained in:
parent
ae2f9a1c26
commit
4a249f1719
@ -2541,11 +2541,12 @@ class StoreOrderRepository extends BaseRepository
|
|||||||
if ($find) {
|
if ($find) {
|
||||||
$store_product_attr_value = Db::name('store_product_attr_value')->where('product_id', $find['product_id'])->where('bar_code', $datum['value']['bar_code'])->find();
|
$store_product_attr_value = Db::name('store_product_attr_value')->where('product_id', $find['product_id'])->where('bar_code', $datum['value']['bar_code'])->find();
|
||||||
if ($store_product_attr_value) {
|
if ($store_product_attr_value) {
|
||||||
$data['product_id'] = $find['product_id'];
|
|
||||||
$data['mer_id'] = $merId;
|
$datas['product_id'] = $find['product_id'];
|
||||||
$data['store_name'] = $$datum['value']['store_name'];
|
$datas['mer_id'] = $merId;
|
||||||
$data['content'] = 'xls导入商品:已经导入过该规格了';
|
$datas['store_name'] = $datum['value']['store_name'];
|
||||||
$this->create_product_import_log($data,0);
|
$datas['content'] = 'xls导入商品:已经导入过该规格了';
|
||||||
|
$this->create_product_import_log($datas,0);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$is_update = false;
|
$is_update = false;
|
||||||
@ -2708,27 +2709,27 @@ class StoreOrderRepository extends BaseRepository
|
|||||||
$make = app()->make(ProductRepository::class);
|
$make = app()->make(ProductRepository::class);
|
||||||
$product_id = $make->create($datas, $product_type);
|
$product_id = $make->create($datas, $product_type);
|
||||||
if ($product_id) {
|
if ($product_id) {
|
||||||
$data['product_id'] = $product_id;
|
$datas['product_id'] = $product_id;
|
||||||
$data['mer_id'] = $merId;
|
$datas['mer_id'] = $merId;
|
||||||
$data['store_name'] = $datum['value']['store_name'];
|
$datas['store_name'] = $datum['value']['store_name'];
|
||||||
$this->create_product_import_log($data);
|
$this->create_product_import_log($datas);
|
||||||
}
|
}
|
||||||
// Queue::push(ProductImportJob::class, $data_list);
|
// Queue::push(ProductImportJob::class, $data_list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$data['product_id'] = $product_id;
|
$datas['product_id'] = $product_id;
|
||||||
$data['mer_id'] = $merId;
|
$datas['mer_id'] = $merId;
|
||||||
$data['store_name'] = $$datum['value']['store_name'];
|
$datas['store_name'] = $datum['value']['store_name'];
|
||||||
$data['content'] = $datum['value']['store_name'];
|
$datas['content'] = $datum['value']['store_name'];
|
||||||
$this->create_product_import_log($data, 0);
|
$this->create_product_import_log($datas, 0);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
public function create_product_import_log($data, $status = 1)
|
public function create_product_import_log($data, $status = 1)
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'product_id' => $data['product_id'],
|
'product_id' => $data['product_id']??0,
|
||||||
'mer_id' => $data['mer_id'],
|
'mer_id' => $data['mer_id'],
|
||||||
'name' => $data['store_name'],
|
'name' => $data['store_name'],
|
||||||
'content' => $data['content'] ?? '',
|
'content' => $data['content'] ?? '',
|
||||||
|
@ -129,6 +129,7 @@ class ProductLibrary extends BaseController
|
|||||||
$data['create_time'] = date('Y-m-d H:i:s');
|
$data['create_time'] = date('Y-m-d H:i:s');
|
||||||
$data['images'] = '';
|
$data['images'] = '';
|
||||||
$arr=[];
|
$arr=[];
|
||||||
|
|
||||||
if ($param['img'] != '') {
|
if ($param['img'] != '') {
|
||||||
$oss = $upload->to($dir)->stream(file_get_contents($param['img']));
|
$oss = $upload->to($dir)->stream(file_get_contents($param['img']));
|
||||||
$data['image'] = $oss->filePath;
|
$data['image'] = $oss->filePath;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user