记得上下班打卡 | 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
ab55f8e3
Commit
ab55f8e3
authored
Jul 14, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
`提交支付宝 退款回调`
parent
54d59c7a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
11 deletions
+21
-11
AliRefundCallBackBodyDto.java
...iquidnet/service/dragon/dto/AliRefundCallBackBodyDto.java
+14
-0
DragonOrderRefundsServiceImpl.java
...ce/dragon/service/impl/DragonOrderRefundsServiceImpl.java
+7
-11
No files found.
liquidnet-bus-api/liquidnet-service-dragon-api/src/main/java/com/liquidnet/service/dragon/dto/AliRefundCallBackBodyDto.java
0 → 100644
View file @
ab55f8e3
package
com
.
liquidnet
.
service
.
dragon
.
dto
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
lombok.Data
;
@Data
public
class
AliRefundCallBackBodyDto
{
@JsonProperty
(
"out_trade_no"
)
private
String
outTradeNo
;
@JsonProperty
(
"trade_no"
)
private
String
tradeNo
;
@JsonProperty
(
"out_request_no"
)
private
String
outRequestNo
;
}
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/service/impl/DragonOrderRefundsServiceImpl.java
View file @
ab55f8e3
...
@@ -16,21 +16,16 @@ import com.liquidnet.service.dragon.channel.wepay.resp.AliPayRefundReturnCallBac
...
@@ -16,21 +16,16 @@ import com.liquidnet.service.dragon.channel.wepay.resp.AliPayRefundReturnCallBac
import
com.liquidnet.service.dragon.channel.wepay.resp.WePayRefundReturnCallBackDto
;
import
com.liquidnet.service.dragon.channel.wepay.resp.WePayRefundReturnCallBackDto
;
import
com.liquidnet.service.dragon.channel.wepay.resp.WePayRefundReturnCallBackInfoDto
;
import
com.liquidnet.service.dragon.channel.wepay.resp.WePayRefundReturnCallBackInfoDto
;
import
com.liquidnet.service.dragon.constant.DragonConstant
;
import
com.liquidnet.service.dragon.constant.DragonConstant
;
import
com.liquidnet.service.dragon.dto.DragonRefundAppDto
;
import
com.liquidnet.service.dragon.dto.*
;
import
com.liquidnet.service.dragon.dto.DragonRefundChannelDto
;
import
com.liquidnet.service.dragon.dto.NotifyUrlDto
;
import
com.liquidnet.service.dragon.dto.RefundContentDto
;
import
com.liquidnet.service.dragon.channel.wepay.resp.WePayRefundReturnDto
;
import
com.liquidnet.service.dragon.channel.wepay.resp.WePayRefundReturnDto
;
import
com.liquidnet.service.dragon.service.IDragonOrderRefundsService
;
import
com.liquidnet.service.dragon.service.IDragonOrderRefundsService
;
import
com.liquidnet.service.dragon.utils.PayAlipayUtils
;
import
com.liquidnet.service.dragon.utils.PayAlipayUtils
;
import
com.liquidnet.service.dragon.utils.PayWepayUtils
;
import
com.liquidnet.service.dragon.utils.PayWepayUtils
;
import
com.liquidnet.service.dragon.utils.XmlUtil
;
import
com.liquidnet.service.dragon.utils.XmlUtil
;
import
io.github.classgraph.json.JSONUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.http.HttpEntity
;
import
org.apache.http.HttpEntity
;
import
org.apache.http.client.methods.CloseableHttpResponse
;
import
org.apache.http.client.methods.CloseableHttpResponse
;
import
org.apache.http.client.methods.HttpPost
;
import
org.apache.http.client.methods.HttpPost
;
import
org.apache.http.client.utils.DateUtils
;
import
org.apache.http.entity.StringEntity
;
import
org.apache.http.entity.StringEntity
;
import
org.apache.http.util.EntityUtils
;
import
org.apache.http.util.EntityUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -420,7 +415,8 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
...
@@ -420,7 +415,8 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
"\"out_request_no\":\""
+
callBackDto
.
getOutBizNo
()
+
"\"}"
);
//设置业务参数
"\"out_request_no\":\""
+
callBackDto
.
getOutBizNo
()
+
"\"}"
);
//设置业务参数
AlipayTradeFastpayRefundQueryResponse
response
=
PayAlipayUtils
.
getInstance
().
getHttpClient
().
execute
(
request
);
AlipayTradeFastpayRefundQueryResponse
response
=
PayAlipayUtils
.
getInstance
().
getHttpClient
().
execute
(
request
);
log
.
debug
(
"AlipayTradeFastpayRefundQueryRequest -> data = "
+
JSON
.
toJSONString
(
response
));
log
.
debug
(
"AlipayTradeFastpayRefundQueryRequest -> data = "
+
JSON
.
toJSONString
(
response
));
if
(
response
.
getRefundChannelStatus
().
equalsIgnoreCase
(
"SUCCESS"
))
{
if
(
response
.
isSuccess
())
{
try
{
try
{
sendMySqlRedis
(
sendMySqlRedis
(
SqlMapping
.
get
(
"dragon_order_refund_log.insert"
),
SqlMapping
.
get
(
"dragon_order_refund_log.insert"
),
...
@@ -428,11 +424,11 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
...
@@ -428,11 +424,11 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
);
);
sendMySqlRedis
(
sendMySqlRedis
(
SqlMapping
.
get
(
"dragon_order_refund_success.update"
),
SqlMapping
.
get
(
"dragon_order_refund_success.update"
),
new
Object
[]{
nowTime
,
response
.
getGmtRefundPay
(),
DragonConstant
.
RefundStatusEnum
.
STATUS_REFUNDED
.
getCode
(),
response
.
getOutRequestNo
()}
new
Object
[]{
nowTime
,
callBackDto
.
getGmtRefund
(),
DragonConstant
.
RefundStatusEnum
.
STATUS_REFUNDED
.
getCode
(),
response
.
getOutRequestNo
()}
);
);
NotifyUrlDto
dto
=
new
NotifyUrlDto
();
NotifyUrlDto
dto
=
new
NotifyUrlDto
();
if
(
response
.
get
RefundChannelStatus
().
equalsIgnoreCase
(
"SUCCESS"
))
{
if
(
response
.
get
Msg
().
equalsIgnoreCase
(
"SUCCESS"
))
{
dto
.
setStatus
(
1
);
dto
.
setStatus
(
1
);
}
else
{
}
else
{
dto
.
setStatus
(
0
);
dto
.
setStatus
(
0
);
...
@@ -440,9 +436,9 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
...
@@ -440,9 +436,9 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
dto
.
setOrderRefundCode
(
response
.
getOutRequestNo
());
dto
.
setOrderRefundCode
(
response
.
getOutRequestNo
());
dto
.
setRefundCode
(
response
.
getOutTradeNo
());
dto
.
setRefundCode
(
response
.
getOutTradeNo
());
dto
.
setRefundPrice
(
response
.
getRefundAmount
());
dto
.
setRefundPrice
(
response
.
getRefundAmount
());
dto
.
setRefundAt
(
DateUtil
.
format
(
response
.
getGmtRefundPay
(),
DateUtil
.
Formatter
.
yyyyMMddHHmmss
));
dto
.
setRefundAt
(
callBackDto
.
getGmtRefund
(
));
dto
.
setRefundPrice
(
response
.
getRefundAmount
());
dto
.
setRefundPrice
(
response
.
getRefundAmount
());
dto
.
setRefundError
(
response
.
getSubMsg
()
);
dto
.
setRefundError
(
""
);
sendNotifyUrl
(
dto
);
sendNotifyUrl
(
dto
);
return
"success"
;
return
"success"
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
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