|
...
|
...
|
@@ -86,7 +86,15 @@ class ProductLogic extends BaseLogic |
|
|
|
|
|
|
|
DB::beginTransaction();
|
|
|
|
try {
|
|
|
|
foreach ($ids as $id){
|
|
|
|
foreach ($ids as $k => $id) {
|
|
|
|
|
|
|
|
$info = $this->getCacheInfo($id);
|
|
|
|
if(!$info){
|
|
|
|
unset($ids[$k]);
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
if($info->status == Product::STATUS_RECYCLE){
|
|
|
|
//删除路由映射
|
|
|
|
RouteMap::delRoute(RouteMap::SOURCE_PRODUCT, $id, $this->user['project_id']);
|
|
|
|
|
|
...
|
...
|
@@ -95,6 +103,12 @@ class ProductLogic extends BaseLogic |
|
|
|
|
|
|
|
//删除关键词关联
|
|
|
|
KeywordRelated::where('product_id', $id)->delete();
|
|
|
|
}else{
|
|
|
|
//回收站
|
|
|
|
$info->status = Product::STATUS_RECYCLE;
|
|
|
|
$info->save();
|
|
|
|
unset($ids[$k]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
parent::delete($ids);
|
|
|
|
|
...
|
...
|
|