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
0ec08f17
Commit
0ec08f17
authored
Jun 18, 2021
by
徐康
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/xukang_20210609_麦咖啡p7v2' into qa
parents
c623942a
dda7fa30
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
19 deletions
+19
-19
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/calculation/CouponDiscountCalculation.java
+19
-19
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/calculation/CouponDiscountCalculation.java
View file @
0ec08f17
...
@@ -242,25 +242,25 @@ public class CouponDiscountCalculation {
...
@@ -242,25 +242,25 @@ public class CouponDiscountCalculation {
}
}
if
(
haveB3S1Fav
)
{
if
(
haveB3S1Fav
)
{
List
<
CartGoods
>
nowCartGoodsList
=
new
ArrayList
<>();
//
List<CartGoods> nowCartGoodsList = new ArrayList<>();
AtomicBoolean
changed
=
new
AtomicBoolean
();
//
AtomicBoolean changed = new AtomicBoolean();
changed
.
set
(
false
);
//
changed.set(false);
if
(
CollectionUtils
.
isNotEmpty
(
cartGoodsList
)){
//
if(CollectionUtils.isNotEmpty(cartGoodsList)){
ApiLog
.
debug
(
"合并买3赠1商品券 【merge-before】 : {} "
,
JSONObject
.
toJSONString
(
cartGoodsList
));
//
ApiLog.debug("合并买3赠1商品券 【merge-before】 : {} ", JSONObject.toJSONString(cartGoodsList));
cartGoodsList
.
forEach
(
newCartGood
->
{
//
cartGoodsList.forEach(newCartGood -> {
int
index
;
//
int index;
if
((
index
=
nowCartGoodsList
.
indexOf
(
newCartGood
))
>=
0
)
{
//
if ((index = nowCartGoodsList.indexOf(newCartGood)) >= 0) {
changed
.
set
(
true
);
//
changed.set(true);
nowCartGoodsList
.
get
(
index
).
setQty
(
nowCartGoodsList
.
get
(
index
).
getQty
()
+
newCartGood
.
getQty
());
//
nowCartGoodsList.get(index).setQty(nowCartGoodsList.get(index).getQty() + newCartGood.getQty());
}
else
{
//
} else {
nowCartGoodsList
.
add
(
newCartGood
);
//
nowCartGoodsList.add(newCartGood);
}
//
}
});
//
});
}
//
}
if
(
changed
.
get
())
{
//
if(changed.get()) {
cartGoodsList
.
clear
();
//
cartGoodsList.clear();
cartGoodsList
.
addAll
(
nowCartGoodsList
);
//
cartGoodsList.addAll(nowCartGoodsList);
}
//
}
int
index
=
0
;
int
index
=
0
;
for
(
int
i
=
0
;
i
<
cartGoodsList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
cartGoodsList
.
size
();
i
++)
{
...
...
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