Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
order-group
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
order-group-application
order-group
Commits
6fe5ca66
Commit
6fe5ca66
authored
Nov 15, 2021
by
徐康
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
黑名单商品券
parent
88073db4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/CouponServiceImpl.java
+14
-7
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/CouponServiceImpl.java
View file @
6fe5ca66
...
@@ -760,17 +760,24 @@ public class CouponServiceImpl implements CouponService {
...
@@ -760,17 +760,24 @@ public class CouponServiceImpl implements CouponService {
for
(
GetCouponDetailResponseDto
.
Details
detail
:
couponDetailResponseDto
.
getDetails
())
{
for
(
GetCouponDetailResponseDto
.
Details
detail
:
couponDetailResponseDto
.
getDetails
())
{
if
(
productValid
)
break
;
if
(
productValid
)
break
;
if
(!
CouponStatus
.
STATUS_0
.
getCode
().
equals
(
detail
.
getStatus
())
&&
!
CouponStatus
.
STATUS_2
.
getCode
().
equals
(
detail
.
getStatus
()))
continue
;
if
(!
CouponStatus
.
STATUS_0
.
getCode
().
equals
(
detail
.
getStatus
())
&&
!
CouponStatus
.
STATUS_2
.
getCode
().
equals
(
detail
.
getStatus
()))
continue
;
for
(
GetCouponDetailResponseDto
.
ActiveProduct
activeProduct
:
detail
.
getActiveProduct
())
{
if
(
CouponTypeEnum
.
TYPE_0
.
getCode
().
equals
(
detail
.
getType
())
&&
Integer
.
valueOf
(
1
).
equals
(
detail
.
getSubType
()))
{
if
(
goodsId
.
equals
(
activeProduct
.
getProductIdPartner
()))
{
//黑名单商品券处理
if
(
CouponTypeEnum
.
TYPE_0
.
getCode
().
equals
(
detail
.
getType
())
&&
Integer
.
valueOf
(
1
).
equals
(
detail
.
getSubType
()))
{
for
(
GetCouponDetailResponseDto
.
ActiveProduct
activeProduct
:
detail
.
getActiveProduct
())
{
//券码传过来的是黑名单
if
(
goodsId
.
equals
(
activeProduct
.
getProductIdPartner
()))
{
return
null
;
throw
new
ServiceException
(
ResponseResult
.
SHOPPING_CART_COUPON_NOT_EXIST
,
"加购商品在商品券商品黑名单中。"
);
}
else
{
}
}
productValid
=
true
;
couponActivityDetail
=
detail
;
couponType
=
CouponTypeEnum
.
TYPE_4
.
getCode
();
}
else
{
for
(
GetCouponDetailResponseDto
.
ActiveProduct
activeProduct
:
detail
.
getActiveProduct
())
{
if
(
goodsId
.
equals
(
activeProduct
.
getProductIdPartner
()))
{
productValid
=
true
;
productValid
=
true
;
couponActivityDetail
=
detail
;
couponActivityDetail
=
detail
;
couponType
=
CouponTypeEnum
.
TYPE_4
.
getCode
();
couponType
=
CouponTypeEnum
.
TYPE_4
.
getCode
();
break
;
}
}
break
;
}
}
}
}
if
(
CouponTypeEnum
.
TYPE_7
.
getCode
().
equals
(
detail
.
getType
())){
if
(
CouponTypeEnum
.
TYPE_7
.
getCode
().
equals
(
detail
.
getType
())){
...
...
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