Commit eea64568 eea645688d11e97514650023351959cddc567063 by lemon

*

1 parent 3cdde2db
......@@ -22,7 +22,6 @@ class MusicianAgreementController extends Controller
*/
public function __construct(MusicianAgreementService $musicianAgreementService)
{
var_dump(__METHOD__);
$this->musicianAgreementService = $musicianAgreementService;
}
......
......@@ -37,7 +37,7 @@ class MusicianAgreementService extends Service
/**
* 我的合约列表
* @return \Psr\Http\Message\ResponseInterface
* @return \Illuminate\Http\JsonResponse
*/
public function agreementList()
{
......
......@@ -21,7 +21,7 @@ class MusicianIncomeService extends Service
$start_month = $this->request->input('start', date('Ym', strtotime('-6 month')));
$end_month = $this->request->input('end', date('Ym', strtotime('-1 month')));
$res = StakeholderSongCollate::query()->custom($this->request->inputs(['song_id']))->identify()
$res = StakeholderSongCollate::query()->custom($this->request->only(['song_id']))->identify()
->groupBy('month')->orderBy('month')->selectRaw('month, sum(share_amount) as income')->get()->toArray();
$stat_income = [];
......@@ -41,7 +41,7 @@ class MusicianIncomeService extends Service
public function billCollate()
{
$collate = $detail = $contract_ids = [];
StakeholderSongCollate::query()->custom($this->request->inputs(['song_id']))->identify()
StakeholderSongCollate::query()->custom($this->request->only(['song_id']))->identify()
->orderByDesc('month')->each(function ($item) use (&$collate, &$detail, &$contract_ids){
$key = "{$item->month}|{$item->channel}";
if (!isset($detail[$key])) {
......@@ -91,7 +91,7 @@ class MusicianIncomeService extends Service
{
$cooperation_types = $detail = [];
StakeholderSongCollate::query()->with(['song:id,name,singer', 'contract:id,cooperation_type'])->custom($this->request->inputs(['month', 'channel']))->identify()
StakeholderSongCollate::query()->with(['song:id,name,singer', 'contract:id,cooperation_type'])->custom($this->request->only(['month', 'channel']))->identify()
->select(['id', 'song_id', 'month', 'contract_id', 'deduct_amount', 'real_share_amount'])
->each(function ($item) use (&$cooperation_types, &$detail){
......