|
@@ -76,6 +76,9 @@ class GeoLinkLogic extends BaseLogic |
|
@@ -76,6 +76,9 @@ class GeoLinkLogic extends BaseLogic |
|
76
|
if(!empty($this->param['data'])){
|
76
|
if(!empty($this->param['data'])){
|
|
77
|
$data = [];
|
77
|
$data = [];
|
|
78
|
foreach ($this->param['data'] as $item){
|
78
|
foreach ($this->param['data'] as $item){
|
|
|
|
79
|
+ //查看当前Url是否存在
|
|
|
|
80
|
+ $info = $this->model->read(['url'=>$item['url'],'type'=>$this->model::TYPE_NEWS,'project_id'=>$this->param['project_id']]);
|
|
|
|
81
|
+ if($info === false){
|
|
79
|
$data[] = [
|
82
|
$data[] = [
|
|
80
|
'project_id'=>$this->param['project_id'],
|
83
|
'project_id'=>$this->param['project_id'],
|
|
81
|
'da'=>$item['da'] ?? 0,
|
84
|
'da'=>$item['da'] ?? 0,
|
|
@@ -83,6 +86,7 @@ class GeoLinkLogic extends BaseLogic |
|
@@ -83,6 +86,7 @@ class GeoLinkLogic extends BaseLogic |
|
83
|
'send_time'=>$item['send_time']
|
86
|
'send_time'=>$item['send_time']
|
|
84
|
];
|
87
|
];
|
|
85
|
}
|
88
|
}
|
|
|
|
89
|
+ }
|
|
86
|
$this->model->insertAll($data);
|
90
|
$this->model->insertAll($data);
|
|
87
|
}
|
91
|
}
|
|
88
|
}catch (\Exception $e){
|
92
|
}catch (\Exception $e){
|