Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Cong.Zhao
/
musician-api.hikoon.com
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
852d33ad
...
852d33adf5df9ad4007fcedfa4851b9b547542d9
authored
2022-07-13 14:56:16 +0800
by
lemon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
*
1 parent
e477e4ff
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
1 deletions
app/Http/Controllers/Musician/IssueController.php
app/Services/IssueService.php
routes/api.php
app/Http/Controllers/Musician/IssueController.php
View file @
852d33a
...
...
@@ -39,4 +39,13 @@ class IssueController extends Controller
return
$this
->
issueService
->
forward
();
}
/**
* 版权方
* @return \Illuminate\Http\JsonResponse
*/
public
function
subCompany
()
{
return
$this
->
issueService
->
subCompany
();
}
}
...
...
app/Services/IssueService.php
View file @
852d33a
...
...
@@ -5,6 +5,8 @@ namespace App\Services;
use
App\Helper\AesEncrypt
;
use
App\Helper\ErrorCode
;
use
App\Helper\Response
;
use
App\Models\Legal\Stakeholder
;
use
App\Models\Legal\Subject
;
use
Illuminate\Support\Facades\Log
;
/**
...
...
@@ -44,5 +46,18 @@ class IssueService extends Service
}
}
/**
* 版权方
* @return \Illuminate\Http\JsonResponse
*/
public
function
subCompany
()
{
$company_ids
=
Stakeholder
::
query
()
->
whereIn
(
'id'
,
$this
->
stakeholder_ids
)
->
pluck
(
'company_id'
)
->
toArray
();
$subject
=
Subject
::
query
()
->
whereIn
(
'company_id'
,
$company_ids
)
->
get
([
'no as value'
,
'name'
]);
return
Response
::
success
(
$subject
);
}
}
...
...
routes/api.php
View file @
852d33a
...
...
@@ -55,7 +55,8 @@ Route::group([], function (){
//发行
Route
::
group
([
"prefix"
=>
"issue"
],
function
(){
Route
::
any
(
'{uri}'
,
'IssueController@index'
)
->
where
([
'uri'
=>
'.*+'
]);
Route
::
post
(
'/album/subCompany'
,
'IssueController@subCompany'
);
Route
::
post
(
'{uri}'
,
'IssueController@index'
)
->
where
([
'uri'
=>
'.*+'
]);
});
...
...
Please
register
or
sign in
to post a comment