icms接口阶段提交
Showing
15 changed files
with
703 additions
and
0 deletions
app/Http/Controllers/Icms/BaseController.php
0 → 100644
1 | <?php | ||
2 | |||
3 | namespace App\Http\Controllers\Icms; | ||
4 | |||
5 | use App\Helper\Response; | ||
6 | use App\Http\Controllers\Controller; | ||
7 | use GuzzleHttp\Client; | ||
8 | use Illuminate\Support\Facades\Log; | ||
9 | |||
10 | class BaseController extends Controller | ||
11 | { | ||
12 | /** | ||
13 | * 基础变量 | ||
14 | * @var string | ||
15 | */ | ||
16 | private $domain, $cp_id, $key; | ||
17 | protected $resCode = [ | ||
18 | 200 => '成功', | ||
19 | 5000=> '系统错误', | ||
20 | 4000=> '缺少必要参数, 或者参数值格式不正确', | ||
21 | 4100=> '签名鉴权失败', | ||
22 | 4200=> '请求已过期', | ||
23 | 4300=> '拒绝访问', | ||
24 | 4400=> '请求过于频繁', | ||
25 | 4500=> '配置错误' | ||
26 | ]; | ||
27 | |||
28 | public function __construct() | ||
29 | { | ||
30 | $this->domain = env('ICMS_DOMAIN','https://mgw-uat.tencentmusic.com/icms/sit-api'); | ||
31 | $this->cp_id = env('ICMS_CPID',7389); | ||
32 | $this->key = env('ICMS_KEY','50d74110004d94605d12c241eeafee27'); | ||
33 | } | ||
34 | |||
35 | /** | ||
36 | * 获取签名和去空的参数 | ||
37 | * @param array $array | ||
38 | * @param int $timestamp | ||
39 | * @return array | ||
40 | */ | ||
41 | private function signData(array $array,int $timestamp) | ||
42 | { | ||
43 | $common_params = [ | ||
44 | 'timestamp' => $timestamp, | ||
45 | 'cp_id' => $this->cp_id | ||
46 | ]; | ||
47 | $param_arr = array_merge($common_params,$array); | ||
48 | ksort($param_arr); | ||
49 | $params = ''; | ||
50 | $signData = []; | ||
51 | foreach ($param_arr as $k=>$v) | ||
52 | { | ||
53 | if ('' === $v || null === $v || [] === $v) { | ||
54 | continue; | ||
55 | } if (is_array($v)) { | ||
56 | $params .= $k.'='.json_encode($v).'&'; | ||
57 | } else { | ||
58 | $params .= $k.'='.$v.'&'; | ||
59 | } | ||
60 | $signData[$k] = $v; | ||
61 | } | ||
62 | $params = trim($params,'&'); | ||
63 | $signData['sign'] = strtoupper(md5($params.$this->key)); | ||
64 | dd($signData); | ||
65 | return $signData; | ||
66 | } | ||
67 | |||
68 | /** | ||
69 | * 重组请求数据 | ||
70 | * @param string $uri | ||
71 | * @param array $reqData | ||
72 | * @param bool $isLocal | ||
73 | * @return array | ||
74 | */ | ||
75 | private function requestData(string $uri, array $reqData, bool $isLocal = true) | ||
76 | { | ||
77 | if ($isLocal) { | ||
78 | $data_file = database_path('Icms/'.$uri.'.query.php'); | ||
79 | $params = include("$data_file"); | ||
80 | } else { | ||
81 | $params = $reqData; | ||
82 | } | ||
83 | $timestamp = time(); | ||
84 | $cp_id = $this->cp_id; | ||
85 | $signData = $this->signData($params,$timestamp); | ||
86 | return array_merge($signData,compact('cp_id','timestamp')); | ||
87 | } | ||
88 | |||
89 | /** | ||
90 | * 请求接口 | ||
91 | * @param string $uri | ||
92 | * @param string $method | ||
93 | * @param array $reqData | ||
94 | * @return \Illuminate\Http\JsonResponse|mixed | ||
95 | * @throws \GuzzleHttp\Exception\GuzzleException | ||
96 | */ | ||
97 | protected function doApi(string $uri, array $reqData = [], string $method = 'POST') | ||
98 | { | ||
99 | $url = rtrim($this->domain,'/').'/'.$uri; | ||
100 | $data = $this->requestData($uri, $reqData); | ||
101 | try { | ||
102 | $client = new Client(['verify'=>false]); //实体公钥['verify'=>'/path/to/public.pem'] | ||
103 | switch (strtoupper($method)) { | ||
104 | case 'GET': | ||
105 | $response = $client->request('GET', $url, ['query' => $data]); | ||
106 | break; | ||
107 | case 'POST': | ||
108 | default: | ||
109 | $response = $client->request('POST', $url, ['json' => $data]); | ||
110 | break; | ||
111 | } | ||
112 | $data = json_decode($response->getBody()->getContents(), true); | ||
113 | Log::channel('api')->info(__METHOD__, $data); | ||
114 | if (200 !== $data['code']) { | ||
115 | return Response::error(-1,$this->resCode[$data['code']] ?? '操作失败'); | ||
116 | } else { | ||
117 | $response_path = 'Icms/'.$uri; | ||
118 | if (! is_dir($response_path)) { | ||
119 | @mkdir($response_path,'0777'); | ||
120 | } | ||
121 | $response_file = database_path($response_path.'.resp'); | ||
122 | file_put_contents($response_file, var_export($data['data'],true)); | ||
123 | return Response::success($data['data']); | ||
124 | } | ||
125 | } catch (\Exception $e) { | ||
126 | Log::channel('api')->error(__METHOD__, ['msg'=>$e->getMessage()]); | ||
127 | return Response::error(-1,'接口请求失败!'); | ||
128 | } | ||
129 | } | ||
130 | } |
app/Http/Controllers/Icms/WorkController.php
0 → 100644
1 | <?php | ||
2 | |||
3 | namespace App\Http\Controllers\Icms; | ||
4 | |||
5 | use Illuminate\Http\Request; | ||
6 | |||
7 | class WorkController extends BaseController | ||
8 | { | ||
9 | /** | ||
10 | * 专辑列表 | ||
11 | * @param Request $request | ||
12 | * @return \Illuminate\Http\JsonResponse|mixed | ||
13 | * @throws \GuzzleHttp\Exception\GuzzleException | ||
14 | */ | ||
15 | public function albumList(Request $request) | ||
16 | { | ||
17 | //todo:参数验证 | ||
18 | // dd(basename($request->getRequestUri())); | ||
19 | return $this->doApi('album-list'); | ||
20 | } | ||
21 | |||
22 | /** | ||
23 | * 保存专辑草稿 | ||
24 | * @param Request $request | ||
25 | * @return \Illuminate\Http\JsonResponse|mixed | ||
26 | * @throws \GuzzleHttp\Exception\GuzzleException | ||
27 | */ | ||
28 | public function saveAlbum(Request $request) | ||
29 | { | ||
30 | //todo:参数验证 | ||
31 | return $this->doApi('save-album'); | ||
32 | } | ||
33 | |||
34 | public function submitTme() | ||
35 | { | ||
36 | //提交上线库 | ||
37 | } | ||
38 | |||
39 | /** | ||
40 | * 获取专辑详情 | ||
41 | * @param Request $request | ||
42 | * @return \Illuminate\Http\JsonResponse|mixed | ||
43 | * @throws \GuzzleHttp\Exception\GuzzleException | ||
44 | */ | ||
45 | public function getAlbum(Request $request) | ||
46 | { | ||
47 | //todo:数据验证 | ||
48 | return $this->doApi('get-album'); | ||
49 | } | ||
50 | |||
51 | /** | ||
52 | * 删除专辑草稿(含批量) | ||
53 | * @param Request $request | ||
54 | * @return \Illuminate\Http\JsonResponse|mixed | ||
55 | * @throws \GuzzleHttp\Exception\GuzzleException | ||
56 | */ | ||
57 | public function delAlbum(Request $request) | ||
58 | { | ||
59 | //todo:数据验证 | ||
60 | return $this->doApi('del-album'); | ||
61 | } | ||
62 | |||
63 | /** | ||
64 | * 艺人查询 | ||
65 | * @return \Illuminate\Http\JsonResponse|mixed | ||
66 | * @throws \GuzzleHttp\Exception\GuzzleException | ||
67 | */ | ||
68 | public function showerList() | ||
69 | { | ||
70 | //todo:参数验证 | ||
71 | return $this->doApi('shower-list'); | ||
72 | } | ||
73 | |||
74 | public function createShower() | ||
75 | { | ||
76 | //创建艺人 | ||
77 | return $this->doApi('create-shower'); | ||
78 | } | ||
79 | |||
80 | public function getLeaders() | ||
81 | { | ||
82 | //候选人列表 | ||
83 | } | ||
84 | |||
85 | public function checkRepeat() | ||
86 | { | ||
87 | //检查作品重复 | ||
88 | } | ||
89 | |||
90 | public function originalCompany() | ||
91 | { | ||
92 | //原始版权公司列表 | ||
93 | } | ||
94 | |||
95 | public function albumBatchSubmit() | ||
96 | { | ||
97 | //专辑作品批量提交 | ||
98 | } | ||
99 | |||
100 | public function batchUploadMqList() | ||
101 | { | ||
102 | //作品批量上传任务列表 | ||
103 | } | ||
104 | |||
105 | public function cqlAlbum() | ||
106 | { | ||
107 | //曲库歌曲导入(post)/获取结果(get) | ||
108 | } | ||
109 | |||
110 | public function workFile() | ||
111 | { | ||
112 | //作品录入文件上传 | ||
113 | } | ||
114 | } |
... | @@ -54,6 +54,11 @@ class RouteServiceProvider extends ServiceProvider | ... | @@ -54,6 +54,11 @@ class RouteServiceProvider extends ServiceProvider |
54 | Route::middleware('web') | 54 | Route::middleware('web') |
55 | ->namespace($this->namespace) | 55 | ->namespace($this->namespace) |
56 | ->group(base_path('routes/web.php')); | 56 | ->group(base_path('routes/web.php')); |
57 | |||
58 | //icms | ||
59 | Route::prefix('icms') | ||
60 | ->namespace($this->namespace . '\Icms') | ||
61 | ->group(base_path('routes/icms.php')); | ||
57 | }); | 62 | }); |
58 | } | 63 | } |
59 | 64 | ... | ... |
config/icms.php
0 → 100644
1 | <?php | ||
2 | /** | ||
3 | * Created by PhpStorm. | ||
4 | * User: ZhangYang | ||
5 | * Date: 2021/12/16 | ||
6 | * Time: 15:43 | ||
7 | */ | ||
8 | return [ | ||
9 | 'api_map' => [ | ||
10 | '1' => '/work-external/album-list', | ||
11 | '2' => '/work-external/save-album', | ||
12 | '3' => '/work-external/submit-tme', | ||
13 | '4' => '/work-external/get-album', | ||
14 | '5' => '/work-external/del-album', | ||
15 | '6' => '/work-external/get-album-status', | ||
16 | '7' => '/work-external/shower-list', | ||
17 | '8' => '/work-external/create-shower', | ||
18 | '9' => '/work-external/get-leaders', | ||
19 | '10'=> '/work-external/check-repeat', | ||
20 | '11'=> '/work-external/original-company', | ||
21 | '12'=> '/work-external/album-batch-submit', | ||
22 | '13'=> '/work-external/batch-upload-mq-list', | ||
23 | '14'=> '/work-external/cql-album', | ||
24 | '15'=> '/work-external/work-file' | ||
25 | ] | ||
26 | ]; | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
database/icms/album-list.query.php
0 → 100644
1 | <?php | ||
2 | /** | ||
3 | * Created by PhpStorm. | ||
4 | * User: ZhangYang | ||
5 | * Date: 2021/12/16 | ||
6 | * Time: 14:58 | ||
7 | */ | ||
8 | return [ | ||
9 | 'page_size' => 10, | ||
10 | 'page' => 1, | ||
11 | 'song_name' => '',//歌曲名 | ||
12 | 'album_name' => '',//专辑名 | ||
13 | 'song_type' => '',//专辑类型 int | ||
14 | 'song_genre' => '',//专辑流派 int | ||
15 | 'artist_name' => '',//艺人名 | ||
16 | 'region' => '',//地区 int | ||
17 | 'language' => '',//语言 int | ||
18 | 'status' => '',//状态(0:隐藏;1:待上架;2:已下架;3:审核中;4:审核不通过;5:已上架;6:草稿;7:删除) | ||
19 | 'finish_status' => '',//完善状态(1:待完善;2:已完善) | ||
20 | 'copyright_company_id' => '',//所属公司ID int | ||
21 | 'signsubject_id' => '',//签约主体ID int | ||
22 | 'start_time' => '',//开始时间 日期+时间 | ||
23 | 'end_time' => '',//结束时间 日期+时间 | ||
24 | 'user_id' => '',//用户ID | ||
25 | 'album_id' => '',//专辑ID | ||
26 | 'song_id' => '',//作品ID | ||
27 | 'cql_id' => '',//中央曲库ID | ||
28 | ]; | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
database/icms/album-list.resp
0 → 100644
1 | array ( | ||
2 | 'list' => | ||
3 | array ( | ||
4 | 0 => | ||
5 | array ( | ||
6 | 'id' => '38113', | ||
7 | 'album_name' => 'album1', | ||
8 | 'artist_name' => 'Lear', | ||
9 | 'online_time' => '2029-07-01 00:00:00', | ||
10 | 'album_cover' => 'https://gtcp-1253428821.cos.ap-guangzhou.myqcloud.com/23e4849a4c2fc6b4271dfa726045db1d.png?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDMVQ6e0WkkV0GH3C1IK7e2B4iGZemtRv9%26q-sign-time%3D1639993142%3B1640007602%26q-key-time%3D1639993142%3B1640007602%26q-header-list%3Dhost%26q-url-param-list%3D%26q-signature%3Deaa8339844be00c6e99014b86b8bcd0da9812622', | ||
11 | 'status' => '6', | ||
12 | 'finish_status' => '2', | ||
13 | 'copyright_company' => '深圳启韵文化传媒有限公司', | ||
14 | ), | ||
15 | 1 => | ||
16 | array ( | ||
17 | 'id' => '38101', | ||
18 | 'album_name' => 'test-2', | ||
19 | 'artist_name' => '李菲儿', | ||
20 | 'online_time' => '2021-12-16 14:37:34', | ||
21 | 'album_cover' => 'https://gtcp-1253428821.cos.ap-guangzhou.myqcloud.com/4f423980d2975338b7be47f9e7156d61.jpg?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDMVQ6e0WkkV0GH3C1IK7e2B4iGZemtRv9%26q-sign-time%3D1639993142%3B1640007602%26q-key-time%3D1639993142%3B1640007602%26q-header-list%3Dhost%26q-url-param-list%3D%26q-signature%3D8be0edf30e8e9615dcab264178b65fcfd8a59410', | ||
22 | 'status' => '3', | ||
23 | 'finish_status' => '2', | ||
24 | 'copyright_company' => '深圳启韵文化传媒有限公司', | ||
25 | ), | ||
26 | 2 => | ||
27 | array ( | ||
28 | 'id' => '38100', | ||
29 | 'album_name' => 'test-2', | ||
30 | 'artist_name' => '李菲儿', | ||
31 | 'online_time' => '2021-12-16 14:37:34', | ||
32 | 'album_cover' => 'https://gtcp-1253428821.cos.ap-guangzhou.myqcloud.com/4f423980d2975338b7be47f9e7156d61.jpg?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDMVQ6e0WkkV0GH3C1IK7e2B4iGZemtRv9%26q-sign-time%3D1639993142%3B1640007602%26q-key-time%3D1639993142%3B1640007602%26q-header-list%3Dhost%26q-url-param-list%3D%26q-signature%3D8be0edf30e8e9615dcab264178b65fcfd8a59410', | ||
33 | 'status' => '3', | ||
34 | 'finish_status' => '2', | ||
35 | 'copyright_company' => '深圳启韵文化传媒有限公司', | ||
36 | ), | ||
37 | 3 => | ||
38 | array ( | ||
39 | 'id' => '38099', | ||
40 | 'album_name' => 'test-2', | ||
41 | 'artist_name' => '李菲儿', | ||
42 | 'online_time' => '2021-12-16 14:37:34', | ||
43 | 'album_cover' => 'https://gtcp-1253428821.cos.ap-guangzhou.myqcloud.com/4f423980d2975338b7be47f9e7156d61.jpg?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDMVQ6e0WkkV0GH3C1IK7e2B4iGZemtRv9%26q-sign-time%3D1639993142%3B1640007602%26q-key-time%3D1639993142%3B1640007602%26q-header-list%3Dhost%26q-url-param-list%3D%26q-signature%3D8be0edf30e8e9615dcab264178b65fcfd8a59410', | ||
44 | 'status' => '3', | ||
45 | 'finish_status' => '2', | ||
46 | 'copyright_company' => '深圳启韵文化传媒有限公司', | ||
47 | ), | ||
48 | 4 => | ||
49 | array ( | ||
50 | 'id' => '38097', | ||
51 | 'album_name' => 'test-2', | ||
52 | 'artist_name' => '李菲儿', | ||
53 | 'online_time' => '2021-12-16 14:37:34', | ||
54 | 'album_cover' => 'https://gtcp-1253428821.cos.ap-guangzhou.myqcloud.com/4f423980d2975338b7be47f9e7156d61.jpg?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDMVQ6e0WkkV0GH3C1IK7e2B4iGZemtRv9%26q-sign-time%3D1639993142%3B1640007602%26q-key-time%3D1639993142%3B1640007602%26q-header-list%3Dhost%26q-url-param-list%3D%26q-signature%3D8be0edf30e8e9615dcab264178b65fcfd8a59410', | ||
55 | 'status' => '3', | ||
56 | 'finish_status' => '2', | ||
57 | 'copyright_company' => '深圳启韵文化传媒有限公司', | ||
58 | ), | ||
59 | 5 => | ||
60 | array ( | ||
61 | 'id' => '38098', | ||
62 | 'album_name' => 'test-2', | ||
63 | 'artist_name' => '李菲儿', | ||
64 | 'online_time' => '2021-12-16 14:37:34', | ||
65 | 'album_cover' => 'https://gtcp-1253428821.cos.ap-guangzhou.myqcloud.com/4f423980d2975338b7be47f9e7156d61.jpg?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDMVQ6e0WkkV0GH3C1IK7e2B4iGZemtRv9%26q-sign-time%3D1639993142%3B1640007602%26q-key-time%3D1639993142%3B1640007602%26q-header-list%3Dhost%26q-url-param-list%3D%26q-signature%3D8be0edf30e8e9615dcab264178b65fcfd8a59410', | ||
66 | 'status' => '3', | ||
67 | 'finish_status' => '2', | ||
68 | 'copyright_company' => '深圳启韵文化传媒有限公司', | ||
69 | ), | ||
70 | 6 => | ||
71 | array ( | ||
72 | 'id' => '38092', | ||
73 | 'album_name' => 'test-2', | ||
74 | 'artist_name' => '李菲儿', | ||
75 | 'online_time' => '2021-12-16 14:37:34', | ||
76 | 'album_cover' => 'https://gtcp-1253428821.cos.ap-guangzhou.myqcloud.com/4f423980d2975338b7be47f9e7156d61.jpg?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDMVQ6e0WkkV0GH3C1IK7e2B4iGZemtRv9%26q-sign-time%3D1639993142%3B1640007602%26q-key-time%3D1639993142%3B1640007602%26q-header-list%3Dhost%26q-url-param-list%3D%26q-signature%3D8be0edf30e8e9615dcab264178b65fcfd8a59410', | ||
77 | 'status' => '3', | ||
78 | 'finish_status' => '2', | ||
79 | 'copyright_company' => '深圳启韵文化传媒有限公司', | ||
80 | ), | ||
81 | 7 => | ||
82 | array ( | ||
83 | 'id' => '38093', | ||
84 | 'album_name' => 'test-2', | ||
85 | 'artist_name' => '李菲儿', | ||
86 | 'online_time' => '2021-12-16 14:37:34', | ||
87 | 'album_cover' => 'https://gtcp-1253428821.cos.ap-guangzhou.myqcloud.com/4f423980d2975338b7be47f9e7156d61.jpg?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDMVQ6e0WkkV0GH3C1IK7e2B4iGZemtRv9%26q-sign-time%3D1639993142%3B1640007602%26q-key-time%3D1639993142%3B1640007602%26q-header-list%3Dhost%26q-url-param-list%3D%26q-signature%3D8be0edf30e8e9615dcab264178b65fcfd8a59410', | ||
88 | 'status' => '3', | ||
89 | 'finish_status' => '2', | ||
90 | 'copyright_company' => '深圳启韵文化传媒有限公司', | ||
91 | ), | ||
92 | 8 => | ||
93 | array ( | ||
94 | 'id' => '38094', | ||
95 | 'album_name' => 'test-2', | ||
96 | 'artist_name' => '李菲儿', | ||
97 | 'online_time' => '2021-12-16 14:37:34', | ||
98 | 'album_cover' => 'https://gtcp-1253428821.cos.ap-guangzhou.myqcloud.com/4f423980d2975338b7be47f9e7156d61.jpg?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDMVQ6e0WkkV0GH3C1IK7e2B4iGZemtRv9%26q-sign-time%3D1639993142%3B1640007602%26q-key-time%3D1639993142%3B1640007602%26q-header-list%3Dhost%26q-url-param-list%3D%26q-signature%3D8be0edf30e8e9615dcab264178b65fcfd8a59410', | ||
99 | 'status' => '3', | ||
100 | 'finish_status' => '2', | ||
101 | 'copyright_company' => '深圳启韵文化传媒有限公司', | ||
102 | ), | ||
103 | 9 => | ||
104 | array ( | ||
105 | 'id' => '38096', | ||
106 | 'album_name' => 'test-2', | ||
107 | 'artist_name' => '李菲儿', | ||
108 | 'online_time' => '2021-12-16 14:37:34', | ||
109 | 'album_cover' => 'https://gtcp-1253428821.cos.ap-guangzhou.myqcloud.com/4f423980d2975338b7be47f9e7156d61.jpg?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDMVQ6e0WkkV0GH3C1IK7e2B4iGZemtRv9%26q-sign-time%3D1639993142%3B1640007602%26q-key-time%3D1639993142%3B1640007602%26q-header-list%3Dhost%26q-url-param-list%3D%26q-signature%3D8be0edf30e8e9615dcab264178b65fcfd8a59410', | ||
110 | 'status' => '3', | ||
111 | 'finish_status' => '2', | ||
112 | 'copyright_company' => '深圳启韵文化传媒有限公司', | ||
113 | ), | ||
114 | ), | ||
115 | 'total' => 2509, | ||
116 | 'page' => '1', | ||
117 | ) | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
database/icms/create-shower.query.php
0 → 100644
1 | <?php | ||
2 | /** | ||
3 | * Created by PhpStorm. | ||
4 | * User: ZhangYang | ||
5 | * Date: 2021/12/20 | ||
6 | * Time: 14:58 | ||
7 | */ | ||
8 | return [ | ||
9 | 'singer_name' => '海葵测试艺人01',//艺人名 | ||
10 | 'trans_name' => '测试艺人01',//艺人翻译名 | ||
11 | 'area' => 3,//艺人活跃地区 int 0 港台; 1 内地; 2 日韩; 3 欧美; 4 其他; 5 东南亚; 6 未知; | ||
12 | 'type' => 1,//艺人类型 int 0: 男; 1: 女; 2: 组合; 3: 虚拟; 4: 其他; | ||
13 | 'singer_desc' => '海葵测试艺人01-简介',//艺人简介 | ||
14 | 'singer_photo_list' => [ | ||
15 | ['name'=>'图片1','url'=>'https://legal-test-1305250541.cos.ap-shanghai.myqcloud.com/logo/logo.png?q-sign-algorithm=sha1&q-ak=AKIDCT_ihvi7dCVjXklSUcitkOuvzUm-40NrZw0Aljp7XOLd1XZwU4LzHqizS4WQSR8B&q-sign-time=1639989345;1639992945&q-key-time=1639989345;1639992945&q-header-list=host&q-url-param-list=&q-signature=ddbebf368aee6b4f413002a4b27c93e045b5261d&x-cos-security-token=DQxyuKoPLh59NX7U7UbmtVcdPz7iAaha854bb74d0a2ea2a0939bc0227b133da6X5zte-0TxXocfdG-GF2HIRZ3HU0iYAtmnH7EHo3ELSGGJozkOhTPe5L0e1SZh6Rjxi90Q8-e-3dQJ-GzCSyu-NJnMFjfB5rMYKxYcLAE1YCCF_Yu8S64oy6o-O9TP2HbM6ZwqPdcI8JnYpcuRys9M3Of8w4bAr87K6ghv3wjpwDVcNCAC-jp8Wu_JQjRK6tb'] | ||
16 | ]//艺人图片 | ||
17 | ]; | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
database/icms/create-shower.resp
0 → 100644
database/icms/del-album.query.php
0 → 100644
database/icms/get-album.query.php
0 → 100644
database/icms/get-album.resp
0 → 100644
1 | array ( | ||
2 | 'id' => '38085', | ||
3 | 'album_name' => 'test-2', | ||
4 | 'tran_name' => NULL, | ||
5 | 'album_cover' => | ||
6 | array ( | ||
7 | 'name' => '4f423980d2975338b7be47f9e7156d61.jpg', | ||
8 | 'file_name' => '1.jpg', | ||
9 | 'url' => 'https://gtcp-1253428821.cos.ap-guangzhou.myqcloud.com/4f423980d2975338b7be47f9e7156d61.jpg?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDMVQ6e0WkkV0GH3C1IK7e2B4iGZemtRv9%26q-sign-time%3D1639993227%3B1640007687%26q-key-time%3D1639993227%3B1640007687%26q-header-list%3Dhost%26q-url-param-list%3D%26q-signature%3Dfd1ba0d43c926dce107a2a5d1df3fc11d5c1dba0', | ||
10 | ), | ||
11 | 'artist' => | ||
12 | array ( | ||
13 | 0 => | ||
14 | array ( | ||
15 | 'id' => '70914', | ||
16 | 'name' => '李菲儿', | ||
17 | ), | ||
18 | ), | ||
19 | 'album_type' => '-1', | ||
20 | 'region' => '17', | ||
21 | 'language' => '0', | ||
22 | 'album_genre' => 'Pop', | ||
23 | 'album_upc' => '', | ||
24 | 'version' => '', | ||
25 | 'brand_company' => '', | ||
26 | 'publish_time' => '2021-12-16 14:37:32', | ||
27 | 'online_time' => '2021-12-16 14:37:34', | ||
28 | 'is_number' => '2', | ||
29 | 'pre_time' => NULL, | ||
30 | 'sale_start_time' => NULL, | ||
31 | 'sale_end_time' => NULL, | ||
32 | 'price' => NULL, | ||
33 | 'auth_file' => | ||
34 | array ( | ||
35 | 0 => | ||
36 | array ( | ||
37 | 'name' => 'c7b3a1d470e8ef92779400b80064001d.jpg', | ||
38 | 'file_name' => '4.jpg', | ||
39 | 'url' => 'https://gtcp-1253428821.cos.ap-guangzhou.myqcloud.com/c7b3a1d470e8ef92779400b80064001d.jpg?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDMVQ6e0WkkV0GH3C1IK7e2B4iGZemtRv9%26q-sign-time%3D1639993227%3B1640007687%26q-key-time%3D1639993227%3B1640007687%26q-header-list%3Dhost%26q-url-param-list%3D%26q-signature%3D092133ea16e295c513e4fc6fa3851454b24d8d46', | ||
40 | ), | ||
41 | ), | ||
42 | 'album_summary' => '1111', | ||
43 | 'album_id_tme' => '50560', | ||
44 | 'album_id_cql' => '0', | ||
45 | 'copyright_company_id' => '2', | ||
46 | 'copyright_company' => '深圳启韵文化传媒有限公司', | ||
47 | 'signsubject_id' => '1', | ||
48 | 'signsubject' => '深圳启韵文化传媒有限公司', | ||
49 | 'status' => '3', | ||
50 | 'create_time' => '2021-12-20 02:31:08', | ||
51 | 'update_time' => '2021-12-20 02:31:48', | ||
52 | 'song_list' => | ||
53 | array ( | ||
54 | 0 => | ||
55 | array ( | ||
56 | 'id' => '453778', | ||
57 | 'name' => 'Matthew Lien - 布列瑟农', | ||
58 | 'subtitle' => NULL, | ||
59 | 'tran_name' => NULL, | ||
60 | 'artist' => | ||
61 | array ( | ||
62 | 0 => | ||
63 | array ( | ||
64 | 'id' => '70914', | ||
65 | 'name' => '李菲儿', | ||
66 | ), | ||
67 | ), | ||
68 | 'cd_index' => '0', | ||
69 | 'language' => '0', | ||
70 | 'album_genre' => 'Pop', | ||
71 | 'version' => '', | ||
72 | 'derive_version' => '1', | ||
73 | 'isrc' => '', | ||
74 | 'iswc' => '', | ||
75 | 'publish_time' => '2021-12-16 14:37:32', | ||
76 | 'online_time' => '2021-12-16 14:37:34', | ||
77 | 'pay_mode' => '1', | ||
78 | 'wording' => '', | ||
79 | 'composing' => '', | ||
80 | 'arranging' => '', | ||
81 | 'maker' => '', | ||
82 | 'text_lyrics' => NULL, | ||
83 | 'music' => | ||
84 | array ( | ||
85 | 'name' => '16396366694082.mp3', | ||
86 | 'file_name' => 'Matthew Lien - 布列瑟农.mp3', | ||
87 | 'url' => 'https://gtcp-1253428821.cos.ap-guangzhou.myqcloud.com/16396366694082.mp3?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDMVQ6e0WkkV0GH3C1IK7e2B4iGZemtRv9%26q-sign-time%3D1639993227%3B1640007687%26q-key-time%3D1639993227%3B1640007687%26q-header-list%3Dhost%26q-url-param-list%3D%26q-signature%3Dca0aa95a5e4bc2598da3b44203ea6e4174385b93', | ||
88 | 'tme' => | ||
89 | array ( | ||
90 | 'url' => 'http://testtmemng-30106.sz.gfp.tencent-cloud.com/cos/track/5c550007c1c72e694c882bd287530a4d/16396366694082.mp3?sign=q-sign-algorithm%3Dsha1%26q-ak%3D4fHArEE8trlnFFvFWyWaemhO%26q-sign-time%3D1639636662%3B32535187200%26q-key-time%3D1639636662%3B32535187200%26q-header-list%3Dhost%26q-url-param-list%3D%26q-signature%3Db59cb70b70f313c7cd85bc941176cff17900e46e', | ||
91 | 'file_info' => | ||
92 | array ( | ||
93 | 'audio_check' => '20', | ||
94 | 'duration' => 327920, | ||
95 | 'origin_file_name' => '16396366694082.mp3', | ||
96 | 'fileSize' => 5300161, | ||
97 | ), | ||
98 | 'file_id' => '30106|testtmemng|cos/track/5c550007c1c72e694c882bd287530a4d/16396366694082.mp3', | ||
99 | 'msg' => '', | ||
100 | 'md5' => '5c550007c1c72e694c882bd287530a4d', | ||
101 | ), | ||
102 | ), | ||
103 | 'music_tme' => '[{"name":"16396366694082.mp3","file_name":"Matthew Lien - 布列瑟农.mp3","tme":{"url":"http://testtmemng-30106.sz.gfp.tencent-cloud.com/cos/track/5c550007c1c72e694c882bd287530a4d/16396366694082.mp3?sign=q-sign-algorithm%3Dsha1%26q-ak%3D4fHArEE8trlnFFvFWyWaemhO%26q-sign-time%3D1639636662%3B32535187200%26q-key-time%3D1639636662%3B32535187200%26q-header-list%3Dhost%26q-url-param-list%3D%26q-signature%3Db59cb70b70f313c7cd85bc941176cff17900e46e","file_info":{"audio_check":"20","duration":327920,"origin_file_name":"16396366694082.mp3","fileSize":5300161},"file_id":"30106|testtmemng|cos/track/5c550007c1c72e694c882bd287530a4d/16396366694082.mp3","msg":"","md5":"5c550007c1c72e694c882bd287530a4d"}}]', | ||
104 | 'mainer' => '', | ||
105 | 'mainer_id' => NULL, | ||
106 | 'location' => '1', | ||
107 | 'tme_id' => '1634449', | ||
108 | 'cql_id' => '0', | ||
109 | 'create_time' => '2021-12-20 02:31:08', | ||
110 | 'update_time' => '2021-12-20 02:31:48', | ||
111 | 'copyright_list' => | ||
112 | array ( | ||
113 | 'original_company' => '', | ||
114 | 'auth_start_time' => '2021-12-16 00:00:00', | ||
115 | 'auth_end_time' => '2022-01-21 23:59:59', | ||
116 | 'share' => '100.00', | ||
117 | 'copyright_source' => '0', | ||
118 | 'oversea_proxy' => '2', | ||
119 | 'auth_form' => '1', | ||
120 | 'auth_transfer' => '2', | ||
121 | 'auth_relation' => '1', | ||
122 | 'type' => '1', | ||
123 | 'contract_type' => '1', | ||
124 | 'can_legal_rights' => '1', | ||
125 | 'can_cover' => '1', | ||
126 | 'auth_area' => '1', | ||
127 | ), | ||
128 | ), | ||
129 | ), | ||
130 | ) | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
database/icms/save-album.query.php
0 → 100644
1 | <?php | ||
2 | /** | ||
3 | * Created by PhpStorm. | ||
4 | * User: ZhangYang | ||
5 | * Date: 2021/12/16 | ||
6 | * Time: 14:58 | ||
7 | */ | ||
8 | return [ | ||
9 | 'id' => '', | ||
10 | 'album_name' => '海葵测试专辑01',//专辑名 | ||
11 | 'tran_name' => '测试专辑01',//翻译名称 | ||
12 | 'album_cover' => 'https://legal-test-1305250541.cos.ap-shanghai.myqcloud.com/logo/logo.png?q-sign-algorithm=sha1&q-ak=AKIDCT_ihvi7dCVjXklSUcitkOuvzUm-40NrZw0Aljp7XOLd1XZwU4LzHqizS4WQSR8B&q-sign-time=1639989345;1639992945&q-key-time=1639989345;1639992945&q-header-list=host&q-url-param-list=&q-signature=ddbebf368aee6b4f413002a4b27c93e045b5261d&x-cos-security-token=DQxyuKoPLh59NX7U7UbmtVcdPz7iAaha854bb74d0a2ea2a0939bc0227b133da6X5zte-0TxXocfdG-GF2HIRZ3HU0iYAtmnH7EHo3ELSGGJozkOhTPe5L0e1SZh6Rjxi90Q8-e-3dQJ-GzCSyu-NJnMFjfB5rMYKxYcLAE1YCCF_Yu8S64oy6o-O9TP2HbM6ZwqPdcI8JnYpcuRys9M3Of8w4bAr87K6ghv3wjpwDVcNCAC-jp8Wu_JQjRK6tb',//专辑封面url | ||
13 | 'artist' => ['15835620,海葵测试艺人01'],//所属艺人,['艺人ID-1,艺人名称-1','艺人ID-2,艺人名称-2'] | ||
14 | 'album_type' => 17,//专辑类型ID int | ||
15 | 'region' => 18,//地区 int 17: "港台"; 18: "内地"; 19: "日韩"; 20: "欧美"; 21: "其他"; 22: "东南亚"; 23: "未知"; | ||
16 | 'language' => '0,1',//语言 string,多种语言逗号分割 | ||
17 | 'album_genre' => '1|2',//专辑流派 string 单竖杠分割 | ||
18 | 'album_upc' => '',//专辑UPC | ||
19 | 'version' => '1.0',//专辑版本 | ||
20 | 'brand_company' => '',//外显厂牌公司 | ||
21 | 'publish_time' => '2022-01-01',//发行时间 | ||
22 | 'online_time' => '2022-01-01',//上线时间 | ||
23 | 'is_number' => 1,//是否数专 1.是 0.否 | ||
24 | 'pre_time' => '', | ||
25 | 'sale_start_time' => '', | ||
26 | 'sale_emd_time' => '', | ||
27 | 'price' => '1000.00', | ||
28 | 'auth_file' => 'https://legal-test-1305250541.cos.ap-shanghai.myqcloud.com/approvals/contracts/2021-10-21/1634816138676/todo.txt?q-sign-algorithm=sha1&q-ak=AKID7M9V6J5PV6ijzuYiQsA4h85V98-QqvkYYNi6GyLh0rbYRy2JpSTvMXl72OyVLSiu&q-sign-time=1639991569;1639995169&q-key-time=1639991569;1639995169&q-header-list=host&q-url-param-list=&q-signature=ff885dc6c1d999c49238ba5ec5ca795e056f86bf&x-cos-security-token=PE33cjrK617zzKIt6bWo3bdJqmbh4Xra34ee0f941ee401b0d421adc5845e83ffOQpcFK9GE2Ssby2dwXNhPd3bMeReuwI8UaPHBKS8k4jj0mrqhvI5U4_Z3bUMMcS5yaB8Cp4bU88C_6hBQ1QxGtSZJPfcnNM9i6ln4hnI87C9LtDWmRtUdfvsswpG91yqqqe_X2ZIJJ3hvf-TAjB8OGdbD7EBuQLo8tsmNp6Zf0P1u-0fpaPd2KgH4_-h1Am2', | ||
29 | 'album_summary' => '海葵测试专辑01-简介',//专辑简介 | ||
30 | 'signsubject_id' => '',//签约主体ID | ||
31 | 'song_list' => [ | ||
32 | [ | ||
33 | 'id' => 0, | ||
34 | 'hk_id' => 15,//海葵歌曲ID | ||
35 | 'name' => '想',//歌曲名 | ||
36 | 'subtitle' => '',//副标题 | ||
37 | 'tran_name' => 'Thinking', | ||
38 | 'artist' => ['15835620,海葵测试艺人01'],//所属艺人 | ||
39 | 'cd_index' => 0,//CD索引 | ||
40 | 'language' => '0,1',//语言 | ||
41 | 'album_genre' => '1|2',//专辑流派 string 单竖杠分割 | ||
42 | 'online_time' => '2022-01-01', | ||
43 | 'pay_mode' => 3, | ||
44 | 'music' => '隔离日记',//音频 name/file_name/tme | ||
45 | 'copyright_list' => [], | ||
46 | ] | ||
47 | ],//歌曲列表 | ||
48 | ]; | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
database/icms/shower-list.query.php
0 → 100644
1 | <?php | ||
2 | /** | ||
3 | * Created by PhpStorm. | ||
4 | * User: ZhangYang | ||
5 | * Date: 2021/12/20 | ||
6 | * Time: 14:58 | ||
7 | */ | ||
8 | return [ | ||
9 | 'page_size' => 10, | ||
10 | 'page' => 1, | ||
11 | 'singer_name' => '海葵',//艺人名 | ||
12 | 'area' => 3,//艺人活跃地区 int 0 港台; 1 内地; 2 日韩; 3 欧美; 4 其他; 5 东南亚; 6 未知; | ||
13 | 'type' => 1,//艺人类型 int 0: 男; 1: 女; 2: 组合; 3: 虚拟; 4: 其他; | ||
14 | ]; | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
database/icms/shower-list.resp
0 → 100644
1 | array ( | ||
2 | 'total' => 0, | ||
3 | 'list' => | ||
4 | array ( | ||
5 | 0 => | ||
6 | array ( | ||
7 | 'trans_name' => '测试艺人01', | ||
8 | 'singer_id' => 15835620, | ||
9 | 'album_list' => | ||
10 | array ( | ||
11 | ), | ||
12 | 'photo_url' => '', | ||
13 | 'singer_name' => '海葵测试艺人01', | ||
14 | 'area' => 3, | ||
15 | 'role' => '', | ||
16 | 'genre' => '', | ||
17 | 'sub_genre' => '', | ||
18 | 'type' => 1, | ||
19 | 'id' => NULL, | ||
20 | 'ffrom' => 0, | ||
21 | ), | ||
22 | ), | ||
23 | 'page' => 1, | ||
24 | ) | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
routes/icms.php
0 → 100644
1 | <?php | ||
2 | |||
3 | use Illuminate\Support\Facades\Route; | ||
4 | |||
5 | /* | ||
6 | |-------------------------------------------------------------------------- | ||
7 | | API Routes | ||
8 | |-------------------------------------------------------------------------- | ||
9 | | | ||
10 | | Here is where you can register API routes for your application. These | ||
11 | | routes are loaded by the RouteServiceProvider within a group which | ||
12 | | is assigned the "api" middleware group. Enjoy building your API! | ||
13 | | | ||
14 | */ | ||
15 | |||
16 | Route::group(['middleware'=>'throttle:100,1'], function (){ | ||
17 | Route::get('/',function(){ | ||
18 | return 'Welcome To ICMS !!'; | ||
19 | }); | ||
20 | |||
21 | Route::post('album-list','WorkController@albumList'); //专辑列表 | ||
22 | Route::post('get-album','WorkController@getAlbum'); //获取专辑详情 | ||
23 | Route::post('del-album','WorkController@delAlbum'); //删除专辑草稿 | ||
24 | Route::post('create-shower','WorkController@createShower'); //艺人创建 | ||
25 | Route::post('shower-list','WorkController@showerList'); //艺人查询 | ||
26 | |||
27 | }); |
-
Please register or sign in to post a comment