作者 lyh

gx

@@ -446,8 +446,10 @@ class NewsLogic extends BaseLogic @@ -446,8 +446,10 @@ 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);
449 $rs = $this->model->edit(['category_id'=>$category_ids_str],['id'=>$id]); 450 $rs = $this->model->edit(['category_id'=>$category_ids_str],['id'=>$id]);
450 - @file_put_contents(storage_path('logs/lyh_error.log'), var_export($rs, true) . PHP_EOL, FILE_APPEND); 451 + @file_put_contents(storage_path('logs/lyh_error.log'), var_export(DB::getQueryLog(), true) . PHP_EOL, FILE_APPEND);
  452 +
451 } 453 }
452 } 454 }
453 }catch (\Exception $e){ 455 }catch (\Exception $e){