正在显示
2 个修改的文件
包含
2 行增加
和
3 行删除
| @@ -105,8 +105,7 @@ class ProductLogic extends BaseLogic | @@ -105,8 +105,7 @@ class ProductLogic extends BaseLogic | ||
| 105 | KeywordRelated::where('product_id', $id)->delete(); | 105 | KeywordRelated::where('product_id', $id)->delete(); |
| 106 | }else{ | 106 | }else{ |
| 107 | //回收站 | 107 | //回收站 |
| 108 | - $info->status = Product::STATUS_RECYCLE; | ||
| 109 | - $info->save(); | 108 | + parent::save(['id' => $id, 'status' => Product::STATUS_RECYCLE]); |
| 110 | unset($ids[$k]); | 109 | unset($ids[$k]); |
| 111 | } | 110 | } |
| 112 | } | 111 | } |
| @@ -173,7 +173,7 @@ class Logic | @@ -173,7 +173,7 @@ class Logic | ||
| 173 | public function delete($ids, $map = []){ | 173 | public function delete($ids, $map = []){ |
| 174 | $ids = array_filter(Arr::splitFilterToArray($ids), 'intval'); | 174 | $ids = array_filter(Arr::splitFilterToArray($ids), 'intval'); |
| 175 | if(!$ids){ | 175 | if(!$ids){ |
| 176 | -// $this->fail('ID不能为空'); | 176 | + return $this->success(); |
| 177 | } | 177 | } |
| 178 | 178 | ||
| 179 | foreach ($ids as $id){ | 179 | foreach ($ids as $id){ |
-
请 注册 或 登录 后发表评论