|
@@ -1084,4 +1084,142 @@ class Notify extends Api
|
|
|
echo 'wan bi';
|
|
|
die;
|
|
|
}
|
|
|
+
|
|
|
+ //媒资数据专辑粒度
|
|
|
+ public function mediadataalbum() {
|
|
|
+ $hu_video = Db::name('video');
|
|
|
+ $list = $hu_video->where(['search_status' => 1])->order('id')->select();
|
|
|
+
|
|
|
+ if (!$list) {
|
|
|
+ echo 'mei shu ju';
|
|
|
+ die;
|
|
|
+ }
|
|
|
+
|
|
|
+ foreach ($list as $key => &$param) {
|
|
|
+ $content = [
|
|
|
+ 'Updatetype' => 1,
|
|
|
+ 'cpid' => config('cp_id'),
|
|
|
+ 'channelid' => '1000013',
|
|
|
+ 'albumid' => $param['id'],
|
|
|
+ 'albumname' => $param['title'],
|
|
|
+ 'cornersign' => $param['is_pay'],
|
|
|
+ 'picurl' => config('upload.cdnurl') . $param['image'],
|
|
|
+ 'gotourl' => json_encode([
|
|
|
+ 'action' => 'com.huxiu.heh.tv.ui.splash.SplashActivity',
|
|
|
+ 'package' => 'com.huxiu.heh.tv',
|
|
|
+ 'component' => [
|
|
|
+ 'pkg' => 'com.huxiu.heh.tv',
|
|
|
+ 'cls' => 'com.huxiu.heh.tv.ui.splash.SplashActivity'
|
|
|
+ ],
|
|
|
+ 'extras' => [
|
|
|
+// 'cmd' => '',
|
|
|
+// 'from' => '',
|
|
|
+// 'media_id' => ''
|
|
|
+ 'type_id' => $param['video_type_id'],
|
|
|
+ 'id' => $param['id']
|
|
|
+ ]
|
|
|
+ ], 320)
|
|
|
+ ];
|
|
|
+
|
|
|
+ $content = json_encode($content, 320);
|
|
|
+ $filename = date('Ymd').'_'.config('cp_id').'_albumsdata_1.dat';
|
|
|
+ $check_filename = date('Ymd').'_'.config('cp_id').'_albumsdata_1.chk';
|
|
|
+
|
|
|
+ error_log(print_r($content, 1) . PHP_EOL, 3, './jiankang/' . $filename);
|
|
|
+ error_log('', 3, './jiankang/' . $check_filename);
|
|
|
+
|
|
|
+ if ($key == count($list) - 1) {
|
|
|
+ $finish_filename = date('Ymd') . '_' . config('cp_id') . '_albumsdata.finish';
|
|
|
+ error_log('', 3, './jiankang/' . $finish_filename);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //媒资数据节目/内容粒度
|
|
|
+ public function mediadatavideo() {
|
|
|
+ $hu_video = Db::name('video');
|
|
|
+ $list = $hu_video->where(['search_status' => 1])->order('id')->select();
|
|
|
+
|
|
|
+ if (!$list) {
|
|
|
+ echo 'mei shu ju';
|
|
|
+ die;
|
|
|
+ }
|
|
|
+
|
|
|
+ foreach ($list as $key => &$param) {
|
|
|
+ $content = [
|
|
|
+ 'Updatetype' => 1,
|
|
|
+ 'cpid' => config('cp_id'),
|
|
|
+ 'channelid' => '1000013',
|
|
|
+ 'albumid' => $param['id'],
|
|
|
+ 'albumname' => $param['title'],
|
|
|
+ 'videoid' => $param['id'],
|
|
|
+ 'videoname' => $param['title'],
|
|
|
+ 'Contenttype' => 1,
|
|
|
+ 'cornersign' => $param['is_pay']
|
|
|
+ ];
|
|
|
+
|
|
|
+ $content = json_encode($content, 320);
|
|
|
+ $filename = date('Ymd').'_'.config('cp_id').'_videosdata_1.dat';
|
|
|
+ $check_filename = date('Ymd').'_'.config('cp_id').'_videosdata_1.chk';
|
|
|
+
|
|
|
+ error_log(print_r($content, 1) . PHP_EOL, 3, './jiankang/' . $filename);
|
|
|
+ error_log('', 3, './jiankang/' . $check_filename);
|
|
|
+
|
|
|
+ if ($key == count($list) - 1) {
|
|
|
+ $finish_filename = date('Ymd') . '_' . config('cp_id') . '_videosdata.finish';
|
|
|
+ error_log('', 3, './jiankang/' . $finish_filename);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //产品包
|
|
|
+ public function product() {
|
|
|
+ $content = [
|
|
|
+ 'prod_code' => config('product_code'),
|
|
|
+ 'prod_name' => '月包会员',
|
|
|
+ 'prod_type' => 0,
|
|
|
+ 'cpid' => config('cp_id')
|
|
|
+ ];
|
|
|
+
|
|
|
+ $content = json_encode($content, 320);
|
|
|
+ $filename = date('Ymd').'_'.config('cp_id').'_productsdata_1.dat';
|
|
|
+ $check_filename = date('Ymd').'_'.config('cp_id').'_productsdata_1.chk';
|
|
|
+
|
|
|
+ error_log(print_r($content, 1) . PHP_EOL, 3, './jiankang/' . $filename);
|
|
|
+ error_log('', 3, './jiankang/' . $check_filename);
|
|
|
+ $finish_filename = date('Ymd') . '_' . config('cp_id') . '_productsdata.finish';
|
|
|
+ error_log('', 3, './jiankang/' . $finish_filename);
|
|
|
+ }
|
|
|
+
|
|
|
+ //产品包和媒资所属关系
|
|
|
+ public function productmediarelation() {
|
|
|
+ $hu_video = Db::name('video');
|
|
|
+ $list = $hu_video->where(['search_status' => 1])->order('id')->select();
|
|
|
+
|
|
|
+ if (!$list) {
|
|
|
+ echo 'mei shu ju';
|
|
|
+ die;
|
|
|
+ }
|
|
|
+
|
|
|
+ foreach ($list as $key => &$param) {
|
|
|
+ $content = [
|
|
|
+ 'Updatetype' => 1,
|
|
|
+ 'prod_code' => config('product_code'),
|
|
|
+ 'cpid' => config('cp_id'),
|
|
|
+ 'albumid' => $param['id']
|
|
|
+ ];
|
|
|
+
|
|
|
+ $content = json_encode($content, 320);
|
|
|
+ $filename = date('Ymd').'_'.config('cp_id').'_productalbumdata_1.dat';
|
|
|
+ $check_filename = date('Ymd').'_'.config('cp_id').'_productalbumdata_1.chk';
|
|
|
+
|
|
|
+ error_log(print_r($content, 1) . PHP_EOL, 3, './jiankang/' . $filename);
|
|
|
+ error_log('', 3, './jiankang/' . $check_filename);
|
|
|
+
|
|
|
+ if ($key == count($list) - 1) {
|
|
|
+ $finish_filename = date('Ymd') . '_' . config('cp_id') . '_productalbumdata.finish';
|
|
|
+ error_log('', 3, './jiankang/' . $finish_filename);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|