This commit is contained in:
mkm 2024-03-01 15:06:04 +08:00
parent 37bd5326b6
commit 738cca59bc
26 changed files with 34 additions and 34 deletions

View File

@ -35,6 +35,7 @@ class ParameterValueRepository extends BaseRepository
public function create($id, $data,$merId) public function create($id, $data,$merId)
{ {
if (empty($data)) return ; if (empty($data)) return ;
$create=[];
foreach ($data as $datum) { foreach ($data as $datum) {
if ($datum['name'] && $datum['value']) { if ($datum['name'] && $datum['value']) {
$create[] = [ $create[] = [
@ -48,7 +49,7 @@ class ParameterValueRepository extends BaseRepository
]; ];
} }
} }
if ($create) $this->dao->insertAll($create); if (count($create)>0) $this->dao->insertAll($create);
} }

View File

@ -306,30 +306,30 @@ class StoreProduct extends BaseController
public function copy($product_id = 0, $mer_id = 0, $street_code = 0, $type_id = 0, $category_id = 0) public function copy($product_id = 0, $mer_id = 0, $street_code = 0, $type_id = 0, $category_id = 0)
{ {
if ($product_id == 0) return app('json')->fail('参数错误'); if ($product_id == 0) return app('json')->fail('参数错误');
$find= Db::name('merchant')->where('mer_id',$mer_id)->find(); // $find= Db::name('merchant')->where('mer_id',$mer_id)->find();
$products = $this->repository->getAdminOneProduct($product_id, 0); $products = $this->repository->getAdminOneProduct($product_id, 0);
$product = $products->toArray(); $product = $products->toArray();
$product['mer_id'] = $mer_id; $product['mer_id'] = $mer_id;
$product['old_product_id'] = $product['product_id']; $product['old_product_id'] = $product['product_id'];
$productId = $this->repository->create($product, 0, 1); $productId = $this->repository->create($product, 0, 1);
$data = [ // $data = [
'product_id' => $productId, // 'product_id' => $productId,
'mer_id' => $mer_id, // 'mer_id' => $mer_id,
'source_mer_id' => $products['mer_id'], // 'source_mer_id' => $products['mer_id'],
'street_code' => $street_code, // 'street_code' => $street_code,
'weight' => 1, // 'weight' => 1,
'status' => 1, // 'status' => 1,
'create_time' => date('Y-m-d H:i:s'), // 'create_time' => date('Y-m-d H:i:s'),
'type_id' => $type_id, // 'type_id' => $type_id,
'category_id' => $category_id, // 'category_id' => $category_id,
'cate_id' => 2244, // 'cate_id' => 2244,
'long' => $find['long'], // 'long' => $find['long'],
'lat' => $find['lat'], // 'lat' => $find['lat'],
'lat' => $find['lat'], // 'lat' => $find['lat'],
'store_name' => $products['store_name'], // 'store_name' => $products['store_name'],
'activity_id' =>2, // 'activity_id' =>2,
]; // ];
Db::name('cloud_product')->insert($data); // Db::name('cloud_product')->insert($data);
return $productId; return $productId;
} }
} }

View File

@ -2,4 +2,4 @@
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />') document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')
if(window.location.protocol == 'https:'){ if(window.location.protocol == 'https:'){
document.write('<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">') document.write('<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">')
}</script><link rel=stylesheet href=/static/index.2da1efab.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.c6349b23.js></script><script src=/static/js/index.c19c6f8b.js></script></body></html> }</script><link rel=stylesheet href=/static/index.2da1efab.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.c6349b23.js></script><script src=/static/js/index.0bfdbb83.js></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long