作者 李宇航

合并分支 'lyh-server' 到 'master'

gx查询排除独立白帽系统



查看合并请求 !2130
... ... @@ -367,6 +367,7 @@ class KeywordLogic extends BaseLogic
'project_id' => $this->user['project_id'],
'type' => 1,
'uid' => 0,
'start_time'=>$this->param['start_time'],
'created_at' => date('Y-m-d H:i:s'),
'updated_at' => date('Y-m-d H:i:s')
];
... ... @@ -394,6 +395,8 @@ class KeywordLogic extends BaseLogic
$text = Common::deal_keywords($text);
preg_match_all('/\{[^{}]*\}/', $text, $matches);
$data = [];
$twoMonthsAgo = strtotime('-2 months');
if (!empty($text)) {
foreach ($matches[0] as $item) {
$item = str_replace("'", '"', $item);
... ... @@ -402,12 +405,15 @@ class KeywordLogic extends BaseLogic
if (!isset($item['name']) || !isset($item['comment'])) {
continue;
}
$randomTimestamp = rand($twoMonthsAgo, time());
$randomDateTime = date('Y-m-d H:i:s', $randomTimestamp);
$data[] = [
'nickname' => $item['name'],
'text' => $item['comment'],
'project_id' => $this->user['project_id'],
'type' => 1,
'uid' => 0,
'start_time'=>$randomDateTime,
'created_at' => date('Y-m-d H:i:s'),
'updated_at' => date('Y-m-d H:i:s')
];
... ...