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
abe84f02
Commit
abe84f02
authored
Dec 04, 2020
by
孙昱
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sunyu::update::fixbug
parent
b4954e8e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
+8
-6
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
View file @
abe84f02
...
@@ -1046,12 +1046,14 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -1046,12 +1046,14 @@ public class ShoppingCartMCoffeeServiceImpl {
//判断当前商品在购物车是否已存在,存在则数量+1,不存在商品行 + 1
//判断当前商品在购物车是否已存在,存在则数量+1,不存在商品行 + 1
allCartGoodsList
.
forEach
(
oldCartGoods
->
{
allCartGoodsList
.
forEach
(
oldCartGoods
->
{
int
index
;
int
index
;
if
((
index
=
nowCartGoodsList
.
indexOf
(
oldCartGoods
))
>=
0
)
{
if
(
nowCartGoodsList
.
size
()>
0
)
{
if
(
nowCartGoodsList
.
get
(
index
).
getSpuId
().
equals
(
oldCartGoods
.
getSpuId
())
for
(
int
i
=
0
;
i
<
nowCartGoodsList
.
size
();
i
++)
{
&&
nowCartGoodsList
.
get
(
index
).
getSkuId
().
equals
(
oldCartGoods
.
getSkuId
())){
if
(
nowCartGoodsList
.
get
(
i
).
getSkuId
().
equals
(
oldCartGoods
.
getSkuId
())
nowCartGoodsList
.
get
(
index
).
setQty
(
nowCartGoodsList
.
get
(
index
).
getQty
()
+
addCartGoods
.
getQty
());
&&
nowCartGoodsList
.
get
(
i
).
getSpuId
().
equals
(
oldCartGoods
.
getSpuId
())){
}
else
{
nowCartGoodsList
.
get
(
i
).
setQty
(
nowCartGoodsList
.
get
(
i
).
getQty
()
+
addCartGoods
.
getQty
());
nowCartGoodsList
.
add
(
oldCartGoods
);
}
else
{
nowCartGoodsList
.
add
(
oldCartGoods
);
}
}
}
}
else
{
}
else
{
nowCartGoodsList
.
add
(
oldCartGoods
);
nowCartGoodsList
.
add
(
oldCartGoods
);
...
...
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