|
@@ -763,6 +763,26 @@ class Notify extends Api
|
|
|
$header = [
|
|
|
'Content-Type: application/json'
|
|
|
];
|
|
|
+
|
|
|
+ //生成ftp文件
|
|
|
+ $content = [
|
|
|
+ 'cpPrvdName' => '健康e家',
|
|
|
+ 'cpPrvCode' => '41000144',
|
|
|
+ 'cpPrvType' => '1006',
|
|
|
+ 'ChnName' => '健康',
|
|
|
+ 'ChnCode' => '1000020',
|
|
|
+ 'extraContentID' => '',
|
|
|
+ 'actors' => '',
|
|
|
+ 'directors' => '',
|
|
|
+ 'contentYear' => '',
|
|
|
+ 'tags' => '',
|
|
|
+ 'contentTime' => date('Y-m-d H:i:s'),
|
|
|
+ 'formatType' => ''
|
|
|
+ ];
|
|
|
+ //增量接口
|
|
|
+ $insert_url = 'http://test.meta.unso.gitv.tv/sendMeta';
|
|
|
+ $method = 'POST';
|
|
|
+
|
|
|
foreach ($list as &$v) {
|
|
|
$url = 'http://jscp.agency.gitv.tv/injectResult/v1/queryTv?cspId=' . config('cspid') . '&cpAlbumId=' . $v['id'] . '&cpTvId=' . $v['id'];
|
|
|
$rs = httpRequest($url, 'GET', [], $header);
|
|
@@ -776,51 +796,39 @@ class Notify extends Api
|
|
|
$data = $rs['data'][0];
|
|
|
if ($data['taskStatus'] == 2) {
|
|
|
//生成ftp文件
|
|
|
- $content = [
|
|
|
- 'cpPrvdName' => '健康e家',
|
|
|
- 'cpPrvCode' => '41000144',
|
|
|
- 'cpPrvType' => '1006',
|
|
|
- 'ChnName' => '健康',
|
|
|
- 'ChnCode' => '1000020',
|
|
|
- 'contentId' => (string)$v['id'],
|
|
|
- 'extraContentID' => '',
|
|
|
- 'content' => $v['title'],
|
|
|
- 'actors' => '',
|
|
|
- 'directors' => '',
|
|
|
- 'contentYear' => '',
|
|
|
- 'tags' => '',
|
|
|
- 'intent' => [
|
|
|
- 'action' => 'com.huxiu.heh.tv.ui.video.detail.VideoDetailActivity',
|
|
|
- 'package' => 'com.huxiu.heh.tv',
|
|
|
- 'component' => [
|
|
|
- 'pkg' => 'com.huxiu.heh.tv',
|
|
|
- 'cls' => 'com.huxiu.heh.tv.ui.video.detail.VideoDetailActivity'
|
|
|
- ],
|
|
|
- 'extras' => [
|
|
|
- /*'cmd' => '',
|
|
|
- 'from' => '',
|
|
|
- 'media_id' => ''*/
|
|
|
- 'type_id' => $v['video_type_id'],
|
|
|
- 'id' => $v['id']
|
|
|
- ]
|
|
|
+ $content['contentId'] = (string)$v['id'];
|
|
|
+ $content['content'] = $v['title'];
|
|
|
+ $content['intent'] = [
|
|
|
+ 'action' => 'com.huxiu.heh.tv.ui.video.detail.VideoDetailActivity',
|
|
|
+ 'package' => 'com.huxiu.heh.tv',
|
|
|
+ 'component' => [
|
|
|
+ 'pkg' => 'com.huxiu.heh.tv',
|
|
|
+ 'cls' => 'com.huxiu.heh.tv.ui.video.detail.VideoDetailActivity'
|
|
|
],
|
|
|
- 'isEffective' => $v['status'],
|
|
|
- 'pic' => one_domain_image($v['image']),
|
|
|
- 'contentTime' => date('Y-m-d H:i:s'),
|
|
|
- 'isPaid' => $v['is_pay'],
|
|
|
- 'formatType' => ''
|
|
|
+ 'extras' => [
|
|
|
+ /*'cmd' => '',
|
|
|
+ 'from' => '',
|
|
|
+ 'media_id' => ''*/
|
|
|
+ 'type_id' => $v['video_type_id'],
|
|
|
+ 'id' => $v['id']
|
|
|
+ ]
|
|
|
];
|
|
|
+ $content['isEffective'] = $v['status'];
|
|
|
+ $content['pic'] = one_domain_image($v['image']);
|
|
|
+ $content['isPaid'] = $v['is_pay'];
|
|
|
+ $content['content'] = $v['title'];
|
|
|
+ $content['content'] = $v['title'];
|
|
|
+
|
|
|
$content = json_encode($content, 320);
|
|
|
$filename = 'shipin_'.date('Ymd').'_'.date('His').'_increment'.'.json';
|
|
|
error_log(print_r($content, 1) . PHP_EOL, 3, './jiankang/' . $filename);
|
|
|
//调用增量注入接口
|
|
|
- $url = 'http://test.meta.unso.gitv.tv/sendMeta';
|
|
|
- $method = 'POST';
|
|
|
+
|
|
|
$postfields = [
|
|
|
'priKey' => '123456',
|
|
|
'data' => [$content]
|
|
|
];
|
|
|
- $rt = httpRequest($url, $method, $postfields);
|
|
|
+ $rt = httpRequest($insert_url, $method, $postfields);
|
|
|
if (!$rt) {
|
|
|
continue;
|
|
|
}
|