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
f3c64312
Commit
f3c64312
authored
Dec 17, 2019
by
libin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-auto-pay' into dev
parents
a8a0c988
d2f1efac
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
17 deletions
+24
-17
MyWalletCath.java
...om/github/wxiaoqi/security/admin/entity/MyWalletCath.java
+10
-4
UserFeign.java
...va/com/github/wxiaoqi/security/admin/feign/UserFeign.java
+2
-2
MyWalletBiz.java
...va/com/github/wxiaoqi/security/admin/biz/MyWalletBiz.java
+5
-4
MyWalletController.java
...ithub/wxiaoqi/security/admin/rest/MyWalletController.java
+3
-2
WithDrawMqHandler.java
...om/xxfc/platform/universal/handler/WithDrawMqHandler.java
+4
-5
No files found.
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/entity/MyWalletCath.java
View file @
f3c64312
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
entity
;
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
entity
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
javax.persistence.*
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.NoArgsConstructor
;
import
javax.persistence.Column
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
/**
/**
* 钱包提现表
* 钱包提现表
...
@@ -134,4 +137,7 @@ public class MyWalletCath implements Serializable {
...
@@ -134,4 +137,7 @@ public class MyWalletCath implements Serializable {
@Column
(
name
=
"offline_way"
)
@Column
(
name
=
"offline_way"
)
@ApiModelProperty
(
value
=
"线下提现方式 1:自动 2:手动"
)
@ApiModelProperty
(
value
=
"线下提现方式 1:自动 2:手动"
)
private
Integer
offlineWay
;
private
Integer
offlineWay
;
@Column
(
name
=
"real_reason"
)
private
String
realReason
;
}
}
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/feign/UserFeign.java
View file @
f3c64312
...
@@ -5,7 +5,6 @@ import com.github.wxiaoqi.security.admin.bo.UserStaffBo;
...
@@ -5,7 +5,6 @@ import com.github.wxiaoqi.security.admin.bo.UserStaffBo;
import
com.github.wxiaoqi.security.admin.dto.AppUserSellingWaterDTO
;
import
com.github.wxiaoqi.security.admin.dto.AppUserSellingWaterDTO
;
import
com.github.wxiaoqi.security.admin.dto.UserMemberDTO
;
import
com.github.wxiaoqi.security.admin.dto.UserMemberDTO
;
import
com.github.wxiaoqi.security.admin.entity.AppUserLogin
;
import
com.github.wxiaoqi.security.admin.entity.AppUserLogin
;
import
com.github.wxiaoqi.security.admin.entity.AppUserPosition
;
import
com.github.wxiaoqi.security.admin.entity.BaseUserMember
;
import
com.github.wxiaoqi.security.admin.entity.BaseUserMember
;
import
com.github.wxiaoqi.security.admin.entity.BaseUserMemberLevel
;
import
com.github.wxiaoqi.security.admin.entity.BaseUserMemberLevel
;
import
com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO
;
import
com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO
;
...
@@ -162,7 +161,8 @@ public interface UserFeign {
...
@@ -162,7 +161,8 @@ public interface UserFeign {
public
ObjectRestResponse
<
Void
>
withDrawprocess
(
@RequestParam
(
value
=
"orderNo"
)
String
orderNo
,
public
ObjectRestResponse
<
Void
>
withDrawprocess
(
@RequestParam
(
value
=
"orderNo"
)
String
orderNo
,
@RequestParam
(
value
=
"cono"
,
required
=
false
)
String
cono
,
@RequestParam
(
value
=
"cono"
,
required
=
false
)
String
cono
,
@RequestParam
(
value
=
"reason"
,
required
=
false
)
String
reason
,
@RequestParam
(
value
=
"reason"
,
required
=
false
)
String
reason
,
@RequestParam
(
value
=
"isSuccess"
)
Boolean
isSuccess
);
@RequestParam
(
value
=
"isSuccess"
)
Boolean
isSuccess
,
@RequestParam
(
value
=
"realReason"
,
required
=
false
)
String
realReason
);
@GetMapping
(
"/app/user/collect/exist"
)
@GetMapping
(
"/app/user/collect/exist"
)
boolean
isCollectionByTypeAndTypeId
(
@RequestParam
(
"userId"
)
Integer
userId
,
boolean
isCollectionByTypeAndTypeId
(
@RequestParam
(
"userId"
)
Integer
userId
,
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/MyWalletBiz.java
View file @
f3c64312
...
@@ -408,7 +408,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
...
@@ -408,7 +408,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
BigDecimal
commission
=
cath
.
getCommission
();
BigDecimal
commission
=
cath
.
getCommission
();
if
(
status
==
WithDrawStatusEnum
.
AGREE
.
getCode
())
{
if
(
status
==
WithDrawStatusEnum
.
AGREE
.
getCode
())
{
if
(
org
.
springframework
.
util
.
StringUtils
.
hasText
(
payMentNo
)){
if
(
org
.
springframework
.
util
.
StringUtils
.
hasText
(
payMentNo
)){
withDrawProcess
(
cath
.
getOrderNo
(),
payMentNo
,
null
,
true
);
withDrawProcess
(
cath
.
getOrderNo
(),
payMentNo
,
null
,
null
,
true
);
}
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
));
...
@@ -425,9 +425,9 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
...
@@ -425,9 +425,9 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
ObjectRestResponse
<
String
>
response
=
thirdFeign
.
transferAccount
(
fundPayVo
);
ObjectRestResponse
<
String
>
response
=
thirdFeign
.
transferAccount
(
fundPayVo
);
if
(
response
.
getStatus
()
==
200
){
if
(
response
.
getStatus
()
==
200
){
withDrawProcess
(
cath
.
getOrderNo
(),
response
.
getData
(),
""
,
true
);
withDrawProcess
(
cath
.
getOrderNo
(),
response
.
getData
(),
null
,
null
,
true
);
}
else
{
}
else
{
withDrawProcess
(
cath
.
getOrderNo
(),
response
.
getData
(),
response
.
getMessage
(),
false
);
withDrawProcess
(
cath
.
getOrderNo
(),
response
.
getData
(),
response
.
getMessage
(),
response
.
getMessage
(),
false
);
}
}
log
.
info
(
"发送提现消息成功:【{}】"
,
fundPayVo
);
log
.
info
(
"发送提现消息成功:【{}】"
,
fundPayVo
);
...
@@ -483,7 +483,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
...
@@ -483,7 +483,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
return
payAccountVos
;
return
payAccountVos
;
}
}
public
void
withDrawProcess
(
String
orderNo
,
String
cono
,
String
reason
,
Boolean
isSuccess
)
{
public
void
withDrawProcess
(
String
orderNo
,
String
cono
,
String
reason
,
String
realReason
,
Boolean
isSuccess
)
{
MyWalletCath
myWalletCath
=
myWalletCathBiz
.
findWalletCatchByOrderNo
(
orderNo
);
MyWalletCath
myWalletCath
=
myWalletCathBiz
.
findWalletCatchByOrderNo
(
orderNo
);
BigDecimal
balnece
=
myWalletCath
.
getBalance
();
BigDecimal
balnece
=
myWalletCath
.
getBalance
();
myWalletCath
.
setCono
(
cono
);
myWalletCath
.
setCono
(
cono
);
...
@@ -510,6 +510,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
...
@@ -510,6 +510,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
wallet
.
setUserId
(
myWalletCath
.
getUserId
());
wallet
.
setUserId
(
myWalletCath
.
getUserId
());
wallet
=
selectOne
(
wallet
);
wallet
=
selectOne
(
wallet
);
myWalletCath
.
setReason
(
reason
);
myWalletCath
.
setReason
(
reason
);
myWalletCath
.
setRealReason
(
realReason
);
myWalletCath
.
setStauts
(
WithDrawStatusEnum
.
FAIL
.
getCode
());
myWalletCath
.
setStauts
(
WithDrawStatusEnum
.
FAIL
.
getCode
());
BigDecimal
amount
=
myWalletCath
.
getRealAmount
().
add
(
myWalletCath
.
getCommission
());
BigDecimal
amount
=
myWalletCath
.
getRealAmount
().
add
(
myWalletCath
.
getCommission
());
BigDecimal
balance
=
wallet
.
getBalance
().
add
(
amount
);
BigDecimal
balance
=
wallet
.
getBalance
().
add
(
amount
);
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/MyWalletController.java
View file @
f3c64312
...
@@ -143,8 +143,9 @@ public class MyWalletController {
...
@@ -143,8 +143,9 @@ public class MyWalletController {
public
ObjectRestResponse
<
Void
>
withDrawprocess
(
@RequestParam
(
value
=
"orderNo"
)
String
orderNo
,
public
ObjectRestResponse
<
Void
>
withDrawprocess
(
@RequestParam
(
value
=
"orderNo"
)
String
orderNo
,
@RequestParam
(
value
=
"cono"
,
required
=
false
)
String
cono
,
@RequestParam
(
value
=
"cono"
,
required
=
false
)
String
cono
,
@RequestParam
(
value
=
"reason"
,
required
=
false
)
String
reason
,
@RequestParam
(
value
=
"reason"
,
required
=
false
)
String
reason
,
@RequestParam
(
value
=
"isSuccess"
)
Boolean
isSuccess
)
{
@RequestParam
(
value
=
"isSuccess"
)
Boolean
isSuccess
,
myWalletBiz
.
withDrawProcess
(
orderNo
,
cono
,
reason
,
isSuccess
);
@RequestParam
(
value
=
"realReason"
,
required
=
false
)
String
realReason
)
{
myWalletBiz
.
withDrawProcess
(
orderNo
,
cono
,
reason
,
realReason
,
isSuccess
);
return
ObjectRestResponse
.
succ
();
return
ObjectRestResponse
.
succ
();
}
}
}
}
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/handler/WithDrawMqHandler.java
View file @
f3c64312
...
@@ -78,13 +78,13 @@ public class WithDrawMqHandler implements InitializingBean {
...
@@ -78,13 +78,13 @@ public class WithDrawMqHandler implements InitializingBean {
String
cono
=
orderPayBiz
.
fundTrans
(
fundPayVo
);
String
cono
=
orderPayBiz
.
fundTrans
(
fundPayVo
);
orderNo
=
fundPayVo
.
getOrderNo
();
orderNo
=
fundPayVo
.
getOrderNo
();
log
.
info
(
"提现成功:【商户订单号:{}】-->【{}】"
,
cono
,
msg
);
log
.
info
(
"提现成功:【商户订单号:{}】-->【{}】"
,
cono
,
msg
);
userFeign
.
withDrawprocess
(
fundPayVo
.
getOrderNo
(),
cono
,
""
,
true
);
userFeign
.
withDrawprocess
(
fundPayVo
.
getOrderNo
(),
cono
,
""
,
true
,
""
);
Long
deliveryTag
=
(
Long
)
headers
.
get
(
AmqpHeaders
.
DELIVERY_TAG
);
Long
deliveryTag
=
(
Long
)
headers
.
get
(
AmqpHeaders
.
DELIVERY_TAG
);
// 手动签收
// 手动签收
basicAck
(
channel
,
deliveryTag
,
false
,
pay_way
);
basicAck
(
channel
,
deliveryTag
,
false
,
pay_way
);
}
catch
(
UnsupportedEncodingException
e
)
{
}
catch
(
UnsupportedEncodingException
e
)
{
basicNack
(
channel
,
message
.
getMessageProperties
().
getDeliveryTag
(),
false
,
false
,
pay_way
);
basicNack
(
channel
,
message
.
getMessageProperties
().
getDeliveryTag
(),
false
,
false
,
pay_way
);
userFeign
.
withDrawprocess
(
fundPayVo
.
getOrderNo
(),
""
,
DEFAULT_ERROR_MSG
,
false
);
userFeign
.
withDrawprocess
(
fundPayVo
.
getOrderNo
(),
""
,
DEFAULT_ERROR_MSG
,
false
,
e
.
getMessage
()
);
String
reason
=
String
.
format
(
"%s%s%s"
,
pay_way
,
"转账失败"
,
"[不支持的编码:UTF-8]"
);
String
reason
=
String
.
format
(
"%s%s%s"
,
pay_way
,
"转账失败"
,
"[不支持的编码:UTF-8]"
);
log
.
info
(
"{}:【{}】"
,
reason
,
e
);
log
.
info
(
"{}:【{}】"
,
reason
,
e
);
}
catch
(
BaseException
e
)
{
}
catch
(
BaseException
e
)
{
...
@@ -112,9 +112,8 @@ public class WithDrawMqHandler implements InitializingBean {
...
@@ -112,9 +112,8 @@ public class WithDrawMqHandler implements InitializingBean {
if
(
aliPayErrorCodes
.
contains
(
subCode
)
&&
cathType
!=
null
&&
cathType
==
PayWay
.
ALI_PAY
.
getCode
())
{
if
(
aliPayErrorCodes
.
contains
(
subCode
)
&&
cathType
!=
null
&&
cathType
==
PayWay
.
ALI_PAY
.
getCode
())
{
msg
=
AliPayErrorEnum
.
valueOf
(
subCode
).
getSubReason
();
msg
=
AliPayErrorEnum
.
valueOf
(
subCode
).
getSubReason
();
}
}
msg
=
StringUtils
.
isEmpty
(
msg
)
?
DEFAULT_ERROR_MSG
:
msg
;
String
reason
=
StringUtils
.
isEmpty
(
msg
)
?
DEFAULT_ERROR_MSG
:
msg
;
userFeign
.
withDrawprocess
(
fundPayVo
.
getOrderNo
(),
""
,
reason
,
false
,
e
.
getMessage
());
userFeign
.
withDrawprocess
(
fundPayVo
.
getOrderNo
(),
""
,
msg
,
false
);
//放弃此消息
//放弃此消息
basicNack
(
channel
,
message
.
getMessageProperties
().
getDeliveryTag
(),
false
,
false
,
pay_way
);
basicNack
(
channel
,
message
.
getMessageProperties
().
getDeliveryTag
(),
false
,
false
,
pay_way
);
}
}
...
...
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