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
c80d6d5d
...
c80d6d5d04620543b68aeda05cd1d21bfc45d136
authored
2021-09-14 16:51:10 +0800
by
lemon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提现
1 parent
add2061c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
9 deletions
app/Http/Controllers/Musician/MusicianWithdrawController.php
app/Http/Requests/Musician/MusicianWithdrawStatusRequest.php
app/Services/MusicianWithdrawService.php
app/Http/Controllers/Musician/MusicianWithdrawController.php
View file @
c80d6d5
...
...
@@ -30,6 +30,10 @@ class MusicianWithdrawController extends Controller
$this
->
musicianWithdrawService
=
$musicianWithdrawService
;
}
/**
* @param MusicianWalletDetailRequest $request
* @return \Illuminate\Http\JsonResponse
*/
public
function
walletDetail
(
MusicianWalletDetailRequest
$request
)
{
return
$this
->
musicianWithdrawService
->
walletDetail
();
...
...
app/Http/Requests/Musician/MusicianWithdrawStatusRequest.php
View file @
c80d6d5
...
...
@@ -28,7 +28,7 @@ class MusicianWithdrawStatusRequest extends FormRequest
public
function
rules
()
{
return
[
'
serial_no
'
=>
[
'required'
,
'bail'
,
'array'
,
'filled'
],
'
busi_id
'
=>
[
'required'
,
'bail'
,
'array'
,
'filled'
],
'type'
=>
[
'required'
,
'bail'
,
'in:success,fail,advance'
],
];
}
...
...
@@ -39,7 +39,7 @@ class MusicianWithdrawStatusRequest extends FormRequest
public
function
messages
()
:
array
{
return
[
'
serial_no.required'
=>
'请提供
流水号'
,
'
busi_id.required'
=>
'请提供业务
流水号'
,
'type.required'
=>
'请提供有效的提现状态变更'
,
];
}
...
...
app/Services/MusicianWithdrawService.php
View file @
c80d6d5
...
...
@@ -103,21 +103,25 @@ class MusicianWithdrawService extends Service
$withdraw_status
=
''
;
$query
=
StakeholderIncomeByPayer
::
query
()
->
where
([
'sync_status'
=>
1
,
'identifier'
=>
$this
->
identifier
->
identifier
])
->
whereIn
(
'
serial_no'
,
$this
->
request
->
input
(
'serial_no
'
));
->
whereIn
(
'
busi_id'
,
$this
->
request
->
input
(
'busi_id
'
));
switch
(
$this
->
request
->
input
(
'type'
))
{
case
'fail'
:
$withdraw_status
=
0
;
$query
=
$query
->
where
([
'withdraw_status'
=>
1
]);
break
;
case
'advance'
:
case
'confirm'
:
//已确认
$withdraw_status
=
1
;
$query
=
$query
->
where
([
'withdraw_status'
=>
0
]);
break
;
case
'success'
:
case
'fail'
:
//提现失败 -> 待提现
$withdraw_status
=
1
;
$query
=
$query
->
where
([
'withdraw_status'
=>
2
]);
break
;
case
'advance'
:
//提现中
$withdraw_status
=
2
;
$query
=
$query
->
where
([
'withdraw_status'
=>
1
]);
break
;
case
'success'
:
//提现完成
$withdraw_status
=
3
;
$query
=
$query
->
where
([
'withdraw_status'
=>
2
]);
break
;
}
if
(
$query
->
update
([
'withdraw_status'
=>
$withdraw_status
]))
{
...
...
Please
register
or
sign in
to post a comment