作者 Your Name
... ... @@ -392,6 +392,8 @@ class UpdateRoute extends Command
if($info !== false){
//删除其他一样的数据
$routeMapModel->del(['id'=>['!=',$info['id']],'source'=>'product_keyword','source_id'=>$info['source_id']]);
}{
echo date('Y-m-d H:i:s') . '保留的id:'.$v['id'] . PHP_EOL;
}
}
return true;
... ...
... ... @@ -165,10 +165,10 @@ class KeywordLogic extends BaseLogic
$ids = $this->param['ids'];
$productModel = new Product();
foreach ($ids as $id){
$product_info = $productModel->read(['keyword_id'=>['like','%,'.$id.',%']]);
if($product_info !== false){
$this->fail('当前关键词拥有产品不允许删除');
}
$productModel->where('keyword_id', 'like', '%,' . $id . ',%')
->update([
'email' => DB::raw("REPLACE(keyword_id, ',' . $id . ',', ',')")
]);
$this->delRoute($id);
$this->model->del(['id'=>$id]);
}
... ...
... ... @@ -87,6 +87,7 @@ class Project extends Base
9 => '星链网站(2年版)',
11 => '俄语标准版',
12 => '俄语商务版',
14 => '俄语旗舰版',
13 => '体验版'
];
}
... ...