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
94147e9f
Commit
94147e9f
authored
Nov 19, 2019
by
libin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-auto-pay'
parents
6b602776
444afa6f
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
87 additions
and
25 deletions
+87
-25
WalletCathListDTO.java
.../github/wxiaoqi/security/admin/dto/WalletCathListDTO.java
+3
-0
MyWalletCath.java
...om/github/wxiaoqi/security/admin/entity/MyWalletCath.java
+4
-0
WalletCathAdminVo.java
...m/github/wxiaoqi/security/admin/vo/WalletCathAdminVo.java
+3
-0
WalletPageVo.java
...va/com/github/wxiaoqi/security/admin/vo/WalletPageVo.java
+4
-0
MyWalletBiz.java
...va/com/github/wxiaoqi/security/admin/biz/MyWalletBiz.java
+37
-18
UserBusinessBiz.java
...om/github/wxiaoqi/security/admin/biz/UserBusinessBiz.java
+2
-0
WalletCathAdminController.java
.../security/admin/rest/admin/WalletCathAdminController.java
+3
-2
AppUserSellingWaterMapper.xml
...n/src/main/resources/mapper/AppUserSellingWaterMapper.xml
+22
-2
MyWalletCathMapper.xml
...ce-admin/src/main/resources/mapper/MyWalletCathMapper.xml
+3
-2
WithDrawMqHandler.java
...om/xxfc/platform/universal/handler/WithDrawMqHandler.java
+6
-1
No files found.
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/dto/WalletCathListDTO.java
View file @
94147e9f
...
...
@@ -55,4 +55,7 @@ public class WalletCathListDTO {
private
String
accountNumber
;
private
String
accountName
;
@ApiModelProperty
(
value
=
"线下提现方式 1:自动 2:手动"
)
private
Integer
offlineWay
;
}
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/entity/MyWalletCath.java
View file @
94147e9f
...
...
@@ -130,4 +130,8 @@ public class MyWalletCath implements Serializable {
@Column
(
name
=
"account_name"
)
private
String
accountName
;
@Column
(
name
=
"offline_way"
)
@ApiModelProperty
(
value
=
"线下提现方式 1:自动 2:手动"
)
private
Integer
offlineWay
;
}
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/vo/WalletCathAdminVo.java
View file @
94147e9f
...
...
@@ -51,4 +51,7 @@ public class WalletCathAdminVo {
private
String
accountNumber
;
private
String
accountName
;
@ApiModelProperty
(
value
=
"线下提现方式 1:自动 2:手动"
)
private
Integer
offlineWay
;
}
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/vo/WalletPageVo.java
View file @
94147e9f
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
vo
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.math.BigDecimal
;
...
...
@@ -12,6 +14,8 @@ import java.math.BigDecimal;
* @data 2019/7/12 9:20
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
WalletPageVo
{
private
Integer
id
;
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/MyWalletBiz.java
View file @
94147e9f
...
...
@@ -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.msg.ObjectRestResponse
;
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.vo.PageDataVO
;
import
com.xxfc.platform.app.entity.vo.WithDrawRuleVo
;
import
com.xxfc.platform.app.feign.ConfigFeign
;
import
com.xxfc.platform.universal.feign.ThirdFeign
;
import
com.xxfc.platform.universal.vo.FundPayVo
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
...
...
@@ -91,6 +93,9 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
@Autowired
RabbitTemplate
rabbitTemplate
;
@Autowired
private
ThirdFeign
thirdFeign
;
private
Snowflake
snowflake
;
private
DateTimeFormatter
dateTimeFormatter
;
...
...
@@ -148,7 +153,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
walletpg
.
setWithdrawaling
(
withDrawaling
);
walletpg
.
setWithdrawals
(
walletpg
.
getWithdrawals
()
==
null
?
new
BigDecimal
(
0
)
:
walletpg
.
getWithdrawals
());
walletpg
.
setUnbooked
(
walletpg
.
getUnbooked
()
==
null
?
new
BigDecimal
(
0
)
:
walletpg
.
getUnbooked
());
walletpg
.
setTotalAmount
(
walletpg
.
getTo
day
Amount
()
==
null
?
new
BigDecimal
(
0
)
:
walletpg
.
getTotalAmount
());
walletpg
.
setTotalAmount
(
walletpg
.
getTo
tal
Amount
()
==
null
?
new
BigDecimal
(
0
)
:
walletpg
.
getTotalAmount
());
walletpg
.
setTotalConsumption
(
totalConsumpution
);
AppUserDetail
appUserDetail
=
userdetailMap
.
get
(
wallet
.
getUserId
());
if
(
Objects
.
nonNull
(
appUserDetail
)){
...
...
@@ -379,17 +384,20 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
/**
* 提现审核
*/
public
ObjectRestResponse
verifyCath
(
Integer
cathId
,
String
reason
,
Integer
status
)
{
public
ObjectRestResponse
verifyCath
(
Integer
cathId
,
String
payMentNo
,
String
reason
,
Integer
status
)
{
boolean
isvalid
=
status
==
WithDrawStatusEnum
.
REJECT
.
getCode
()
&&
StringUtils
.
isBlank
(
reason
)
||
cathId
==
null
||
cathId
==
0
;
if
(
isvalid
)
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
NULL_CODE
,
"参数不能为空"
);
}
MyWalletCath
cath
=
myWalletCathBiz
.
selectById
(
cathId
);
cath
.
getUserId
();
if
(
cath
==
null
)
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
NOTEXIST_CODE
,
"提现记录不存在"
);
}
if
(
cath
.
getStauts
()
==
WithDrawStatusEnum
.
SUCCESS
.
getCode
()){
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
NOTEXIST_CODE
,
"提现记录已审核"
);
}
Integer
userId
=
cath
.
getUserId
();
MyWallet
wallet
=
new
MyWallet
();
wallet
.
setUserId
(
userId
);
...
...
@@ -399,20 +407,31 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
BigDecimal
realAmount
=
cath
.
getRealAmount
();
BigDecimal
commission
=
cath
.
getCommission
();
if
(
status
==
WithDrawStatusEnum
.
AGREE
.
getCode
())
{
HttpServletRequest
request
=
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
()).
getRequest
();
String
host
=
StringUtils
.
defaultIfBlank
(
request
.
getHeader
(
"userHost"
),
ClientUtil
.
getClientIp
(
request
));
FundPayVo
fundPayVo
=
FundPayVo
.
builder
()
.
amount
(
cath
.
getCathType
()
==
0
?
String
.
valueOf
(
cath
.
getRealAmount
().
multiply
(
new
BigDecimal
(
100
)).
doubleValue
())
:
String
.
format
(
"%.2f"
,
cath
.
getRealAmount
().
doubleValue
()))
.
payeeAccount
(
cath
.
getAccountNumber
())
.
orderNo
(
cath
.
getOrderNo
())
.
payerShowName
(
"欣新房车网络科技(广东)股份有限公司"
)
.
remark
(
"提现转账"
)
.
type
(
cath
.
getCathType
())
.
creatIp
(
host
)
.
build
();
sendPayMessage
(
fundPayVo
);
log
.
info
(
"发送提现消息成功:【{}】"
,
fundPayVo
);
if
(
org
.
springframework
.
util
.
StringUtils
.
hasText
(
payMentNo
)){
withDrawProcess
(
cath
.
getOrderNo
(),
payMentNo
,
null
,
true
);
}
else
{
HttpServletRequest
request
=
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
()).
getRequest
();
String
host
=
StringUtils
.
defaultIfBlank
(
request
.
getHeader
(
"userHost"
),
ClientUtil
.
getClientIp
(
request
));
String
cono
=
OrderUtil
.
GetOrderNumber
(
""
);
FundPayVo
fundPayVo
=
FundPayVo
.
builder
()
.
amount
(
cath
.
getCathType
()
==
0
?
String
.
valueOf
(
cath
.
getRealAmount
().
multiply
(
new
BigDecimal
(
100
)).
doubleValue
())
:
String
.
format
(
"%.2f"
,
cath
.
getRealAmount
().
doubleValue
()))
.
payeeAccount
(
cath
.
getAccountNumber
())
.
orderNo
(
cono
)
.
payerShowName
(
"欣新房车网络科技(广东)股份有限公司"
)
.
remark
(
"提现转账"
)
.
type
(
cath
.
getCathType
())
.
creatIp
(
host
)
.
build
();
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
);
}
}
else
{
cath
.
setStauts
(
status
);
cath
.
setReason
(
reason
);
...
...
@@ -475,7 +494,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
detail
.
setUserId
(
myWalletCath
.
getUserId
());
detail
.
setItype
(
1
);
//设置提现单号
detail
.
setWithDrawOrderNo
(
orderNo
);
detail
.
setWithDrawOrderNo
(
myWalletCath
.
getOrderNo
()
);
detail
.
setCono
(
myWalletCath
.
getId
().
intValue
());
detail
.
setBalance
(
myWalletCath
.
getBalance
());
detail
.
setAmount
(
myWalletCath
.
getAmount
());
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/UserBusinessBiz.java
View file @
94147e9f
...
...
@@ -49,6 +49,8 @@ public class UserBusinessBiz {
if
(
CollectionUtils
.
isEmpty
(
data
))
{
userTeamMemberVo
.
setPageNum
(
pageNo
);
userTeamMemberVo
.
setPageSize
(
pageSize
);
userTeamMemberVo
.
setTotalCount
(
0
);
userTeamMemberVo
.
setTotalPage
(
0
);
userTeamMemberVo
.
setTotalIncome
(
new
BigDecimal
(
0
));
userTeamMemberVo
.
setUserTeamMemberBos
(
Collections
.
EMPTY_LIST
);
return
userTeamMemberVo
;
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/admin/WalletCathAdminController.java
View file @
94147e9f
...
...
@@ -38,9 +38,10 @@ public class WalletCathAdminController {
public
ObjectRestResponse
verifyCath
(
@RequestParam
(
value
=
"cathId"
,
defaultValue
=
"0"
)
Integer
cathId
,
@RequestParam
(
value
=
"reason"
,
defaultValue
=
""
)
String
reason
,
@RequestParam
(
value
=
"status"
,
defaultValue
=
"1"
)
Integer
status
){
@RequestParam
(
value
=
"status"
,
defaultValue
=
"1"
)
Integer
status
,
@RequestParam
(
value
=
"payMentNo"
,
required
=
false
)
String
payMentNo
){
try
{
return
myWalletBiz
.
verifyCath
(
cathId
,
reason
,
status
);
return
myWalletBiz
.
verifyCath
(
cathId
,
payMentNo
,
reason
,
status
);
}
catch
(
Exception
e
)
{
throw
new
BaseException
(
e
);
}
...
...
ace-modules/ace-admin/src/main/resources/mapper/AppUserSellingWaterMapper.xml
View file @
94147e9f
...
...
@@ -96,8 +96,26 @@ FROM
SELECT
ausw.*,
aul.username AS `phone`,
IFNULL(aud.realname,aud.nickname) AS `sourceName`,
IFNULL(audd.realname,audd.nickname) AS `userName`
(
CASE
WHEN aud.realname = "" THEN
aull.username
WHEN aud.realname IS NULL THEN
aull.username
ELSE
aud.realname
END
)AS `sourceName`,
(
CASE
WHEN audd.realname = "" THEN
aul.username
WHEN audd.realname IS NULL THEN
aul.username
ELSE
audd.realname
END
) AS `userName`
FROM
( SELECT * FROM `app_user_selling_water` WHERE 1 = 1
<if
test=
"status !=null"
>
...
...
@@ -124,10 +142,12 @@ FROM
WHERE `username` = #{phone}
</if>
) AS aul ON aul.id = ausw.user_id
INNER JOIN `app_user_login` AS `aull` ON aull.id=ausw.source_id
INNER JOIN `app_user_detail` AS aud ON aud.userid = ausw.source_id
INNER JOIN ( SELECT * FROM `app_user_detail`
<if
test=
"userName!=null and userName!=' '"
>
WHERE `realname` LIKE CONCAT('%',#{userName},'%') OR `nickname` LIKE CONCAT('%',#{userName},'%')
</if>
) AS audd ON audd.userid = ausw.user_id
ORDER BY ausw.crt_time DESC
</select>
</mapper>
\ No newline at end of file
ace-modules/ace-admin/src/main/resources/mapper/MyWalletCathMapper.xml
View file @
94147e9f
...
...
@@ -18,14 +18,15 @@
wc.cono,
wc.order_no AS `orderNo`,
wc.account_number AS `accountNumber`,
wc.account_name AS `accountName`
wc.account_name AS `accountName`,
wc.offline_way AS `offlineWay`
FROM
(SELECT * FROM `my_wallet_cath` WHERE 1 = 1
<if
test=
"state != null"
>
AND `stauts`=#{state}
i
</if>
<if
test=
"orderNo"
>
<if
test=
"orderNo
!=null and orderNo !=''
"
>
AND `order_no` = #{orderNo}
</if>
<if
test=
"startTime !=null and endTime !=null"
>
...
...
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/handler/WithDrawMqHandler.java
View file @
94147e9f
...
...
@@ -95,7 +95,12 @@ public class WithDrawMqHandler implements InitializingBean {
Long
count
=
valueOperations
.
increment
(
orderNo
);
if
(
count
<=
MAX_RETRY
)
{
//重新把消息放回队列
basicNack
(
channel
,
message
.
getMessageProperties
().
getDeliveryTag
(),
false
,
true
,
pay_way
);
// basicNack(channel, message.getMessageProperties().getDeliveryTag(), false, true, pay_way);
try
{
channel
.
basicRecover
();
}
catch
(
IOException
ex
){
}
return
;
}
redisTemplate
.
delete
(
orderNo
);
...
...
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