Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
youjj
cloud-platform
Commits
3780314a
Commit
3780314a
authored
Jul 27, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
48983eaf
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
20 deletions
+43
-20
MyWalletCath.java
...om/github/wxiaoqi/security/admin/entity/MyWalletCath.java
+9
-0
MyWalletBiz.java
...va/com/github/wxiaoqi/security/admin/biz/MyWalletBiz.java
+30
-18
WalletCathAdminController.java
.../security/admin/rest/admin/WalletCathAdminController.java
+4
-2
No files found.
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/entity/MyWalletCath.java
View file @
3780314a
...
...
@@ -92,6 +92,15 @@ public class MyWalletCath implements Serializable {
@ApiModelProperty
(
value
=
"订单状态:0-未提现,待审核,1-已审核"
)
private
Integer
stauts
;
/**
* 失败原因
*/
@Column
(
name
=
"reason"
)
@ApiModelProperty
(
value
=
"失败原因"
)
private
String
reason
;
/**
* 提现日期
*/
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/MyWalletBiz.java
View file @
3780314a
...
...
@@ -311,16 +311,17 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> {
//提现审核
public
ObjectRestResponse
verifyCath
(
Integer
cathId
,
String
cono
){
if
(
StringUtils
.
isBlank
(
cono
)||
cathId
==
null
||
cathId
==
0
){
public
ObjectRestResponse
verifyCath
(
Integer
cathId
,
String
cono
,
String
reason
,
Integer
status
){
if
(
(
status
==
1
&&
StringUtils
.
isBlank
(
cono
))||(
status
==
2
&&
StringUtils
.
isBlank
(
reason
)
)||
cathId
==
null
||
cathId
==
0
){
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
NULL_CODE
,
"参数不能为空"
);
}
MyWalletCath
cath
=
myWalletCathBiz
.
selectById
(
cathId
);
if
(
cath
==
null
){
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
NOTEXIST_CODE
,
"提现记录不存在"
);
}
cath
.
setStauts
(
1
);
cath
.
setStauts
(
status
);
cath
.
setCono
(
cono
);
cath
.
setReason
(
reason
);
cath
.
setFinishTime
(
System
.
currentTimeMillis
());
int
num
=
myWalletCathBiz
.
updateSelectiveByIdRe
(
cath
);
if
(
num
>
0
){
...
...
@@ -329,9 +330,11 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> {
wallet
.
setUserId
(
userId
);
wallet
=
selectOne
(
wallet
);
if
(
wallet
!=
null
){
//当时钱包的余额
BigDecimal
balance
=
cath
.
getBalance
();
BigDecimal
realAmount
=
cath
.
getRealAmount
();
BigDecimal
commission
=
cath
.
getCommission
();
if
(
status
==
1
){
MyWalletDetail
detail
=
new
MyWalletDetail
();
detail
.
setUserId
(
userId
);
detail
.
setItype
(
1
);
...
...
@@ -346,6 +349,15 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> {
detail
.
setBalance
(
balance
);
detail
.
setAmount
(
commission
);
myWalletDetailBiz
.
insertSelective
(
detail
);
}
else
{
BigDecimal
amount
=
realAmount
.
add
(
commission
);
balance
=
wallet
.
getBalance
().
add
(
amount
);
BigDecimal
withdrawals
=
wallet
.
getWithdrawals
().
subtract
(
amount
);
wallet
.
setBalance
(
balance
);
wallet
.
setWithdrawals
(
withdrawals
);
mapper
.
updMyWater
(
wallet
);
}
}
}
return
ObjectRestResponse
.
succ
();
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/admin/WalletCathAdminController.java
View file @
3780314a
...
...
@@ -37,9 +37,11 @@ public class WalletCathAdminController {
@ApiOperation
(
"提现审核"
)
public
ObjectRestResponse
verifyCath
(
@RequestParam
(
value
=
"cathId"
,
defaultValue
=
"0"
)
Integer
cathId
,
@RequestParam
(
value
=
"cono"
,
defaultValue
=
""
)
String
cono
){
@RequestParam
(
value
=
"cono"
,
defaultValue
=
""
)
String
cono
,
@RequestParam
(
value
=
"reason"
,
defaultValue
=
""
)
String
reason
,
@RequestParam
(
value
=
"status"
,
defaultValue
=
"1"
)
Integer
status
){
try
{
return
myWalletBiz
.
verifyCath
(
cathId
,
cono
);
return
myWalletBiz
.
verifyCath
(
cathId
,
cono
,
reason
,
status
);
}
catch
(
Exception
e
)
{
throw
new
BaseException
(
e
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment