Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gogirl-miniapp-backend
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
huluobin
gogirl-miniapp-backend
Commits
d37ce92e
Commit
d37ce92e
authored
Jun 10, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
16a28fa1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
CouponServiceImpl.java
...irl/application/market/coupon/impl/CouponServiceImpl.java
+4
-4
No files found.
src/main/java/com/gogirl/application/market/coupon/impl/CouponServiceImpl.java
View file @
d37ce92e
...
...
@@ -200,6 +200,7 @@ public class CouponServiceImpl extends ServiceImpl<CouponMapper, Coupon> impleme
public
void
checkCouponConflict
(
Collection
<
Integer
>
couponIdList
)
throws
RRException
{
LinkedList
<
Integer
>
linkList
=
new
LinkedList
<>(
couponIdList
);
//终止条件
if
(
linkList
.
size
()
==
2
)
{
Integer
couponId
=
linkList
.
get
(
0
);
...
...
@@ -209,18 +210,18 @@ public class CouponServiceImpl extends ServiceImpl<CouponMapper, Coupon> impleme
if
(
couponExcludeDetailed
!=
null
)
{
Coupon
coupon
=
this
.
getById
(
couponId
);
Coupon
excludeCoupon
=
this
.
getById
(
excludeCouponId
);
throw
new
RRException
(
"卡券:
{}和卡券{}不同
同时使用"
,
coupon
.
getName
(),
excludeCoupon
.
getName
());
throw
new
RRException
(
"卡券:
%s和卡券%s不能
同时使用"
,
coupon
.
getName
(),
excludeCoupon
.
getName
());
}
}
//
else
{
else
if
(
linkList
.
size
()
>
2
)
{
Integer
first
=
linkList
.
pollFirst
();
for
(
Integer
couponId
:
linkList
)
{
CouponExcludeDetailed
couponExcludeDetailed
=
couponExcludeDetailedMapper
.
selectExcludeDetailed
(
couponId
,
first
);
if
(
couponExcludeDetailed
!=
null
)
{
Coupon
coupon
=
this
.
getById
(
couponExcludeDetailed
.
getCouponId
());
Coupon
excludeCoupon
=
this
.
getById
(
couponExcludeDetailed
.
getExcludeCouponId
());
throw
new
RRException
(
"卡券:
{}和卡券{}不同
同时使用"
,
coupon
.
getName
(),
excludeCoupon
.
getName
());
throw
new
RRException
(
"卡券:
%s和卡券%s不能
同时使用"
,
coupon
.
getName
(),
excludeCoupon
.
getName
());
}
}
...
...
@@ -229,5 +230,4 @@ public class CouponServiceImpl extends ServiceImpl<CouponMapper, Coupon> impleme
}
}
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