*
Showing
3 changed files
with
4 additions
and
5 deletions
| ... | @@ -22,7 +22,6 @@ class MusicianAgreementController extends Controller | ... | @@ -22,7 +22,6 @@ class MusicianAgreementController extends Controller |
| 22 | */ | 22 | */ |
| 23 | public function __construct(MusicianAgreementService $musicianAgreementService) | 23 | public function __construct(MusicianAgreementService $musicianAgreementService) |
| 24 | { | 24 | { |
| 25 | var_dump(__METHOD__); | ||
| 26 | $this->musicianAgreementService = $musicianAgreementService; | 25 | $this->musicianAgreementService = $musicianAgreementService; |
| 27 | } | 26 | } |
| 28 | 27 | ... | ... |
| ... | @@ -37,7 +37,7 @@ class MusicianAgreementService extends Service | ... | @@ -37,7 +37,7 @@ class MusicianAgreementService extends Service |
| 37 | 37 | ||
| 38 | /** | 38 | /** |
| 39 | * 我的合约列表 | 39 | * 我的合约列表 |
| 40 | * @return \Psr\Http\Message\ResponseInterface | 40 | * @return \Illuminate\Http\JsonResponse |
| 41 | */ | 41 | */ |
| 42 | public function agreementList() | 42 | public function agreementList() |
| 43 | { | 43 | { | ... | ... |
| ... | @@ -21,7 +21,7 @@ class MusicianIncomeService extends Service | ... | @@ -21,7 +21,7 @@ class MusicianIncomeService extends Service |
| 21 | $start_month = $this->request->input('start', date('Ym', strtotime('-6 month'))); | 21 | $start_month = $this->request->input('start', date('Ym', strtotime('-6 month'))); |
| 22 | $end_month = $this->request->input('end', date('Ym', strtotime('-1 month'))); | 22 | $end_month = $this->request->input('end', date('Ym', strtotime('-1 month'))); |
| 23 | 23 | ||
| 24 | $res = StakeholderSongCollate::query()->custom($this->request->inputs(['song_id']))->identify() | 24 | $res = StakeholderSongCollate::query()->custom($this->request->only(['song_id']))->identify() |
| 25 | ->groupBy('month')->orderBy('month')->selectRaw('month, sum(share_amount) as income')->get()->toArray(); | 25 | ->groupBy('month')->orderBy('month')->selectRaw('month, sum(share_amount) as income')->get()->toArray(); |
| 26 | 26 | ||
| 27 | $stat_income = []; | 27 | $stat_income = []; |
| ... | @@ -41,7 +41,7 @@ class MusicianIncomeService extends Service | ... | @@ -41,7 +41,7 @@ class MusicianIncomeService extends Service |
| 41 | public function billCollate() | 41 | public function billCollate() |
| 42 | { | 42 | { |
| 43 | $collate = $detail = $contract_ids = []; | 43 | $collate = $detail = $contract_ids = []; |
| 44 | StakeholderSongCollate::query()->custom($this->request->inputs(['song_id']))->identify() | 44 | StakeholderSongCollate::query()->custom($this->request->only(['song_id']))->identify() |
| 45 | ->orderByDesc('month')->each(function ($item) use (&$collate, &$detail, &$contract_ids){ | 45 | ->orderByDesc('month')->each(function ($item) use (&$collate, &$detail, &$contract_ids){ |
| 46 | $key = "{$item->month}|{$item->channel}"; | 46 | $key = "{$item->month}|{$item->channel}"; |
| 47 | if (!isset($detail[$key])) { | 47 | if (!isset($detail[$key])) { |
| ... | @@ -91,7 +91,7 @@ class MusicianIncomeService extends Service | ... | @@ -91,7 +91,7 @@ class MusicianIncomeService extends Service |
| 91 | { | 91 | { |
| 92 | $cooperation_types = $detail = []; | 92 | $cooperation_types = $detail = []; |
| 93 | 93 | ||
| 94 | StakeholderSongCollate::query()->with(['song:id,name,singer', 'contract:id,cooperation_type'])->custom($this->request->inputs(['month', 'channel']))->identify() | 94 | StakeholderSongCollate::query()->with(['song:id,name,singer', 'contract:id,cooperation_type'])->custom($this->request->only(['month', 'channel']))->identify() |
| 95 | ->select(['id', 'song_id', 'month', 'contract_id', 'deduct_amount', 'real_share_amount']) | 95 | ->select(['id', 'song_id', 'month', 'contract_id', 'deduct_amount', 'real_share_amount']) |
| 96 | ->each(function ($item) use (&$cooperation_types, &$detail){ | 96 | ->each(function ($item) use (&$cooperation_types, &$detail){ |
| 97 | 97 | ... | ... |
-
Please register or sign in to post a comment