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
057f8f2a
Commit
057f8f2a
authored
Mar 13, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改小程序是退款的判断
parent
7c3fefce
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+10
-6
No files found.
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
057f8f2a
...
@@ -213,9 +213,10 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -213,9 +213,10 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
*/
*/
@Override
@Override
public
boolean
isRefund
(
SOrderVo
orderVo
,
SConsumerCoupon
coupon
)
{
public
boolean
isRefund
(
SOrderVo
orderVo
,
SConsumerCoupon
coupon
)
{
if
(
coupon
!=
null
&&
!
PlatformTypeEnum
.
SELF
.
getCode
().
equals
(
coupon
.
getPlatformType
()))
{
// if (coupon != null && !PlatformTypeEnum.SELF.getCode().equals(coupon.getPlatformType())) {
return
Boolean
.
FALSE
;
// return Boolean.FALSE;
}
else
if
(
orderVo
!=
null
&&
OrderStatusEnum
.
UNUSED
.
getCode
().
equals
(
orderVo
.
getStatus
())
// } else
if
(
orderVo
!=
null
&&
OrderStatusEnum
.
UNUSED
.
getCode
().
equals
(
orderVo
.
getStatus
())
&&
OrderTypeEnum
.
RESERVER
.
getCode
().
equals
(
orderVo
.
getOrderType
()))
{
&&
OrderTypeEnum
.
RESERVER
.
getCode
().
equals
(
orderVo
.
getOrderType
()))
{
Date
startTime
=
orderVo
.
getPreStartDate
();
Date
startTime
=
orderVo
.
getPreStartDate
();
Date
nowTime
=
cn
.
hutool
.
core
.
date
.
DateUtil
.
date
();
Date
nowTime
=
cn
.
hutool
.
core
.
date
.
DateUtil
.
date
();
...
@@ -240,9 +241,10 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -240,9 +241,10 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
*/
*/
@Override
@Override
public
boolean
isRefund
(
SOrder
order
,
SConsumerCoupon
coupon
)
{
public
boolean
isRefund
(
SOrder
order
,
SConsumerCoupon
coupon
)
{
if
(
coupon
!=
null
&&
!
PlatformTypeEnum
.
SELF
.
getCode
().
equals
(
coupon
.
getPlatformType
()))
{
// if (coupon != null && !PlatformTypeEnum.SELF.getCode().equals(coupon.getPlatformType())) {
return
Boolean
.
FALSE
;
// return Boolean.FALSE;
}
else
if
(
order
!=
null
&&
OrderStatusEnum
.
UNUSED
.
getCode
().
equals
(
order
.
getStatus
()))
{
// } else
if
(
order
!=
null
&&
OrderStatusEnum
.
UNUSED
.
getCode
().
equals
(
order
.
getStatus
()))
{
Date
startTime
=
order
.
getPreStartDate
();
Date
startTime
=
order
.
getPreStartDate
();
Date
nowTime
=
cn
.
hutool
.
core
.
date
.
DateUtil
.
date
();
Date
nowTime
=
cn
.
hutool
.
core
.
date
.
DateUtil
.
date
();
if
(
startTime
.
compareTo
(
nowTime
)
<=
0
)
{
if
(
startTime
.
compareTo
(
nowTime
)
<=
0
)
{
...
@@ -1155,6 +1157,8 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -1155,6 +1157,8 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
SConsumerCoupon
coupon
=
consumerCouponService
.
getById
(
sOrder
.
getCouponId
());
SConsumerCoupon
coupon
=
consumerCouponService
.
getById
(
sOrder
.
getCouponId
());
// 判断是否可以退款
// 判断是否可以退款
isRefunds
=
isRefund
(
sOrder
,
coupon
);
isRefunds
=
isRefund
(
sOrder
,
coupon
);
coupon
.
setUseStatus
(
UserStatusEnum
.
UNUSED
.
getCode
());
consumerCouponService
.
updateById
(
coupon
);
}
else
{
}
else
{
// 判断是否可以退款
// 判断是否可以退款
isRefunds
=
isRefund
(
sOrder
,
null
);
isRefunds
=
isRefund
(
sOrder
,
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