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
3041b217
Commit
3041b217
authored
Jul 27, 2019
by
周健威
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/base-modify' into base-modify
parents
e4e01e01
b51f39c3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
MyWalletBiz.java
...va/com/github/wxiaoqi/security/admin/biz/MyWalletBiz.java
+5
-4
MyWalletController.java
...ithub/wxiaoqi/security/admin/rest/MyWalletController.java
+1
-0
No files found.
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/MyWalletBiz.java
View file @
3041b217
...
@@ -270,16 +270,17 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> {
...
@@ -270,16 +270,17 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> {
if
(
restResponse
.
getStatus
()!=
ResultCode
.
SUCCESS_CODE
){
if
(
restResponse
.
getStatus
()!=
ResultCode
.
SUCCESS_CODE
){
return
restResponse
;
return
restResponse
;
}
}
WalletCathSumDto
sumDto
=
JSONUtil
.
toBean
(
restResponse
.
getData
().
toString
(),
WalletCathSumDto
.
class
);
String
data
=
JSONObject
.
toJSONString
(
restResponse
.
getData
());
WalletCathSumDto
sumDto
=
JSONUtil
.
toBean
(
data
,
WalletCathSumDto
.
class
);
if
(
sumDto
==
null
){
if
(
sumDto
==
null
){
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
NULL_CODE
,
"参数不能为空"
);
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
NULL_CODE
,
"参数不能为空"
);
}
}
BigDecimal
commission
=
amount
.
divide
(
sumDto
.
getProceduReates
()).
multiply
(
new
BigDecimal
(
"100"
)).
setScale
(
2
,
RoundingMode
.
HALF_UP
);
BigDecimal
commission
=
amount
.
multiply
(
sumDto
.
getProceduReates
()).
divide
(
new
BigDecimal
(
"100"
)).
setScale
(
2
,
RoundingMode
.
HALF_UP
);
BigDecimal
balnece
=
sumDto
.
getBalance
();
BigDecimal
balnece
=
sumDto
.
getBalance
();
//到账金额
//到账金额
BigDecimal
realAmount
=
balnece
.
subtract
(
commission
)
;
BigDecimal
realAmount
=
amount
;
if
(
amount
.
compareTo
(
realAmount
)>
0
){
if
(
amount
.
compareTo
(
realAmount
)>
0
){
realAmount
=
amount
;
realAmount
=
balnece
.
subtract
(
commission
)
;
}
}
log
.
info
(
"-----提现申请-----proceduReates==="
+
sumDto
.
getProceduReates
()+
"----commission===="
+
commission
+
"---realAmount==="
+
realAmount
);
log
.
info
(
"-----提现申请-----proceduReates==="
+
sumDto
.
getProceduReates
()+
"----commission===="
+
commission
+
"---realAmount==="
+
realAmount
);
//添加账号
//添加账号
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/MyWalletController.java
View file @
3041b217
...
@@ -105,6 +105,7 @@ public class MyWalletController {
...
@@ -105,6 +105,7 @@ public class MyWalletController {
public
ObjectRestResponse
applyCath
(
@RequestBody
ApplyCathVo
applyCathVo
,
HttpServletRequest
request
){
public
ObjectRestResponse
applyCath
(
@RequestBody
ApplyCathVo
applyCathVo
,
HttpServletRequest
request
){
try
{
try
{
Integer
userId
=
Integer
.
parseInt
(
userAuthUtil
.
getInfoFromToken
(
userAuthConfig
.
getToken
(
request
)).
getId
());
Integer
userId
=
Integer
.
parseInt
(
userAuthUtil
.
getInfoFromToken
(
userAuthConfig
.
getToken
(
request
)).
getId
());
applyCathVo
.
setUserId
(
userId
);
return
myWalletBiz
.
applyCath
(
applyCathVo
);
return
myWalletBiz
.
applyCath
(
applyCathVo
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
BaseException
(
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