正在显示
1 个修改的文件
包含
3 行增加
和
3 行删除
@@ -144,15 +144,15 @@ trait DbQuery { | @@ -144,15 +144,15 @@ trait DbQuery { | ||
144 | $data['updated_at'] = empty($data['updated_at']) ? date('Y-m-d H:i:s') : $data['updated_at']; | 144 | $data['updated_at'] = empty($data['updated_at']) ? date('Y-m-d H:i:s') : $data['updated_at']; |
145 | } | 145 | } |
146 | 146 | ||
147 | - // es 同步数据 | ||
148 | - \Event\Event::call('\Event\SyncMailToEs','update',$table,$where,$data); | ||
149 | - | ||
150 | $sql = "update `{$table}` set ".dbUpdate($data). " where ".$where; | 147 | $sql = "update `{$table}` set ".dbUpdate($data). " where ".$where; |
151 | 148 | ||
152 | $data = $this->getData($data); | 149 | $data = $this->getData($data); |
153 | 150 | ||
154 | $query = $this->query([$sql,$data]); | 151 | $query = $this->query([$sql,$data]); |
155 | if($query){ | 152 | if($query){ |
153 | + // es 同步数据 | ||
154 | + \Event\Event::call('\Event\SyncMailToEs','update',$table,$where,$data); | ||
155 | + | ||
156 | return $query->rowCount(); | 156 | return $query->rowCount(); |
157 | } | 157 | } |
158 | return 0; | 158 | return 0; |
-
请 注册 或 登录 后发表评论