用户信息
Showing
3 changed files
with
72 additions
and
0 deletions
1 | <?php | ||
2 | |||
3 | namespace App\Http\Controllers\Musician; | ||
4 | |||
5 | use App\Http\Controllers\Controller; | ||
6 | use App\Http\Requests\Musician\MusicianWithdrawBillConfirmRequest; | ||
7 | use App\Http\Requests\Musician\MusicianWithdrawReceiptByNameRequest; | ||
8 | use App\Http\Requests\Musician\MusicianWithdrawReceiptByNoRequest; | ||
9 | use App\Http\Requests\Musician\MusicianWithdrawReceiptRequest; | ||
10 | use App\Http\Requests\Musician\MusicianWithdrawStatusRequest; | ||
11 | use App\Services\MusicianUserService; | ||
12 | use App\Services\MusicianWithdrawService; | ||
13 | use App\Services\WithdrawService; | ||
14 | |||
15 | /** | ||
16 | * Class MusicianUserController | ||
17 | * @package App\Http\Controllers\Musician | ||
18 | */ | ||
19 | class MusicianUserController extends Controller | ||
20 | { | ||
21 | /** | ||
22 | * @var | ||
23 | */ | ||
24 | protected $musicianUserService; | ||
25 | |||
26 | /** | ||
27 | * @param MusicianUserService $musicianUserService | ||
28 | */ | ||
29 | public function __construct(MusicianUserService $musicianUserService) | ||
30 | { | ||
31 | $this->musicianUserService = $musicianUserService; | ||
32 | } | ||
33 | |||
34 | /** | ||
35 | * @return \Illuminate\Http\JsonResponse | ||
36 | */ | ||
37 | public function userInfo() | ||
38 | { | ||
39 | return $this->musicianUserService->userInfo(); | ||
40 | } | ||
41 | } |
app/Services/MusicianUserService.php
0 → 100644
1 | <?php | ||
2 | |||
3 | namespace App\Services; | ||
4 | |||
5 | use App\Helper\Response; | ||
6 | use App\Models\Legal\StakeholderBalance; | ||
7 | use App\Models\Legal\StakeholderBalanceByPayer; | ||
8 | use App\Models\Musician\AppCompany; | ||
9 | use App\Models\Musician\CashOutOrder; | ||
10 | use App\Traits\TaxReckon; | ||
11 | |||
12 | /** | ||
13 | * Class MusicianUserService | ||
14 | * @package App\Services | ||
15 | */ | ||
16 | class MusicianUserService extends Service | ||
17 | { | ||
18 | /** | ||
19 | * @return \Illuminate\Http\JsonResponse | ||
20 | */ | ||
21 | public function userInfo() | ||
22 | { | ||
23 | $user = AppCompany::query()->whereIn('company_id', $this->request->input('user_ids')) | ||
24 | ->get(['company_id', 'company_name'])->keyBy('company_id'); | ||
25 | |||
26 | return Response::success($user); | ||
27 | } | ||
28 | } |
... | @@ -24,4 +24,7 @@ Route::group([], function (){ | ... | @@ -24,4 +24,7 @@ Route::group([], function (){ |
24 | $no = json_encode(['type'=>1, 'identifier'=>$request->input('no')]); | 24 | $no = json_encode(['type'=>1, 'identifier'=>$request->input('no')]); |
25 | return \App\Helper\AesEncrypt::encrypt($no); | 25 | return \App\Helper\AesEncrypt::encrypt($no); |
26 | }); | 26 | }); |
27 | |||
28 | //获取用户 | ||
29 | Route::post('getUserName', 'MusicianUserController@userInfo'); | ||
27 | }); | 30 | }); | ... | ... |
-
Please register or sign in to post a comment