Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_ht
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pseer
gxpt_ht
Commits
b491437e
Commit
b491437e
authored
Oct 10, 2024
by
liwenjun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
退款修改优惠券状态
parent
2d780206
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+8
-4
No files found.
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
b491437e
...
...
@@ -2304,12 +2304,11 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
// }
// 是否满足退款
boolean
isRefunds
;
SConsumerCoupon
coupon
=
null
;
if
(
ObjectUtil
.
isNotNull
(
sOrder
.
getCouponId
()))
{
SConsumerCoupon
coupon
=
consumerCouponService
.
getById
(
sOrder
.
getCouponId
());
coupon
=
consumerCouponService
.
getById
(
sOrder
.
getCouponId
());
// 判断是否可以退款
isRefunds
=
isRefund
(
sOrder
,
coupon
);
coupon
.
setUseStatus
(
UserStatusEnum
.
UNUSED
.
getCode
());
consumerCouponService
.
updateById
(
coupon
);
}
else
{
// 判断是否可以退款
isRefunds
=
isRefund
(
sOrder
,
null
);
...
...
@@ -2375,8 +2374,13 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
//微信退款
// if (sOrder.getPayType().equals(PayTypeEnum.WECHAT.getCode()) && request.getAmount().compareTo(BigDecimal.ZERO) == 0) {
// 退款task, 定时任务退优惠券
redisUtil
.
lPush
(
Constants
.
ORDER_TASK_REDIS_KEY_AFTER_REFUND_BY_USER
,
sOrder
.
getId
());
//
redisUtil.lPush(Constants.ORDER_TASK_REDIS_KEY_AFTER_REFUND_BY_USER, sOrder.getId());
// }
// 退优惠券
if
(
coupon
!=
null
)
{
coupon
.
setUseStatus
(
UserStatusEnum
.
UNUSED
.
getCode
());
consumerCouponService
.
updateById
(
coupon
);
}
execute
=
Boolean
.
TRUE
;
}
catch
(
Exception
e
)
{
logger
.
error
(
e
.
toString
());
...
...
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