作者 李宇航

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

Lyh server



查看合并请求 !3068
... ... @@ -53,24 +53,28 @@ class SendProduct extends Command
if(empty($domain)){
continue;
}
$arr1 = $this->sendProduct();
$arr2 = $this->sendBlog();
$arr3 = $this->sendNews();
$url = array_merge((array)$arr1,(array)$arr2,(array)$arr3);
if(!empty($url)){
$c_url = $domain.'api/update_page/';
$param = [
'project_id' => $v['id'],
'type' => 1,
'route' => 3,
'url' => $url,
'language'=> [],
'is_sitemap' => 0
];
http_post($c_url, json_encode($param));
try {
$arr1 = $this->sendProduct();
$arr2 = $this->sendBlog();
$arr3 = $this->sendNews();
$url = array_merge((array)$arr1,(array)$arr2,(array)$arr3);
if(!empty($url)){
$c_url = $domain.'api/update_page/';
$param = [
'project_id' => $v['id'],
'type' => 1,
'route' => 3,
'url' => $url,
'language'=> [],
'is_sitemap' => 0
];
//TODO::通知C端生成界面
http_post($c_url, json_encode($param));
}
}catch (\Exception $e){
DB::disconnect('custom_mysql');
continue;
}
//TODO::通知C端生成界面
DB::disconnect('custom_mysql');
}
echo date('Y-m-d H:i:s') . 'end' . PHP_EOL;
}
... ...
... ... @@ -31,13 +31,15 @@ class GeoController extends BaseController
try {
$token = trim($this->param['token']);
$param = Crypt::decrypt($token);
if ($param['send_at'] + 86400 < time()) {}
$project_id = $param['project_id'];
} catch (\Exception $e) {
return $this->error('非法请求');
}catch (\Exception $e){
$this->response('非法请求',Code::SYSTEM_ERROR);
}
if ($param['send_at'] + 86400 < time()) {
$this->response('非法请求,已过期',Code::SYSTEM_ERROR);
}
$project_id = $param['project_id'];
$projectModel = new Project();
$projectInfo = $projectModel->read(['project_id' => $project_id],['title','version']);
$projectInfo = $projectModel->read(['id' => $project_id],['title','version']);
$geoWritingsModel = new GeoWritings();
$lists = $geoWritingsModel->list(['project_id' => $project_id, 'status' => 2 ,'is_del' => GeoWritings::IS_DEL_FALSE],'id',['title', 'status', 'uniqid', 'confirm_at']);
$result = [
... ...