记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
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
董敬伟
liquidnet-bus-v1
Commits
4d89c74a
Commit
4d89c74a
authored
Jul 13, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
微信回调 提交
parent
82bf9d4f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
17 deletions
+19
-17
DragonOrderRefundsServiceImpl.java
...ce/dragon/service/impl/DragonOrderRefundsServiceImpl.java
+19
-17
No files found.
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/service/impl/DragonOrderRefundsServiceImpl.java
View file @
4d89c74a
...
...
@@ -67,7 +67,7 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
);
redisUtil
.
set
(
DragonConstant
.
REFUND_REDIS_KET
+
orderRefundCode
,
notifyUrl
);
DragonRefundChannelDto
dto
=
null
;
String
localWePayCallBackUrl
=
url
+
"/refund/callBack/wepay"
;
String
localWePayCallBackUrl
=
url
+
"/refund/callBack/wepay"
;
if
(
insertResult
)
{
switch
(
paymentType
)
{
case
DragonConstant
.
REFUND_TYPE_APP_ALIPAY
:
...
...
@@ -150,8 +150,9 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
HttpEntity
entity
=
response
.
getEntity
();
entity
.
getContent
();
String
jsonStr
=
EntityUtils
.
toString
(
entity
,
"UTF-8"
);
log
.
debug
(
"JSONSTR = "
+
jsonStr
);
WePayRefundReturnDto
wePayRefundReturnDto
=
XmlUtil
.
toBean
(
jsonStr
,
WePayRefundReturnDto
.
class
);
log
.
debug
(
"BEAN = "
+
wePayRefundReturnDto
);
if
(!
wePayRefundReturnDto
.
getResultCode
().
equalsIgnoreCase
(
"SUCCESS"
)
||
wePayRefundReturnDto
.
getResultCode
()
==
null
)
{
try
{
String
refundError
=
""
;
...
...
@@ -333,11 +334,12 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
String
jsonStr
=
new
String
(
outSteam
.
toByteArray
(),
"utf-8"
);
outSteam
.
close
();
inStream
.
close
();
log
.
info
(
"JSON = "
+
jsonStr
);
log
.
debug
(
"JSON = "
+
jsonStr
);
WePayRefundReturnCallBackDto
callBackDto
=
XmlUtil
.
toBean
(
jsonStr
,
WePayRefundReturnCallBackDto
.
class
);
log
.
info
(
"DATA = "
+
callBackDto
);
log
.
debug
(
"DATA = "
+
callBackDto
);
if
(
callBackDto
.
getReturnCode
().
equalsIgnoreCase
(
"SUCCESS"
))
{
String
reqInfo
=
PayWepayUtils
.
getInstance
().
unCodeReqInfo
(
callBackDto
.
getReqInfo
());
log
.
debug
(
"REQINFO = "
+
reqInfo
);
WePayRefundReturnCallBackInfoDto
info
=
XmlUtil
.
toBean
(
reqInfo
,
WePayRefundReturnCallBackInfoDto
.
class
);
String
outRefundNo
=
info
.
getOutRefundNo
();
String
refundAt
=
info
.
getSuccessTime
();
...
...
@@ -352,9 +354,9 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
);
NotifyUrlDto
dto
=
new
NotifyUrlDto
();
if
(
info
.
getRefundStatus
().
equalsIgnoreCase
(
"SUCCESS"
))
{
if
(
info
.
getRefundStatus
().
equalsIgnoreCase
(
"SUCCESS"
))
{
dto
.
setStatus
(
1
);
}
else
{
}
else
{
dto
.
setStatus
(
0
);
}
// dto.setOrderCode();
...
...
@@ -417,23 +419,23 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
}
private
void
sendNotifyUrl
(
NotifyUrlDto
notifyUrlDto
){
private
void
sendNotifyUrl
(
NotifyUrlDto
notifyUrlDto
)
{
LocalDateTime
nowTime
=
LocalDateTime
.
now
();
MultiValueMap
<
String
,
String
>
params
=
new
LinkedMultiValueMap
();
params
.
add
(
"orderRefundCode"
,
notifyUrlDto
.
getOrderRefundCode
());
params
.
add
(
"refundAt"
,
notifyUrlDto
.
getRefundAt
());
params
.
add
(
"refundCode"
,
notifyUrlDto
.
getRefundCode
());
params
.
add
(
"refundError"
,
notifyUrlDto
.
getRefundError
());
params
.
add
(
"refundId"
,
notifyUrlDto
.
getRefundId
());
params
.
add
(
"refundPrice"
,
notifyUrlDto
.
getRefundPrice
());
params
.
add
(
"status"
,
notifyUrlDto
.
getStatus
().
toString
());
String
response
=
HttpUtil
.
post
((
String
)
redisUtil
.
get
(
DragonConstant
.
REFUND_REDIS_KET
+
notifyUrlDto
.
getOrderRefundCode
()),
params
);
if
(
response
.
equals
(
"success"
))
{
params
.
add
(
"orderRefundCode"
,
notifyUrlDto
.
getOrderRefundCode
());
params
.
add
(
"refundAt"
,
notifyUrlDto
.
getRefundAt
());
params
.
add
(
"refundCode"
,
notifyUrlDto
.
getRefundCode
());
params
.
add
(
"refundError"
,
notifyUrlDto
.
getRefundError
());
params
.
add
(
"refundId"
,
notifyUrlDto
.
getRefundId
());
params
.
add
(
"refundPrice"
,
notifyUrlDto
.
getRefundPrice
());
params
.
add
(
"status"
,
notifyUrlDto
.
getStatus
().
toString
());
String
response
=
HttpUtil
.
post
((
String
)
redisUtil
.
get
(
DragonConstant
.
REFUND_REDIS_KET
+
notifyUrlDto
.
getOrderRefundCode
()),
params
);
if
(
response
.
equals
(
"success"
))
{
sendMySqlRedis
(
SqlMapping
.
get
(
"dragon_order_refund_call_back.update"
),
new
Object
[]{
nowTime
,
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
format
(
nowTime
),
DragonConstant
.
RefundStatusEnum
.
STATUS_SUCCESS
.
getCode
(),
notifyUrlDto
.
getRefundCode
()}
);
}
else
{
}
else
{
sendMySqlRedis
(
SqlMapping
.
get
(
"dragon_order_refund_call_back.update"
),
new
Object
[]{
nowTime
,
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
format
(
nowTime
),
DragonConstant
.
RefundStatusEnum
.
STATUS_FAIL
.
getCode
(),
notifyUrlDto
.
getRefundCode
()}
...
...
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