正在显示
1 个修改的文件
包含
2 行增加
和
3 行删除
| @@ -446,9 +446,8 @@ class NewsLogic extends BaseLogic | @@ -446,9 +446,8 @@ class NewsLogic extends BaseLogic | ||
| 446 | $category_ids = explode(',',trim($newsInfo['category_id'],',')); | 446 | $category_ids = explode(',',trim($newsInfo['category_id'],',')); |
| 447 | $category_ids_arr = array_values(array_unique(array_merge($category_ids,$this->param['category_id']))); | 447 | $category_ids_arr = array_values(array_unique(array_merge($category_ids,$this->param['category_id']))); |
| 448 | $category_ids_str = ','.implode(',',$category_ids_arr).','; | 448 | $category_ids_str = ','.implode(',',$category_ids_arr).','; |
| 449 | - @file_put_contents(storage_path('logs/lyh_error.log'), var_export( DB::connection()->enableQueryLog(), true) . PHP_EOL, FILE_APPEND); | ||
| 450 | - $rs = $this->model->edit(['category_id'=>$category_ids_str],['id'=>$id]); | ||
| 451 | - @file_put_contents(storage_path('logs/lyh_error.log'), var_export(DB::getQueryLog(), true) . PHP_EOL, FILE_APPEND); | 449 | + $newsModel = new News(); |
| 450 | + $newsModel->edit(['category_id'=>$category_ids_str],['id'=>$id]); | ||
| 452 | } | 451 | } |
| 453 | } | 452 | } |
| 454 | }catch (\Exception $e){ | 453 | }catch (\Exception $e){ |
-
请 注册 或 登录 后发表评论