合并分支 'lyh-server' 到 'master'
Lyh server 查看合并请求 !3068
正在显示
2 个修改的文件
包含
28 行增加
和
22 行删除
| @@ -53,24 +53,28 @@ class SendProduct extends Command | @@ -53,24 +53,28 @@ class SendProduct extends Command | ||
| 53 | if(empty($domain)){ | 53 | if(empty($domain)){ |
| 54 | continue; | 54 | continue; |
| 55 | } | 55 | } |
| 56 | - $arr1 = $this->sendProduct(); | ||
| 57 | - $arr2 = $this->sendBlog(); | ||
| 58 | - $arr3 = $this->sendNews(); | ||
| 59 | - $url = array_merge((array)$arr1,(array)$arr2,(array)$arr3); | ||
| 60 | - if(!empty($url)){ | ||
| 61 | - $c_url = $domain.'api/update_page/'; | ||
| 62 | - $param = [ | ||
| 63 | - 'project_id' => $v['id'], | ||
| 64 | - 'type' => 1, | ||
| 65 | - 'route' => 3, | ||
| 66 | - 'url' => $url, | ||
| 67 | - 'language'=> [], | ||
| 68 | - 'is_sitemap' => 0 | ||
| 69 | - ]; | ||
| 70 | - http_post($c_url, json_encode($param)); | 56 | + try { |
| 57 | + $arr1 = $this->sendProduct(); | ||
| 58 | + $arr2 = $this->sendBlog(); | ||
| 59 | + $arr3 = $this->sendNews(); | ||
| 60 | + $url = array_merge((array)$arr1,(array)$arr2,(array)$arr3); | ||
| 61 | + if(!empty($url)){ | ||
| 62 | + $c_url = $domain.'api/update_page/'; | ||
| 63 | + $param = [ | ||
| 64 | + 'project_id' => $v['id'], | ||
| 65 | + 'type' => 1, | ||
| 66 | + 'route' => 3, | ||
| 67 | + 'url' => $url, | ||
| 68 | + 'language'=> [], | ||
| 69 | + 'is_sitemap' => 0 | ||
| 70 | + ]; | ||
| 71 | + //TODO::通知C端生成界面 | ||
| 72 | + http_post($c_url, json_encode($param)); | ||
| 73 | + } | ||
| 74 | + }catch (\Exception $e){ | ||
| 75 | + DB::disconnect('custom_mysql'); | ||
| 76 | + continue; | ||
| 71 | } | 77 | } |
| 72 | - //TODO::通知C端生成界面 | ||
| 73 | - DB::disconnect('custom_mysql'); | ||
| 74 | } | 78 | } |
| 75 | echo date('Y-m-d H:i:s') . 'end' . PHP_EOL; | 79 | echo date('Y-m-d H:i:s') . 'end' . PHP_EOL; |
| 76 | } | 80 | } |
| @@ -31,13 +31,15 @@ class GeoController extends BaseController | @@ -31,13 +31,15 @@ class GeoController extends BaseController | ||
| 31 | try { | 31 | try { |
| 32 | $token = trim($this->param['token']); | 32 | $token = trim($this->param['token']); |
| 33 | $param = Crypt::decrypt($token); | 33 | $param = Crypt::decrypt($token); |
| 34 | - if ($param['send_at'] + 86400 < time()) {} | ||
| 35 | - $project_id = $param['project_id']; | ||
| 36 | - } catch (\Exception $e) { | ||
| 37 | - return $this->error('非法请求'); | 34 | + }catch (\Exception $e){ |
| 35 | + $this->response('非法请求',Code::SYSTEM_ERROR); | ||
| 36 | + } | ||
| 37 | + if ($param['send_at'] + 86400 < time()) { | ||
| 38 | + $this->response('非法请求,已过期',Code::SYSTEM_ERROR); | ||
| 38 | } | 39 | } |
| 40 | + $project_id = $param['project_id']; | ||
| 39 | $projectModel = new Project(); | 41 | $projectModel = new Project(); |
| 40 | - $projectInfo = $projectModel->read(['project_id' => $project_id],['title','version']); | 42 | + $projectInfo = $projectModel->read(['id' => $project_id],['title','version']); |
| 41 | $geoWritingsModel = new GeoWritings(); | 43 | $geoWritingsModel = new GeoWritings(); |
| 42 | $lists = $geoWritingsModel->list(['project_id' => $project_id, 'status' => 2 ,'is_del' => GeoWritings::IS_DEL_FALSE],'id',['title', 'status', 'uniqid', 'confirm_at']); | 44 | $lists = $geoWritingsModel->list(['project_id' => $project_id, 'status' => 2 ,'is_del' => GeoWritings::IS_DEL_FALSE],'id',['title', 'status', 'uniqid', 'confirm_at']); |
| 43 | $result = [ | 45 | $result = [ |
-
请 注册 或 登录 后发表评论