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
88c3776f
...
88c3776fd92b6b7ff1978310e196a2d2ba63e868
authored
2021-11-14 20:52:09 +0800
by
lemon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix
1 parent
4b472f54
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
33 deletions
app/Services/MusicianWithdrawService.php
app/Services/MusicianWithdrawService.php
View file @
88c3776
...
...
@@ -7,6 +7,7 @@ use App\Helper\Response;
use
App\Models\Legal\Company
;
use
App\Models\Legal\Contract
;
use
App\Models\Legal\StakeholderIncomeByPayer
;
use
App\Models\Legal\StakeholderIncomeSyncAppDetails
;
use
App\Models\Legal\StakeholderSongCollate
;
/**
...
...
@@ -21,7 +22,7 @@ class MusicianWithdrawService extends Service
*/
public
function
walletDetail
()
{
$income_by_payer
=
StakeholderIncome
ByPayer
::
query
()
->
where
([
'serial_no'
=>
$this
->
request
->
input
(
'busi_id'
),
'sync_status'
=>
1
])
->
first
();
$income_by_payer
=
StakeholderIncome
SyncAppDetails
::
query
()
->
where
([
'serial_no'
=>
$this
->
request
->
input
(
'busi_id'
),
'sync_status'
=>
1
])
->
first
();
if
(
empty
(
$income_by_payer
))
return
Response
::
error
(
ErrorCode
::
ORDER_NO_FOUND
);
$collate
=
StakeholderSongCollate
::
query
()
->
with
(
'song:id,name,singer'
)
->
where
([
...
...
@@ -57,37 +58,6 @@ class MusicianWithdrawService extends Service
}
else
{
return
Response
::
error
();
}
}
/**
* 发票信息 - 通过流水号
* @return \Illuminate\Http\JsonResponse
*/
public
function
receiptInfo
()
{
$receipt
=
[];
StakeholderIncomeByPayer
::
query
()
->
with
(
'company:company_id,receipt_type,receipt_name,receipt_no,receipt_tel,receipt_address,receipt_bank,receipt_bank_no'
)
->
where
([
'identifier'
=>
$this
->
identifier
->
identifier
,
'sync_status'
=>
1
])
->
whereIn
(
'serial_no'
,
$this
->
request
->
input
(
'serial_no'
))
->
select
([
'id'
,
'company_id'
,
'serial_no'
,
'busi_id'
])
->
get
()
->
map
(
function
(
$item
)
use
(
&
$receipt
)
{
if
(
!
empty
(
$item
->
company
->
company_id
))
{
$receipt
[
$item
->
company
->
company_id
]
=
[
'receipt_type'
=>
$item
->
company
->
receipt_type
,
'receipt_name'
=>
$item
->
company
->
receipt_name
,
'receipt_no'
=>
$item
->
company
->
receipt_no
,
'receipt_tel'
=>
$item
->
company
->
receipt_tel
,
'receipt_address'
=>
$item
->
company
->
receipt_address
,
'receipt_bank'
=>
$item
->
company
->
receipt_bank
,
'receipt_bank_no'
=>
$item
->
company
->
receipt_bank_no
,
];
}
return
$receipt
;
});
return
Response
::
success
(
array_values
(
$receipt
));
}
/**
...
...
@@ -98,7 +68,7 @@ class MusicianWithdrawService extends Service
{
$withdraw_status
=
''
;
$query
=
StakeholderIncome
ByPayer
::
query
()
->
where
([
'sync_status'
=>
1
,
'identifier'
=>
$this
->
identifier
->
identifier
])
$query
=
StakeholderIncome
SyncAppDetails
::
query
()
->
where
([
'sync_status'
=>
1
,
'identifier'
=>
$this
->
identifier
->
identifier
])
->
whereIn
(
'serial_no'
,
$this
->
request
->
input
(
'busi_id'
));
switch
(
$this
->
request
->
input
(
'type'
))
{
...
...
Please
register
or
sign in
to post a comment