Commit b90c34d9 b90c34d9bf0cff396a3b3a4de36e5bab0e7a8199 by lemon

显示类型id

1 parent 23649692
...@@ -31,4 +31,13 @@ class MusicianUserController extends Controller ...@@ -31,4 +31,13 @@ class MusicianUserController extends Controller
31 { 31 {
32 return $this->musicianUserService->userInfo(); 32 return $this->musicianUserService->userInfo();
33 } 33 }
34
35 /**
36 * @return mixed
37 */
38 public function getCompanyByName()
39 {
40 return $this->musicianUserService->getCompanyByName();
41 }
42
34 } 43 }
......
...@@ -28,4 +28,14 @@ class MusicianUserService extends Service ...@@ -28,4 +28,14 @@ class MusicianUserService extends Service
28 28
29 return Response::success($user); 29 return Response::success($user);
30 } 30 }
31
32 /**
33 * 通过名字获取公司信息
34 * @return \Illuminate\Http\JsonResponse
35 */
36 public function getCompanyByName()
37 {
38 $ids = AppCompany::query()->whereIn('company_name', $this->request->input('name'))->pluck('company_id')->toArray();
39 return Response::success(['company_ids'=>$ids]);
40 }
31 } 41 }
......
...@@ -27,4 +27,9 @@ Route::group([], function (){ ...@@ -27,4 +27,9 @@ Route::group([], function (){
27 27
28 //获取用户 28 //获取用户
29 Route::post('getUserName', 'MusicianUserController@userInfo'); 29 Route::post('getUserName', 'MusicianUserController@userInfo');
30 //获取用户信息
31 Route::post('getCompanyByName', 'MusicianUserController@getCompanyByName');
32
33
34
30 }); 35 });
......