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
3bd032ed
Commit
3bd032ed
authored
Nov 19, 2019
by
libin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-auto-pay' into dev
parents
550aab39
da9b475f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
3 deletions
+19
-3
MyWalletBiz.java
...va/com/github/wxiaoqi/security/admin/biz/MyWalletBiz.java
+19
-3
No files found.
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/MyWalletBiz.java
View file @
3bd032ed
...
@@ -17,10 +17,12 @@ import com.github.wxiaoqi.security.common.config.rabbit.RabbitConstant;
...
@@ -17,10 +17,12 @@ import com.github.wxiaoqi.security.common.config.rabbit.RabbitConstant;
import
com.github.wxiaoqi.security.common.constant.UserConstant
;
import
com.github.wxiaoqi.security.common.constant.UserConstant
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.util.ClientUtil
;
import
com.github.wxiaoqi.security.common.util.ClientUtil
;
import
com.github.wxiaoqi.security.common.util.OrderUtil
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.xxfc.platform.app.entity.vo.WithDrawRuleVo
;
import
com.xxfc.platform.app.entity.vo.WithDrawRuleVo
;
import
com.xxfc.platform.app.feign.ConfigFeign
;
import
com.xxfc.platform.app.feign.ConfigFeign
;
import
com.xxfc.platform.universal.feign.ThirdFeign
;
import
com.xxfc.platform.universal.vo.FundPayVo
;
import
com.xxfc.platform.universal.vo.FundPayVo
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
...
@@ -91,6 +93,9 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
...
@@ -91,6 +93,9 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
@Autowired
@Autowired
RabbitTemplate
rabbitTemplate
;
RabbitTemplate
rabbitTemplate
;
@Autowired
private
ThirdFeign
thirdFeign
;
private
Snowflake
snowflake
;
private
Snowflake
snowflake
;
private
DateTimeFormatter
dateTimeFormatter
;
private
DateTimeFormatter
dateTimeFormatter
;
...
@@ -385,11 +390,14 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
...
@@ -385,11 +390,14 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
NULL_CODE
,
"参数不能为空"
);
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
NULL_CODE
,
"参数不能为空"
);
}
}
MyWalletCath
cath
=
myWalletCathBiz
.
selectById
(
cathId
);
MyWalletCath
cath
=
myWalletCathBiz
.
selectById
(
cathId
);
cath
.
getUserId
();
if
(
cath
==
null
)
{
if
(
cath
==
null
)
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
NOTEXIST_CODE
,
"提现记录不存在"
);
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
NOTEXIST_CODE
,
"提现记录不存在"
);
}
}
if
(
cath
.
getStauts
()
==
WithDrawStatusEnum
.
AUDIT
.
getCode
()){
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
NOTEXIST_CODE
,
"提现记录已审核"
);
}
Integer
userId
=
cath
.
getUserId
();
Integer
userId
=
cath
.
getUserId
();
MyWallet
wallet
=
new
MyWallet
();
MyWallet
wallet
=
new
MyWallet
();
wallet
.
setUserId
(
userId
);
wallet
.
setUserId
(
userId
);
...
@@ -404,16 +412,24 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
...
@@ -404,16 +412,24 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
}
else
{
}
else
{
HttpServletRequest
request
=
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
()).
getRequest
();
HttpServletRequest
request
=
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
()).
getRequest
();
String
host
=
StringUtils
.
defaultIfBlank
(
request
.
getHeader
(
"userHost"
),
ClientUtil
.
getClientIp
(
request
));
String
host
=
StringUtils
.
defaultIfBlank
(
request
.
getHeader
(
"userHost"
),
ClientUtil
.
getClientIp
(
request
));
String
cono
=
OrderUtil
.
GetOrderNumber
(
""
);
FundPayVo
fundPayVo
=
FundPayVo
.
builder
()
FundPayVo
fundPayVo
=
FundPayVo
.
builder
()
.
amount
(
cath
.
getCathType
()
==
0
?
String
.
valueOf
(
cath
.
getRealAmount
().
multiply
(
new
BigDecimal
(
100
)).
doubleValue
())
:
String
.
format
(
"%.2f"
,
cath
.
getRealAmount
().
doubleValue
()))
.
amount
(
cath
.
getCathType
()
==
0
?
String
.
valueOf
(
cath
.
getRealAmount
().
multiply
(
new
BigDecimal
(
100
)).
doubleValue
())
:
String
.
format
(
"%.2f"
,
cath
.
getRealAmount
().
doubleValue
()))
.
payeeAccount
(
cath
.
getAccountNumber
())
.
payeeAccount
(
cath
.
getAccountNumber
())
.
orderNo
(
c
ath
.
getOrderNo
()
)
.
orderNo
(
c
ono
)
.
payerShowName
(
"欣新房车网络科技(广东)股份有限公司"
)
.
payerShowName
(
"欣新房车网络科技(广东)股份有限公司"
)
.
remark
(
"提现转账"
)
.
remark
(
"提现转账"
)
.
type
(
cath
.
getCathType
())
.
type
(
cath
.
getCathType
())
.
creatIp
(
host
)
.
creatIp
(
host
)
.
build
();
.
build
();
sendPayMessage
(
fundPayVo
);
ObjectRestResponse
<
String
>
response
=
thirdFeign
.
transferAccount
(
fundPayVo
);
if
(
response
.
getStatus
()
==
200
){
withDrawProcess
(
cath
.
getOrderNo
(),
response
.
getData
(),
""
,
true
);
}
else
{
withDrawProcess
(
cath
.
getOrderNo
(),
response
.
getData
(),
response
.
getMessage
(),
false
);
}
log
.
info
(
"发送提现消息成功:【{}】"
,
fundPayVo
);
log
.
info
(
"发送提现消息成功:【{}】"
,
fundPayVo
);
}
}
}
else
{
}
else
{
...
...
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