Commit b1859c80 b1859c807ff7c5a3278555f5c6965346e9d047e9 by mengfan.xie

release

1 parent aa9f68ef
...@@ -13,5 +13,4 @@ npm-debug.log ...@@ -13,5 +13,4 @@ npm-debug.log
13 yarn-error.log 13 yarn-error.log
14 /.idea 14 /.idea
15 /.vscode 15 /.vscode
16 /database/icms/*.resp 16 /database/release/*.resp
17 /database/icms/*.notify
......
...@@ -12,7 +12,7 @@ class CosHelper ...@@ -12,7 +12,7 @@ class CosHelper
12 protected $client; 12 protected $client;
13 protected $bucket; 13 protected $bucket;
14 14
15 public function __construct() 15 public function __construct($bucket = null)
16 { 16 {
17 $secretId = env('COS_SECRET_ID'); //"云 API 密钥 SecretId"; 17 $secretId = env('COS_SECRET_ID'); //"云 API 密钥 SecretId";
18 $secretKey = env('COS_SECRET_KEY'); //"云 API 密钥 SecretKey"; 18 $secretKey = env('COS_SECRET_KEY'); //"云 API 密钥 SecretKey";
...@@ -26,7 +26,7 @@ class CosHelper ...@@ -26,7 +26,7 @@ class CosHelper
26 'secretKey' => $secretKey))); 26 'secretKey' => $secretKey)));
27 27
28 $this->client = $cosClient; 28 $this->client = $cosClient;
29 $this->bucket = env('COS_BUCKET'); 29 $this->bucket = $bucket ?? env('COS_BUCKET');
30 } 30 }
31 31
32 /** 32 /**
......
1 <?php
2
3 namespace App\Http\Controllers\Icms;
4
5 use App\Helper\Response;
6 use App\Jobs\HandleAlbumStatus;
7 use Illuminate\Http\Request;
8
9 class WorkController extends BaseController
10 {
11 /**
12 * 专辑列表
13 * @param Request $request
14 * @return \Illuminate\Http\JsonResponse|mixed
15 * @throws \GuzzleHttp\Exception\GuzzleException
16 */
17 public function albumList(Request $request)
18 {
19 //todo:参数验证
20 // dd(basename($request->getRequestUri()));
21 return $this->doApi('album-list');
22 }
23
24 /**
25 * 专辑提交上线库
26 * @param Request $request
27 * @return \Illuminate\Http\JsonResponse|mixed
28 * @throws \GuzzleHttp\Exception\GuzzleException
29 */
30 public function submitTme(Request $request)
31 {
32 //todo:参数验证
33 return $this->doApi('submit-tme');
34 }
35
36 /**
37 * 获取专辑详情
38 * @param Request $request
39 * @return \Illuminate\Http\JsonResponse|mixed
40 * @throws \GuzzleHttp\Exception\GuzzleException
41 */
42 public function getAlbum(Request $request)
43 {
44 //todo:数据验证
45 return $this->doApi('get-album');
46 }
47
48 /**
49 * 删除专辑草稿(含批量)<草稿接口目前弃用,所以不存在删除了>
50 * @param Request $request
51 * @return \Illuminate\Http\JsonResponse|mixed
52 * @throws \GuzzleHttp\Exception\GuzzleException
53 */
54 // public function delAlbum(Request $request)
55 // {
56 // return $this->doApi('del-album');
57 // }
58
59 /**
60 * 艺人查询
61 * @param Request $request
62 * @return \Illuminate\Http\JsonResponse|mixed
63 * @throws \GuzzleHttp\Exception\GuzzleException
64 */
65 public function showerList(Request $request)
66 {
67 //todo:参数验证
68 return $this->doApi('shower-list');
69 }
70
71 /**
72 * 创建艺人
73 * @param Request $request
74 * @return \Illuminate\Http\JsonResponse|mixed
75 * @throws \GuzzleHttp\Exception\GuzzleException
76 */
77 public function createShower(Request $request)
78 {
79 //todo: 待数据实现
80 return $this->doApi('create-shower');
81 }
82
83 /**
84 * 候选人列表
85 * @param Request $request
86 * @return \Illuminate\Http\JsonResponse|mixed
87 * @throws \GuzzleHttp\Exception\GuzzleException
88 */
89 public function getLeaders(Request $request)
90 {
91 //todo:参数验证
92 return $this->doApi('get-leaders');
93 }
94
95 /**
96 * 检查作品重复
97 * @param Request $request
98 * @return \Illuminate\Http\JsonResponse|mixed
99 * @throws \GuzzleHttp\Exception\GuzzleException
100 */
101 public function checkRepeat(Request $request)
102 {
103 //todo:参数验证
104 return $this->doApi('check-repeat');
105 }
106
107 /**
108 * 原始版权公司列表
109 * @param Request $request
110 * @return \Illuminate\Http\JsonResponse|mixed
111 * @throws \GuzzleHttp\Exception\GuzzleException
112 */
113 public function originalCompany(Request $request)
114 {
115 //todo:参数验证
116 return $this->doApi('original-company');
117 }
118
119 /**
120 * 作品录入文件上传
121 * @param Request $request
122 * @return \Illuminate\Http\JsonResponse|mixed
123 * @throws \GuzzleHttp\Exception\GuzzleException
124 */
125 public function workFile(Request $request)
126 {
127 //todo:参数验证
128 return $this->doApi('work-file');
129 }
130
131 /**
132 * 获取授权主体列表
133 * @param Request $request
134 * @return \Illuminate\Http\JsonResponse|mixed
135 * @throws \GuzzleHttp\Exception\GuzzleException
136 */
137 public function signSubject(Request $request)
138 {
139 //todo:参数验证
140 return $this->doApi('sign-subject');
141 }
142
143 /**
144 * 异步通知专辑上架信息
145 * @param Request $request
146 * @return \Illuminate\Http\JsonResponse
147 */
148 public function albumStatus(Request $request)
149 {
150 $callData = $request->only(['album_id','tme_album_id','album_status','song_id','timestamp']);
151 $callSign = $request->post('sign');
152 $callCpId = $request->post('cp_id');
153 if ($callCpId !== $this->cp_id) {
154 return Response::error(40001,'没有请求权限!');
155 }
156 //验签
157 $signData = $this->signData($callData);
158 if ($callSign !== $signData['sign']) {
159 return Response::error(40003,'签名鉴权未通过!');
160 }
161
162 //入队批量处理业务(暂时只保存请求数据)
163 HandleAlbumStatus::dispatch($callData)->onQueue('handle-album-status');
164 return response()->json(['code' => 200,'data' => true,'message' => 'OK']);
165 }
166 }
1 <?php 1 <?php
2 2
3 namespace App\Http\Controllers\Icms; 3 namespace App\Http\Controllers\Release;
4 4
5 use App\Helper\Response; 5 use App\Helper\Response;
6 use App\Http\Controllers\Controller; 6 use App\Http\Controllers\Controller;
...@@ -13,67 +13,63 @@ class BaseController extends Controller ...@@ -13,67 +13,63 @@ class BaseController extends Controller
13 * 基础变量 13 * 基础变量
14 * @var string 14 * @var string
15 */ 15 */
16 protected $domain, $cp_id; 16 protected $domain, $appId;
17 private $key; 17 private $appSecret;
18 18
19 public function __construct() 19 public function __construct()
20 { 20 {
21 $this->domain = env('ICMS_DOMAIN','https://mgw-uat.tencentmusic.com/icms/sit-api'); 21 $this->domain = env('TME_DOMAIN','https://openapi-sit.tencentmusic.com');
22 $this->cp_id = env('ICMS_CPID','7389'); 22 $this->appId = env('TME_APPID','47820741');
23 $this->key = env('ICMS_KEY','50d74110004d94605d12c241eeafee27'); 23 $this->appSecret = env('TME_APPSECRET','nPWFDDHKYCP4bUzoq9zyaJQx4ltQqMSs');
24 } 24 }
25 25
26 /** 26 /**获取accessToken
27 * 签名需要,递归处理子数组中Int型数字转换成字符串 27 *
28 * @param array $array
29 * @return array
30 */ 28 */
31 private function handleSubArrayNumber(array $array) 29 function getToken()
32 { 30 {
33 foreach ($array as $k=>$v) { 31 $url = rtrim($this->domain,'/').'/oauth2/token';
34 if (is_array($v)) { 32 $data = ['appId'=>$this->appId,'appSecret'=>$this->appSecret];
35 $array[$k] = $this->handleSubArrayNumber($v); 33 try {
34 $client = new Client(['verify'=>false]); //实体公钥['verify'=>'/path/to/public.pem']
35 $response = $client->request('POST', $url, ['json' => $data]);
36
37 $respArr = json_decode($response->getBody()->getContents(), true);
38 Log::channel('api')->info(__METHOD__, $respArr);
39 if (200 !== $respArr['code']) {
40 return null;
36 } else { 41 } else {
37 if (is_numeric($v) && is_int($v)) { 42 return $respArr['data'];
38 $array[$k] = (string)$v;
39 }
40 } 43 }
44 } catch (\Exception $e) {
45 Log::channel('api')->error(__METHOD__, ['msg'=>$e->getMessage()]);
46 return null;
41 } 47 }
42 return $array; 48
43 } 49 }
44 50
45 /** 51 /** ascii码从小到大排序
46 * 获取签名和去空的参数 52 * @param array $params
47 * @param array $array 53 * @return bool|string
48 * @return array
49 */ 54 */
50 protected function signData(array $array) 55 function ascSort($params = array())
51 { 56 {
52 $common_params = [ 57 if (!empty($params)) {
53 'cp_id' => $this->cp_id 58 $p = ksort($params);
54 ]; 59 if ($p) {
55 $param_arr = array_merge($common_params,$array); 60 $str = '';
56 ksort($param_arr); 61 foreach ($params as $k => $val) {
57 $params = ''; 62 $str .= $k . '=' . $val . '&';
58 $signData = []; 63 }
59 foreach ($param_arr as $k=>$v) 64 $strs = rtrim($str, '&');
60 { 65 return $strs;
61 if ('' === $v || null === $v || [] === $v) {
62 continue;
63 } if (is_array($v)) {
64 $params .= $k . '=' . json_encode($this->handleSubArrayNumber($v)) . '&';
65 } else {
66 $params .= $k . '=' . $v . '&';
67 } 66 }
68 $signData[$k] = $v;
69 } 67 }
70 $params = trim($params,'&'); 68 return false;
71 $signData['sign'] = strtoupper(md5($params.$this->key));
72 return $signData;
73 } 69 }
74 70
75 /** 71 /**
76 * 重组请求数据 72 * 重组请求数据,返回headers和json
77 * @param string $uri 73 * @param string $uri
78 * @param array $reqData 74 * @param array $reqData
79 * @param bool $isLocal 75 * @param bool $isLocal
...@@ -82,12 +78,17 @@ class BaseController extends Controller ...@@ -82,12 +78,17 @@ class BaseController extends Controller
82 private function requestData(string $uri, array $reqData, bool $isLocal = true) 78 private function requestData(string $uri, array $reqData, bool $isLocal = true)
83 { 79 {
84 if ($isLocal) { 80 if ($isLocal) {
85 $data_file = database_path('Icms/'.$uri.'.query.php'); 81 $data_file = database_path('Release/'.$uri.'.query.php');
86 $params = include("$data_file"); 82 $params = include("$data_file");
87 } else { 83 } else {
88 $params = $reqData; 84 $params = $reqData;
89 } 85 }
90 $params['timestamp'] = time(); 86 $heaers['appId'] = $this->appId;
87 $heaers['accessToken'] = $this->appId;
88 $heaers['timestamp'] = (string)date('YmdHis');
89 $heaers['signMethod'] = 'md5';
90 $heaers['sign'] = 'md5';
91 $heaers['traceId'] = 'md5';
91 return $this->signData($params); 92 return $this->signData($params);
92 } 93 }
93 94
...@@ -119,7 +120,7 @@ class BaseController extends Controller ...@@ -119,7 +120,7 @@ class BaseController extends Controller
119 if (200 !== $respArr['code']) { 120 if (200 !== $respArr['code']) {
120 return Response::error(-1,$respArr['msg'] ?? '操作失败'); 121 return Response::error(-1,$respArr['msg'] ?? '操作失败');
121 } else { 122 } else {
122 $response_file = database_path('icms/' . $uri . '.resp'); 123 $response_file = database_path('release/' . $uri . '.resp');
123 file_put_contents($response_file, var_export($respArr['data'],true)); 124 file_put_contents($response_file, var_export($respArr['data'],true));
124 return Response::success($respArr['data']); 125 return Response::success($respArr['data']);
125 } 126 }
...@@ -128,4 +129,56 @@ class BaseController extends Controller ...@@ -128,4 +129,56 @@ class BaseController extends Controller
128 return Response::error(-1,'接口请求失败!'); 129 return Response::error(-1,'接口请求失败!');
129 } 130 }
130 } 131 }
132
133
134
135 /**
136 * 签名需要,递归处理子数组中Int型数字转换成字符串
137 * @param array $array
138 * @return array
139 */
140 private function handleSubArrayNumber(array $array)
141 {
142 foreach ($array as $k=>$v) {
143 if (is_array($v)) {
144 $array[$k] = $this->handleSubArrayNumber($v);
145 } else {
146 if (is_numeric($v) && is_int($v)) {
147 $array[$k] = (string)$v;
148 }
149 }
150 }
151 return $array;
152 }
153
154 /**
155 * 获取签名和去空的参数
156 * @param array $array
157 * @return array
158 */
159 protected function signData(array $array)
160 {
161 $common_params = [
162 'cp_id' => $this->cp_id
163 ];
164 $param_arr = array_merge($common_params,$array);
165 ksort($param_arr);
166 $params = '';
167 $signData = [];
168 foreach ($param_arr as $k=>$v)
169 {
170 if ('' === $v || null === $v || [] === $v) {
171 continue;
172 } if (is_array($v)) {
173 $params .= $k . '=' . json_encode($this->handleSubArrayNumber($v)) . '&';
174 } else {
175 $params .= $k . '=' . $v . '&';
176 }
177 $signData[$k] = $v;
178 }
179 $params = trim($params,'&');
180 $signData['sign'] = strtoupper(md5($params.$this->key));
181 return $signData;
182 }
183
131 } 184 }
......
1 <?php
2
3 namespace App\Http\Controllers\Release;
4
5 use App\Helper\Response;
6 use App\Jobs\HandleAlbumStatus;
7 use Illuminate\Http\Request;
8
9 class WorkController extends BaseController
10 {
11 /**
12 * 专辑列表
13 * @param Request $request
14 * @return \Illuminate\Http\JsonResponse|mixed
15 * @throws \GuzzleHttp\Exception\GuzzleException
16 */
17 public function albumList(Request $request)
18 {
19 //todo:参数验证
20 // dd(basename($request->getRequestUri()));
21 return $this->doApi('album-list');
22 }
23
24 }
1 <?php
2
3 namespace App\Jobs;
4
5 use Illuminate\Bus\Queueable;
6 use Illuminate\Contracts\Queue\ShouldQueue;
7 use Illuminate\Foundation\Bus\Dispatchable;
8 use Illuminate\Queue\InteractsWithQueue;
9 use Illuminate\Queue\SerializesModels;
10
11 class HandleAlbumStatus implements ShouldQueue
12 {
13 use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
14
15 private $callData = [];
16
17 /**
18 * Create a new job instance.
19 * @param array $callData
20 * @return void
21 */
22 public function __construct(array $callData)
23 {
24 $this->callData = $callData;
25 }
26
27 /**
28 * Execute the job.
29 *
30 * @return void
31 */
32 public function handle()
33 {
34 //php artisan queue:work --queue=handle-album-status --tries=3 --sleep=3
35
36 $response_file = database_path('icms/album-status.notify');
37 file_put_contents($response_file,
38 '======接收回调数据在'.date('Y-m-n H:i:s').'======'. PHP_EOL
39 .var_export($this->callData,true). PHP_EOL,FILE_APPEND);
40 }
41
42 /**
43 * @param null $exception
44 */
45 public function fail($exception = null)
46 {
47 //todo: Artisan创建任务失败记录表
48 }
49 }
...@@ -55,10 +55,10 @@ class RouteServiceProvider extends ServiceProvider ...@@ -55,10 +55,10 @@ class RouteServiceProvider extends ServiceProvider
55 ->namespace($this->namespace) 55 ->namespace($this->namespace)
56 ->group(base_path('routes/web.php')); 56 ->group(base_path('routes/web.php'));
57 57
58 //icms 58 //发行接口
59 Route::prefix('icms') 59 Route::prefix('release')
60 ->namespace($this->namespace . '\Icms') 60 ->namespace($this->namespace . '\Release')
61 ->group(base_path('routes/icms.php')); 61 ->group(base_path('routes/release.php'));
62 }); 62 });
63 } 63 }
64 64
......
1 <?php
2 return [
3 'page_size' => 10,
4 'page' => 1,
5 'song_name' => 'Matthew',//歌曲名
6 'album_name' => 'test-2',//专辑名
7 'song_type' => '-1',//专辑类型 int
8 'song_genre' => '1',//专辑流派 int
9 'artist_name' => '李菲',//艺人名
10 'region' => '17',//地区 int 17: "港台"; 18: "内地"; 19: "日韩"; 20: "欧美"; 21: "其他"; 22: "东南亚"; 23: "未知";
11 'language' => '0',//语言 int
12 'status' => '',//状态(0:隐藏;1:待上架;2:已下架;3:审核中;4:审核不通过;5:已上架;6:草稿;7:删除)
13 'finish_status' => '2',//完善状态(1:待完善;2:已完善)
14 'copyright_company_id' => '2',//所属公司ID int
15 'signsubject_id' => '1',//签约主体ID int
16 'start_time' => '2021-12-20',//开始时间 日期
17 'end_time' => '2021-12-21',//结束时间 日期
18 'user_id' => '',//用户ID
19 'album_id' => '38085',//专辑ID
20 'song_id' => '453778',//作品ID
21 'cql_id' => '0',//中央曲库ID
22 ];
...\ No newline at end of file ...\ No newline at end of file
1 <?php
2 return [
3 'check' => [
4 'id' => '',//作品ID string
5 'name' => '',//作品名称
6 'album_name' => '',//专辑名
7 'artist' => '',//艺人ID string
8 'composting' => '',//曲作者
9 'wording' => '',//词作者
10 'original_company' => '',//原始版权公司
11 'version' => '',//作品版本
12 ]
13 ];
...\ No newline at end of file ...\ No newline at end of file
1 <?php
2 return [
3 'id' => 38085
4 ];
...\ No newline at end of file ...\ No newline at end of file
1 <?php
2 return [];
...\ No newline at end of file ...\ No newline at end of file
1 <?php
2 return [];
...\ No newline at end of file ...\ No newline at end of file
1 <?php
2 return [
3 'page_size' => 10,
4 'page' => 1,
5 'singer_name' => '海葵测试艺人02',//艺人名
6 'area' => 5,//艺人活跃地区 int 0 港台; 1 内地; 2 日韩; 3 欧美; 4 其他; 5 东南亚; 6 未知;
7 'type' => 2,//艺人类型 int 0: 男; 1: 女; 2: 组合; 3: 虚拟; 4: 其他;
8 ];
...\ No newline at end of file ...\ No newline at end of file
1 <?php
2 return [
3 'page_size' => 10,
4 'page' => 1,
5 'name' => '启韵'//授权主体名称
6 ];
...\ No newline at end of file ...\ No newline at end of file
1 <?php
2 return [
3 'id' => 37968,
4 'album_name' => '海葵测试专辑01',//专辑名
5 'tran_name' => '测试专辑01',//翻译名称
6 '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
7 'artist' => ['15835620,海葵测试艺人01'],//所属艺人,['艺人ID-1,艺人名称-1','艺人ID-2,艺人名称-2']
8 'album_type' => 17,//专辑类型ID int
9 'region' => 18,//地区 int 17: "港台"; 18: "内地"; 19: "日韩"; 20: "欧美"; 21: "其他"; 22: "东南亚"; 23: "未知";
10 'language' => '0,1',//语言 string,多种语言逗号分割
11 'album_genre' => 'Children\'s|Country',//专辑流派 string 单竖杠分割
12 'album_upc' => '',//专辑UPC
13 'version' => '1.0',//专辑版本
14 'brand_company' => '',//外显厂牌公司
15 'publish_time' => '2022-01-01',//发行时间
16 'online_time' => '2022-01-01',//上线时间
17 'is_number' => 1,//是否数专 1.是 0.否
18 'pre_time' => '',//预售时间
19 'sale_start_time' => '2022-01-02',//开卖时间
20 'sale_end_time' => '2022-01-15',//售卖结束时间
21 'price' => '1000.00',//售卖价格
22 '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',
23 'album_summary' => '海葵测试专辑01-简介',//专辑简介
24 'signsubject_id' => 1,//签约主体ID
25 'song_list' => [
26 [
27 'id' => 100,
28 'external_id' => '',//外部歌曲ID - 海葵歌曲ID?
29 'name' => '想',//歌曲名
30 'subtitle' => '',//副标题
31 'tran_name' => 'Thinking',
32 'artist' => ['15835620,海葵测试艺人01'],//所属艺人
33 'cd_index' => 0,//CD索引
34 'language' => '0,1',//语言
35 'album_genre' => 'Children\'s|Country',//专辑流派 string 单竖杠分割
36 'version' => '1.0',//版本
37 'derive_version' => 1,//衍生版本1.非 2.是
38 'isrc' => '',//ISRC编号
39 'iswc' => '',//ISWC编号
40 'publish_time' => '',//发行时间
41 'online_time' => '2022-01-01',//上线时间
42 'pay_mode' => 3,//付费模式 1: "免费"; 3: "付费 1.0"; 5: "付费 2.0";10: "付费 3.0"; 14: "数字专辑";
43 'wording' => '',//作词
44 'composing' => '',//作曲
45 'arranging' => '',//编曲
46 'maker' => '',//制作人
47 'text_lyrics' => '',//文本歌词url
48 'music' => '隔离日记',//音频 name/file_name/tme
49 'mainer' => '',//负责人
50 'location' => 1,//排序 默认1-升序
51 'copyright_list' => [
52 'original_company' => '盛彩霓虹',//原始版权公司
53 'auth_start_time' => '2022-01-01',//授权开始时间
54 'auth_end_time' => '2022-01-05',//授权结束时间
55 'share' => 100,//份额,默认100
56 'copyright_source' => 1216808,//版权来源 int
57 'oversea_proxy' => 2,//海外总代理 1.是 2.否
58 'auth_area' => '1,2',//授权区域ID拼串(1: "中国大陆"; 2: "中国香港"; 3: "中国台湾"; 4: "中国澳门"; 5: "马来西亚"; 6: "泰国"; 7: "印尼"; 8: "亚洲地区"; 9: "全世界"; 10: "南非"; 11: "缅甸"; 12: "菲律宾"; 13: "印度"; 14: "新加波"; 15: "越南"; 16: "文莱";)
59 'auth_from' => 1,//授权形式1.非总代 2.总代
60 'auth_transfer' => 1,//可否转授权1.可转 2.不可转
61 'auth_relation' => 1,//授权关系1.自有 2.代理
62 'contract_type' => 2,//签约类型1.未确定 2.词曲签约 3.录音自带词曲
63 'can_legal_rights' => 2,//可维权1.未确定 2.可维权 3.不可维权
64 'can_cover' => 2//可翻唱1.否2.是
65 ],//录音版权,必填
66 'word_copyright_list' => [
67 'original_company' => '盛彩霓虹',//原始版权公司
68 'auth_start_time' => '2022-01-01',//授权开始时间
69 'auth_end_time' => '2022-01-05',//授权结束时间
70 'share' => 100,//份额,默认100
71 'copyright_source' => 1216808,//版权来源 int
72 'oversea_proxy' => 2,//海外总代理 1.是 2.否
73 'auth_area' => '1,2',//授权区域ID拼串(1: "中国大陆"; 2: "中国香港"; 3: "中国台湾"; 4: "中国澳门"; 5: "马来西亚"; 6: "泰国"; 7: "印尼"; 8: "亚洲地区"; 9: "全世界"; 10: "南非"; 11: "缅甸"; 12: "菲律宾"; 13: "印度"; 14: "新加波"; 15: "越南"; 16: "文莱";)
74 'auth_from' => 1,//授权形式1.非总代 2.总代
75 'auth_transfer' => 1,//可否转授权1.可转 2.不可转
76 'auth_relation' => 1,//授权关系1.自有 2.代理
77 'contract_type' => 2,//签约类型1.未确定 2.词曲签约 3.录音自带词曲
78 'can_legal_rights' => 2,//可维权1.未确定 2.可维权 3.不可维权
79 'can_cover' => 2//可翻唱1.否2.是
80 ],//词版权,非必填
81 'music_copyright_list' => [
82 'original_company' => '盛彩霓虹',//原始版权公司
83 'auth_start_time' => '2022-01-01',//授权开始时间
84 'auth_end_time' => '2022-01-05',//授权结束时间
85 'share' => 100,//份额,默认100
86 'copyright_source' => 1216808,//版权来源 int
87 'oversea_proxy' => 2,//海外总代理 1.是 2.否
88 'auth_area' => '1,2',//授权区域ID拼串(1: "中国大陆"; 2: "中国香港"; 3: "中国台湾"; 4: "中国澳门"; 5: "马来西亚"; 6: "泰国"; 7: "印尼"; 8: "亚洲地区"; 9: "全世界"; 10: "南非"; 11: "缅甸"; 12: "菲律宾"; 13: "印度"; 14: "新加波"; 15: "越南"; 16: "文莱";)
89 'auth_from' => 1,//授权形式1.非总代 2.总代
90 'auth_transfer' => 1,//可否转授权1.可转 2.不可转
91 'auth_relation' => 1,//授权关系1.自有 2.代理
92 'contract_type' => 2,//签约类型1.未确定 2.词曲签约 3.录音自带词曲
93 'can_legal_rights' => 2,//可维权1.未确定 2.可维权 3.不可维权
94 'can_cover' => 2//可翻唱1.否2.是
95 ],//曲版权,非必填
96 ],//第一首歌
97 ]//歌曲列表
98 ];
...\ No newline at end of file ...\ No newline at end of file
1 <?php
2 return [
3 'url' => 'https://legal-test-1305250541.cos.ap-shanghai.myqcloud.com/songs/2021-11-02/1635844641790/SampleAudio_0.4mb.mp3?q-sign-algorithm=sha1&q-ak=AKIDLXEc4MFdcbD8hQI83APTKBol2M7bnosWJE_lXLmbd9iIvvgCHc22oujfljkaEGCk&q-sign-time=1640333764;1640337364&q-key-time=1640333764;1640337364&q-header-list=host&q-url-param-list=&q-signature=faa2e8aa4aeb0a620fbd01fe260e1ddaf420f59a&x-cos-security-token=FH5uhvOyDD26khjUB4X1GT4jZ12zRJQa995d599f25b15043c686a8524fb3b03bmWdBhvHtbIE0A3NvbXiGS082VtNZJkFJVK_qAH94xHALfv3_WQmTC0wUUx-HvPr2UgG4D0bo7QRD2OVxg5hCN4sG_PtfjKL8KIsy3wSGzh4Fr7mrHwkKi32Bb72vxsUypdLyVF_z7UmBOggUiuBwdiNQJom0fAFbu3lFipxgeX56JRdkK3JOnpDDWMZ6Zv9t'//海葵方可访问的对外链接
4 ];
...\ No newline at end of file ...\ No newline at end of file
...@@ -12,28 +12,21 @@ use Illuminate\Support\Facades\Route; ...@@ -12,28 +12,21 @@ use Illuminate\Support\Facades\Route;
12 | is assigned the "api" middleware group. Enjoy building your API! 12 | is assigned the "api" middleware group. Enjoy building your API!
13 | 13 |
14 */ 14 */
15 Route::get('/',function(){
16 return 'Welcome To Release Api !!!';
17 });
15 18
16 Route::group(['middleware'=>'throttle:60,1'], function (){ 19 /**
17 Route::get('/',function(){ 20 * Tme接口
18 return 'Welcome To ICMS !!'; 21 */
19 }); 22 Route::group(['middleware'=>'throttle:60,1','prefix'=> 'tme'], function (){
20 23
21 /** 24 Route::post('album-list','WorkController@albumList'); //搜索歌手接口
22 * 主动请求 25 Route::post('submit-tme','WorkController@submitTme'); //上传接口
23 */ 26 Route::post('sign-subject','WorkController@signSubject'); //查询原始版权方接口
24 Route::post('album-list','WorkController@albumList'); //专辑列表 27 Route::post('get-album','WorkController@getAlbum'); //提交发行接口
25 Route::post('submit-tme','WorkController@submitTme'); //专辑上线 28 Route::post('create-shower','WorkController@createShower'); //查询发行的歌曲tmeId列表接口
26 Route::post('get-album','WorkController@getAlbum'); //获取专辑详情
27 Route::post('create-shower','WorkController@createShower'); //艺人创建
28 Route::post('shower-list','WorkController@showerList'); //艺人查询
29 Route::post('get-leaders','WorkController@getLeaders'); //查询候选负责人
30 Route::post('check-repeat','WorkController@checkRepeat'); //作品重复检测
31 Route::post('original-company','WorkController@originalCompany'); //原始版权公司列表
32 Route::post('work-file','WorkController@workFile'); //作品录入文件上传
33 Route::post('sign-subject','WorkController@signSubject'); //获取授权主体列表
34 29
35 /** 30
36 * 回调通知接收 31
37 */ 32 });
38 Route::post('notify-album-status','WorkController@albumStatus');
39 });
......