Commit c78919f7 c78919f77fce5d00a0dc39615016573d3efbc091 by lemon

*

1 parent 6c3bef01
......@@ -34,7 +34,7 @@ class MusicianWalletDetailRequest extends FormRequest
public function messages(): array
{
return [
'serial_no.required' => '请提供业务流水号',
'serial_no.required' => '请提供版权账单账单流水号',
];
}
}
......
......@@ -29,12 +29,13 @@ class MusicianWithdrawService extends Service
*/
public function walletDetail()
{
$income_by_payer = StakeholderIncomeSyncAppDetails::query()->where(['serial_no'=>$this->request->input('serial_no'), 'sync_status'=>1])->first();
if (empty($income_by_payer)) return Response::error(ErrorCode::ORDER_NO_FOUND);
$app = StakeholderIncomeSyncApp::query()->where(['serial_no'=>$this->request->input('serial_no'), 'sync_status'=>1])->first();
if (empty($app)) return Response::error(ErrorCode::ORDER_NO_FOUND);
$collate = StakeholderSongCollate::query()->with('song:id,name,singer')->where([
'bills_id'=>$income_by_payer->related_id, 'subject_no'=>$income_by_payer->subject_no])
->select(['song_id', 'role', 'cost_amount', 'deduct_amount', 'real_share_amount'])->paginate($this->pageSize);
$collate = StakeholderSongCollate::query()->where([
'bills_id'=>$app->related_id, 'stakeholder_id'=>$app->stakeholder_id, 'subject_no'=>$app->subject_no
])->select(['song_id', 'role', 'cost_amount', 'deduct_prepaid as deduct_amount', 'real_share_amount', 'name', 'singer'])
->paginate($this->pageSize);
foreach ($collate as &$item) {
$item->setAttribute('role', Contract::transformRole($item->role));
......