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
e6e35ef3
Commit
e6e35ef3
authored
Jun 22, 2020
by
xiaoer.li@freemud.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'remotes/origin/fix_集点不参与积分同享'
parents
d273b978
4134840d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
4 deletions
+22
-4
shopping-cart-application-service/src/main/java/cn/freemud/enums/ActivityTypeEnum.java
+2
-1
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/CustomerScoreService.java
+20
-3
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/enums/ActivityTypeEnum.java
View file @
e6e35ef3
...
...
@@ -52,7 +52,8 @@ public enum ActivityTypeEnum {
TYPE_200
(
200
,
"X元Y件"
),
TYPE_PACKAGE
(
900
,
"包装费"
),
TYPE_DELIVERY
(
901
,
"配送费"
),
TYPE_320
(
320
,
"会员价商品优惠"
);
TYPE_320
(
320
,
"会员价商品优惠"
),
TYPE_221
(
221
,
"集点"
);
private
Integer
code
;
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/CustomerScoreService.java
View file @
e6e35ef3
...
...
@@ -76,6 +76,7 @@ public class CustomerScoreService implements IPromotionService {
}
else
{
if
(
StringUtils
.
isNotBlank
(
shoppingCartInfoRequestVo
.
getCouponCode
())
||
(
calculationDiscountResult
!=
null
&&
calculationDiscountResult
.
getTotalDiscountAmount
().
intValue
()
>
0
)
||
(
calculationDiscountResult
!=
null
&&
!
CollectionUtils
.
isEmpty
(
calculationDiscountResult
.
getDiscounts
())))
{
//是否有换购
int
type81
=
0
;
for
(
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
.
Discount
discount
:
calculationDiscountResult
.
getDiscounts
())
{
if
(
ActivityTypeEnum
.
TYPE_81
.
getCode
().
equals
(
discount
.
getType
()))
{
...
...
@@ -83,9 +84,25 @@ public class CustomerScoreService implements IPromotionService {
break
;
}
}
//积分抵扣开关禁用 过滤换购
if
(
type81
==
0
||
(
type81
==
1
&&
!
CollectionUtils
.
isEmpty
(
shoppingCartInfoRequestVo
.
getSendGoods
()))
||
(
type81
==
1
&&
calculationDiscountResult
.
getDiscounts
().
size
()
>
1
))
{
//集点
long
discountCount
=
calculationDiscountResult
.
getDiscounts
().
stream
().
filter
(
discount
->
!
ActivityTypeEnum
.
TYPE_221
.
getCode
().
equals
(
discount
.
getType
())).
count
();
/*
int discountCount = calculationDiscountResult.getDiscounts().size();
int type211 = 0;
for (ActivityCalculationDiscountResponseDto.CalculationDiscountResult.Discount discount : calculationDiscountResult.getDiscounts()) {
if (ActivityTypeEnum.TYPE_221.getCode().equals(discount.getType())) {
type211 += 1;
break;
}
}
discountCount = discountCount - type211;
*/
//积分抵扣开关禁用 有换购活动 且选中了换购商品
// - 有换购且选中了换购商品
// - 有换购且没有选中换购商品 且除集点以外还有其他促销
if
((
type81
==
0
&&
discountCount
>=
1
)
||
(
type81
==
1
&&
!
CollectionUtils
.
isEmpty
(
shoppingCartInfoRequestVo
.
getSendGoods
()))
||
(
type81
==
1
&&
discountCount
>
1
))
{
customerScoreVo
.
setScoreReduceState
(
5
);
userScoreUseDetail
.
getResult
().
setScoreState
(
5
);
discountAmount
=
0
;
...
...
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