作者 lyh

心跳设置

@@ -87,13 +87,12 @@ class ReplaceHtmlLog extends Command @@ -87,13 +87,12 @@ class ReplaceHtmlLog extends Command
87 if($info['template_id'] == 0){ 87 if($info['template_id'] == 0){
88 $bTemplateModel->formatQuery($condition)->update(['html' => DB::raw("REPLACE(html, '$old_html', '$html')")]); 88 $bTemplateModel->formatQuery($condition)->update(['html' => DB::raw("REPLACE(html, '$old_html', '$html')")]);
89 }else{ 89 }else{
90 - echo json_encode($condition);  
91 - die();  
92 - $bTemplateModel->formatQuery($condition) 90 + $bTemplateModel->where($condition)
93 ->update([ 91 ->update([
94 - 'main_html' => DB::raw("REPLACE(main_html, ?, ?)", [$old_html, $html]),  
95 - 'updated_at' => date('Y-m-d H:i:s'), 92 + 'main_html' => DB::raw("REPLACE(main_html, '" . addslashes($old_html) . "', '" . addslashes($html) . "')"),
  93 + 'updated_at' => now(),
96 ]); 94 ]);
  95 +
97 } 96 }
98 return true; 97 return true;
99 } 98 }