Commit 852d33ad 852d33adf5df9ad4007fcedfa4851b9b547542d9 by lemon

*

1 parent e477e4ff
......@@ -39,4 +39,13 @@ class IssueController extends Controller
return $this->issueService->forward();
}
/**
* 版权方
* @return \Illuminate\Http\JsonResponse
*/
public function subCompany()
{
return $this->issueService->subCompany();
}
}
......
......@@ -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);
}
}
......
......@@ -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'=>'.*+']);
});
......