|
...
|
...
|
@@ -154,9 +154,7 @@ class ProductLogic extends BaseLogic |
|
|
|
public function setCopyProduct(){
|
|
|
|
$info = $this->model->read(['id'=>$this->param['id']]);
|
|
|
|
$param = $this->setProductParams($info);
|
|
|
|
$this->model->fill($param);
|
|
|
|
$newProduct = $this->model->save($param);
|
|
|
|
$save_id = $newProduct->id;
|
|
|
|
$save_id = $this->model->insertGetId($param);
|
|
|
|
//同步关联分类
|
|
|
|
CategoryRelated::saveRelated($save_id, $param['category_id']);
|
|
|
|
//同步关联关键词
|
|
...
|
...
|
@@ -227,23 +225,23 @@ class ProductLogic extends BaseLogic |
|
|
|
$param = [
|
|
|
|
'project_id'=>$info['project_id'],
|
|
|
|
'title'=>$info['title'],
|
|
|
|
'thumb'=>$info['thumb'],
|
|
|
|
'gallery'=>$info['gallery'],
|
|
|
|
'attrs'=>$info['attrs'],
|
|
|
|
'attr_id'=>$info['attr_id'],
|
|
|
|
'category_id'=>$info['category_id'],
|
|
|
|
'keyword_id'=>$info['keyword_id'],
|
|
|
|
'thumb'=>json_encode($info['thumb']),
|
|
|
|
'gallery'=>json_encode($info['gallery']),
|
|
|
|
'attrs'=>json_encode($info['attrs']),
|
|
|
|
'attr_id'=>json_encode($info['attr_id']),
|
|
|
|
'category_id'=>json_encode($info['category_id']),
|
|
|
|
'keyword_id'=>json_encode($info['keyword_id']),
|
|
|
|
'intro'=>$info['intro'],
|
|
|
|
'content'=>$info['content'],
|
|
|
|
'describe'=>$info['describe'],
|
|
|
|
'describe_id'=>$info['describe_id'],
|
|
|
|
'seo_mate'=>$info['seo_mate'],
|
|
|
|
'related_product_id'=>$info['related_product_id'],
|
|
|
|
'describe'=>json_encode(info['describe']),
|
|
|
|
'describe_id'=>json_encode($info['describe_id']),
|
|
|
|
'seo_mate'=>json_encode($info['seo_mate']),
|
|
|
|
'related_product_id'=>json_encode($info['related_product_id']),
|
|
|
|
'sort'=>$info['sort'],
|
|
|
|
'status'=>$info['status'],
|
|
|
|
'product_type'=>$info['product_type'],
|
|
|
|
'created_uid'=>$this->user['id'],
|
|
|
|
'icon'=>$info['icon'],
|
|
|
|
'icon'=>json_encode($info['icon']),
|
|
|
|
'created_at'=>date('Y-m-d H:i:s'),
|
|
|
|
'updated_at'=>date('Y-m-d H:i:s'),
|
|
|
|
];
|
...
|
...
|
|