Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Cong.Zhao
/
musician-api.hikoon.com
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
c78919f7
...
c78919f77fce5d00a0dc39615016573d3efbc091
authored
2021-11-15 15:50:27 +0800
by
lemon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
*
1 parent
6c3bef01
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
app/Http/Requests/Musician/MusicianWalletDetailRequest.php
app/Services/MusicianWithdrawService.php
app/Http/Requests/Musician/MusicianWalletDetailRequest.php
View file @
c78919f
...
...
@@ -34,7 +34,7 @@ class MusicianWalletDetailRequest extends FormRequest
public
function
messages
()
:
array
{
return
[
'serial_no.required'
=>
'请提供
业务
流水号'
,
'serial_no.required'
=>
'请提供
版权账单账单
流水号'
,
];
}
}
...
...
app/Services/MusicianWithdrawService.php
View file @
c78919f
...
...
@@ -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
));
...
...
Please
register
or
sign in
to post a comment