Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
usedCarAuction
/
aus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 822e7f1d
authored
May 13, 2026
by
章家宝
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixbug:优惠券退回改状态
1 parent
4180d01f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
aus-core/src/main/java/com/glsx/usedcar/module/coupon/service/CouponVerificationService.java
aus-core/src/main/java/com/glsx/usedcar/module/coupon/service/CouponVerificationService.java
View file @
822e7f1
...
...
@@ -293,7 +293,7 @@ public class CouponVerificationService {
* 订单取消时退回优惠券(重新发放新券,原券保持已核销状态,新券有效期与原券相同)
* 注意:此方法捕获所有异常,确保优惠券退回失败不影响订单取消主流程
*/
@Transactional
(
rollbackFor
=
Exception
.
class
,
propagation
=
Propagation
.
REQUIRES_NEW
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
returnCouponWhenOrderCancel
(
Integer
orderId
,
String
cancelReason
)
{
try
{
LocalDateTime
now
=
LocalDateTime
.
now
();
...
...
@@ -371,6 +371,10 @@ public class CouponVerificationService {
usage
.
setReturnReason
(
cancelReason
);
couponOrderUsageRepository
.
save
(
usage
);
// 8. 原优惠券状态改为已退回
originalCoupon
.
setStatus
(
CouponUserStatusEnum
.
RETURNED
.
getCode
());
couponAccountRepository
.
save
(
originalCoupon
);
// 恢复订单金额
AuctionOrder
order
=
auctionOrderDao
.
findByOrderId
(
orderId
);
if
(
order
!=
null
)
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment