记得上下班打卡 | 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
749ecc84
Commit
749ecc84
authored
Apr 27, 2025
by
zhoujianping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.退款失败定时处理
parent
c477238e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
0 deletions
+55
-0
FeignPlatformTaskClient.java
...net/service/feign/kylin/task/FeignPlatformTaskClient.java
+10
-0
KylinTaskHandler.java
...idnet/service/executor/main/handler/KylinTaskHandler.java
+17
-0
OrderRefundCallbackController.java
...form/controller/refund/OrderRefundCallbackController.java
+12
-0
OrderRefundsCallbackServiceImpl.java
...tform/service/refund/OrderRefundsCallbackServiceImpl.java
+16
-0
No files found.
liquidnet-bus-feign/liquidnet-api-feign-kylin/src/main/java/com/liquidnet/service/feign/kylin/task/FeignPlatformTaskClient.java
View file @
749ecc84
...
...
@@ -40,4 +40,14 @@ public interface FeignPlatformTaskClient {
*/
@GetMapping
(
"platform/performance/subscribePush"
)
ResponseDto
<
Boolean
>
performanceSubscribePush
();
/*
* @description: 自动处理退款失败
* @author: zjp
* @date: 2025/4/27 14:28
* @param: []
* @return: com.liquidnet.service.base.ResponseDto<java.lang.Boolean>
**/
@GetMapping
(
"platform/refund/failRefund"
)
ResponseDto
<
Boolean
>
failRefund
();
}
liquidnet-bus-service/liquidnet-service-executor-all/liquidnet-service-executor-main/src/main/java/com/liquidnet/service/executor/main/handler/KylinTaskHandler.java
View file @
749ecc84
...
...
@@ -99,4 +99,21 @@ public class KylinTaskHandler {
XxlJobHelper
.
handleFail
();
}
}
/**
* 退款失败自动处理
* @author zjp
* @param null
* @return: null
* @date 2024/3/21 15:32
*/
@XxlJob
(
value
=
"sev-platform:failRefund"
)
public
void
failRefund
()
{
try
{
XxlJobHelper
.
handleSuccess
(
"结果:"
+
feignPlatformTaskClient
.
failRefund
().
getData
());
}
catch
(
Exception
e
)
{
XxlJobHelper
.
log
(
e
);
XxlJobHelper
.
handleFail
();
}
}
}
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/controller/refund/OrderRefundCallbackController.java
View file @
749ecc84
package
com
.
liquidnet
.
service
.
platform
.
controller
.
refund
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.kylin.constant.KylinRedisConst
;
import
com.liquidnet.service.kylin.dto.param.RefundApplyParam
;
import
com.liquidnet.service.kylin.dto.param.RefundCallbackParam
;
import
com.liquidnet.service.kylin.dto.param.RefundSearchParam
;
...
...
@@ -46,6 +47,17 @@ public class OrderRefundCallbackController {
return
orderRefundsCallbackServiceImpl
.
automaticRefund
(
orderRefundsId
);
}
@GetMapping
(
value
=
"failRefund"
)
@ApiOperation
(
value
=
"退款失败定时处理"
)
public
ResponseDto
<
Boolean
>
performanceSubscribePush
()
{
try
{
orderRefundsCallbackServiceImpl
.
failRefund
();
return
ResponseDto
.
success
(
true
);
}
catch
(
Exception
e
)
{
return
ResponseDto
.
success
(
false
);
}
}
@GetMapping
(
"alipayActiveCallback"
)
@ApiOperation
(
"支付宝主动查询退款结果"
)
public
ResponseDto
<
String
>
alipayActiveCallback
()
{
...
...
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/service/refund/OrderRefundsCallbackServiceImpl.java
View file @
749ecc84
...
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.liquidnet.commons.lang.util.CollectionUtil
;
import
com.liquidnet.commons.lang.util.HttpUtil
;
import
com.liquidnet.commons.lang.util.JsonUtils
;
import
com.liquidnet.service.base.ResponseDto
;
...
...
@@ -195,6 +196,21 @@ public class OrderRefundsCallbackServiceImpl extends ServiceImpl<KylinOrderRefun
}
return
ResponseDto
.
success
(
"success"
);
}
public
void
failRefund
(){
List
<
KylinOrderRefunds
>
kylinOrderRefunds
=
kylinOrderRefundsMapper
.
selectList
(
Wrappers
.
lambdaQuery
(
KylinOrderRefunds
.
class
)
.
eq
(
KylinOrderRefunds:
:
getStatus
,
KylinTableStatusConst
.
ORDER_REFUND_STATUS_ERROR
)
);
log
.
info
(
"自动处理退款失败开始"
);
if
(!
CollectionUtil
.
isEmpty
(
kylinOrderRefunds
)){
for
(
KylinOrderRefunds
kylinOrderRefund
:
kylinOrderRefunds
)
{
String
refundId
=
kylinOrderRefund
.
getRefundId
();
log
.
info
(
"自动处理退款失败RefundId={}"
,
refundId
);
this
.
automaticRefund
(
refundId
);
}
}
}
@Override
public
String
getOrderRefundCode
(
String
orderRefundCode
,
int
type
)
{
return
null
;
...
...
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