正在显示
1 个修改的文件
包含
6 行增加
和
1 行删除
| @@ -87,8 +87,13 @@ class ReplaceHtmlLog extends Command | @@ -87,8 +87,13 @@ 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 | - $bTemplateModel->formatQuery($condition)->update(['main_html' => DB::raw("REPLACE(main_html, '$old_html', '$html')")]); | 90 | + $bTemplateModel->formatQuery($condition) |
| 91 | + ->update([ | ||
| 92 | + 'main_html' => DB::raw("REPLACE(main_html, ?, ?)", [$old_html, $html]), | ||
| 93 | + 'updated_at' => date('Y-m-d H:i:s'), | ||
| 94 | + ]); | ||
| 91 | } | 95 | } |
| 92 | return true; | 96 | return true; |
| 93 | } | 97 | } |
| 98 | + | ||
| 94 | } | 99 | } |
-
请 注册 或 登录 后发表评论