Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
order-group
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
order-group-application
order-group
Commits
6b8728b9
Commit
6b8728b9
authored
Dec 22, 2020
by
xiaoer.li@freemud.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加超时退款渠道
parent
3ceb92d4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
order-application-service/src/main/java/cn/freemud/service/impl/OrderAdapterServiceImpl.java
+5
-2
order-application-service/src/main/java/cn/freemud/service/impl/OrderServiceImpl.java
+3
-1
No files found.
order-application-service/src/main/java/cn/freemud/service/impl/OrderAdapterServiceImpl.java
View file @
6b8728b9
...
...
@@ -31,6 +31,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
java.util.Arrays
;
import
java.util.Map
;
/**
...
...
@@ -86,7 +87,8 @@ public class OrderAdapterServiceImpl implements OrderAdapterService {
private
OrderCommonService
orderCommonService
;
@Autowired
private
SellCouponOrderServiceImpl
sellCouponOrderService
;
@Value
(
"${saas.autoRefund.client}"
)
private
String
autoRefundClient
;
@Override
public
BaseResponse
createOrderNew
(
CreateOrderVo
createOrderVo
)
{
AssortmentCustomerInfoVo
assortmentCustomerInfoVo
=
assortmentCustomerInfoManager
.
getCustomerInfoByObject
(
createOrderVo
.
getSessionId
());
...
...
@@ -236,8 +238,9 @@ public class OrderAdapterServiceImpl implements OrderAdapterService {
if
(!
PayStatus
.
NOT_PAY
.
getCode
().
equals
(
orderBean
.
getPayStatus
())){
return
orderAdapter
.
sendPaySuccessNoticeMessage
();
}
Integer
client
=
OrderSourceType
.
getClientByCode
(
orderBean
.
getSource
());
//若是app订单超时回调了 订单已取消则做退款处理
if
(
OrderStatus
.
CALCEL
.
getCode
().
equals
(
orderBean
.
getStatus
())
&&
OrderSourceType
.
SAAS
.
getCode
().
equals
(
orderBean
.
getSource
()
))
{
if
(
OrderStatus
.
CALCEL
.
getCode
().
equals
(
orderBean
.
getStatus
())
&&
Arrays
.
asList
(
autoRefundClient
.
split
(
","
)).
contains
(
client
))
{
orderService
.
timeOutRefund
(
orderBean
);
return
orderAdapter
.
sendPaySuccessNoticeMessage
();
}
...
...
order-application-service/src/main/java/cn/freemud/service/impl/OrderServiceImpl.java
View file @
6b8728b9
...
...
@@ -3524,13 +3524,15 @@ public class OrderServiceImpl implements Orderservice {
//调用支付退款
log
.
info
(
"payment timeout callback for refund orderDto={}"
,
JSON
.
toJSONString
(
orderBean
));
Integer
abState
=
4
;
if
(
abState
.
equals
(
orderBean
.
getAbnormalState
()))
{
if
(
abState
.
equals
(
orderBean
.
getAbnormalState
())
||
CollectionUtils
.
isNotEmpty
(
orderBean
.
getRefundList
()))
{
log
.
info
(
"payment timeout callback for refund is exist"
);
return
;
}
com
.
freemud
.
application
.
sdk
.
api
.
base
.
BaseResponse
<
OrderRefundResponse
>
response
=
null
;
Long
refundId
=
System
.
currentTimeMillis
();
OrderExtInfoDto
orderExtInfoDTO
=
gson
.
fromJson
(
orderBean
.
getExtInfo
(),
OrderExtInfoDto
.
class
);
if
(
orderExtInfoDTO
==
null
||
StringUtils
.
isBlank
(
orderExtInfoDTO
.
getFmId
()))
{
log
.
info
(
"payment timeout callback for refund not create pre order"
);
return
;
}
Integer
state
=
PayRefundStatus
.
SUCCESS
.
getCode
();
...
...
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