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
b90c34d9
...
b90c34d9bf0cff396a3b3a4de36e5bab0e7a8199
authored
2022-12-07 17:01:05 +0800
by
lemon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
显示类型id
1 parent
23649692
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
0 deletions
app/Http/Controllers/Admin/MusicianUserController.php
app/Services/MusicianUserService.php
routes/admin.php
app/Http/Controllers/Admin/MusicianUserController.php
View file @
b90c34d
...
...
@@ -31,4 +31,13 @@ class MusicianUserController extends Controller
{
return
$this
->
musicianUserService
->
userInfo
();
}
/**
* @return mixed
*/
public
function
getCompanyByName
()
{
return
$this
->
musicianUserService
->
getCompanyByName
();
}
}
...
...
app/Services/MusicianUserService.php
View file @
b90c34d
...
...
@@ -28,4 +28,14 @@ class MusicianUserService extends Service
return
Response
::
success
(
$user
);
}
/**
* 通过名字获取公司信息
* @return \Illuminate\Http\JsonResponse
*/
public
function
getCompanyByName
()
{
$ids
=
AppCompany
::
query
()
->
whereIn
(
'company_name'
,
$this
->
request
->
input
(
'name'
))
->
pluck
(
'company_id'
)
->
toArray
();
return
Response
::
success
([
'company_ids'
=>
$ids
]);
}
}
...
...
routes/admin.php
View file @
b90c34d
...
...
@@ -27,4 +27,9 @@ Route::group([], function (){
//获取用户
Route
::
post
(
'getUserName'
,
'MusicianUserController@userInfo'
);
//获取用户信息
Route
::
post
(
'getCompanyByName'
,
'MusicianUserController@getCompanyByName'
);
});
...
...
Please
register
or
sign in
to post a comment