|
...
|
...
|
@@ -80,17 +80,15 @@ class KeywordLogic extends BaseLogic |
|
|
|
*/
|
|
|
|
public function batchAdd(){
|
|
|
|
$ids = [];
|
|
|
|
var_dump($this->param['title']);
|
|
|
|
die();
|
|
|
|
if(!empty($this->param['title']) && is_array($this->param['title'])){
|
|
|
|
foreach ($this->param['title'] as $k => $v){
|
|
|
|
foreach ($this->param['title'] as $v){
|
|
|
|
$param['project_id'] = $this->user['project_id'];
|
|
|
|
$param['created_at'] = date('Y-m-d H:i:s');
|
|
|
|
$param['updated_at'] = $param['created_at'];
|
|
|
|
$param['title'] = $v;
|
|
|
|
$id = $this->model->insertGetId($param);
|
|
|
|
$ids[] = $id;
|
|
|
|
RouteMap::setRoute($this->param['title'], RouteMap::SOURCE_PRODUCT_KEYWORD, $id, $this->user['project_id']);
|
|
|
|
RouteMap::setRoute($v, RouteMap::SOURCE_PRODUCT_KEYWORD, $id, $this->user['project_id']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return $this->success($ids);
|
...
|
...
|
|