合并分支 'lyh-server' 到 'master'
gx查询排除独立白帽系统 查看合并请求 !2130
正在显示
1 个修改的文件
包含
6 行增加
和
0 行删除
| @@ -367,6 +367,7 @@ class KeywordLogic extends BaseLogic | @@ -367,6 +367,7 @@ class KeywordLogic extends BaseLogic | ||
| 367 | 'project_id' => $this->user['project_id'], | 367 | 'project_id' => $this->user['project_id'], |
| 368 | 'type' => 1, | 368 | 'type' => 1, |
| 369 | 'uid' => 0, | 369 | 'uid' => 0, |
| 370 | + 'start_time'=>$this->param['start_time'], | ||
| 370 | 'created_at' => date('Y-m-d H:i:s'), | 371 | 'created_at' => date('Y-m-d H:i:s'), |
| 371 | 'updated_at' => date('Y-m-d H:i:s') | 372 | 'updated_at' => date('Y-m-d H:i:s') |
| 372 | ]; | 373 | ]; |
| @@ -394,6 +395,8 @@ class KeywordLogic extends BaseLogic | @@ -394,6 +395,8 @@ class KeywordLogic extends BaseLogic | ||
| 394 | $text = Common::deal_keywords($text); | 395 | $text = Common::deal_keywords($text); |
| 395 | preg_match_all('/\{[^{}]*\}/', $text, $matches); | 396 | preg_match_all('/\{[^{}]*\}/', $text, $matches); |
| 396 | $data = []; | 397 | $data = []; |
| 398 | + $twoMonthsAgo = strtotime('-2 months'); | ||
| 399 | + | ||
| 397 | if (!empty($text)) { | 400 | if (!empty($text)) { |
| 398 | foreach ($matches[0] as $item) { | 401 | foreach ($matches[0] as $item) { |
| 399 | $item = str_replace("'", '"', $item); | 402 | $item = str_replace("'", '"', $item); |
| @@ -402,12 +405,15 @@ class KeywordLogic extends BaseLogic | @@ -402,12 +405,15 @@ class KeywordLogic extends BaseLogic | ||
| 402 | if (!isset($item['name']) || !isset($item['comment'])) { | 405 | if (!isset($item['name']) || !isset($item['comment'])) { |
| 403 | continue; | 406 | continue; |
| 404 | } | 407 | } |
| 408 | + $randomTimestamp = rand($twoMonthsAgo, time()); | ||
| 409 | + $randomDateTime = date('Y-m-d H:i:s', $randomTimestamp); | ||
| 405 | $data[] = [ | 410 | $data[] = [ |
| 406 | 'nickname' => $item['name'], | 411 | 'nickname' => $item['name'], |
| 407 | 'text' => $item['comment'], | 412 | 'text' => $item['comment'], |
| 408 | 'project_id' => $this->user['project_id'], | 413 | 'project_id' => $this->user['project_id'], |
| 409 | 'type' => 1, | 414 | 'type' => 1, |
| 410 | 'uid' => 0, | 415 | 'uid' => 0, |
| 416 | + 'start_time'=>$randomDateTime, | ||
| 411 | 'created_at' => date('Y-m-d H:i:s'), | 417 | 'created_at' => date('Y-m-d H:i:s'), |
| 412 | 'updated_at' => date('Y-m-d H:i:s') | 418 | 'updated_at' => date('Y-m-d H:i:s') |
| 413 | ]; | 419 | ]; |
-
请 注册 或 登录 后发表评论