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
052cf548
Commit
052cf548
authored
Jan 22, 2021
by
yu.sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sunyu::update::fix bug about iteator
parent
3ad93836
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
+4
-4
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
View file @
052cf548
...
@@ -359,19 +359,19 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -359,19 +359,19 @@ public class ShoppingCartMCoffeeServiceImpl {
for
(
CartGoods
goods
:
cartGoodsList
)
{
for
(
CartGoods
goods
:
cartGoodsList
)
{
if
(
Objects
.
equals
(
1
,
goods
.
getIsMonthCard
())
if
(
Objects
.
equals
(
1
,
goods
.
getIsMonthCard
())
&&
goods
.
getCartGoodsUid
().
equals
(
updateShoppingCartGoodsQtyRequestVo
.
getCartGoodsUid
())){
&&
goods
.
getCartGoodsUid
().
equals
(
updateShoppingCartGoodsQtyRequestVo
.
getCartGoodsUid
())){
if
(
updateShoppingCartGoodsQtyRequestVo
.
getQty
()
==
0
&&
cartGoodsList
.
size
()>
1
){
if
(
updateShoppingCartGoodsQtyRequestVo
.
getQty
()
==
0
){
Iterator
<
CartGoods
>
cartGoodsIterator
=
cartGoodsList
.
iterator
();
Iterator
<
CartGoods
>
cartGoodsIterator
=
cartGoodsList
.
iterator
();
while
(
cartGoodsIterator
.
hasNext
()){
while
(
cartGoodsIterator
.
hasNext
()){
String
couponCode
=
null
!=
cartGoodsIterator
.
next
()
?
String
couponCode
=
null
!=
cartGoodsIterator
.
next
()
?
cartGoodsIterator
.
next
().
getCouponCode
()
:
""
;
cartGoodsIterator
.
next
().
getCouponCode
()
:
""
;
if
(
StringUtils
.
isNotEmpty
(
couponCode
)
&&
couponCode
.
equals
(
goods
.
getMonthCardInfo
().
getCardCode
())){
if
(
cartGoodsList
.
size
()>
1
&&
StringUtils
.
isNotEmpty
(
couponCode
)
&&
couponCode
.
equals
(
goods
.
getMonthCardInfo
().
getCardCode
())){
cartGoodsIterator
.
remove
();
cartGoodsIterator
.
remove
();
break
;
break
;
}
}
}
else
{
}
else
{
cartGoodsList
=
new
ArrayList
<>();
cartGoodsList
=
new
ArrayList
<>();
}
}
}
}
if
(
updateShoppingCartGoodsQtyRequestVo
.
getQty
()>
10
)
{
if
(
updateShoppingCartGoodsQtyRequestVo
.
getQty
()>
10
)
{
throw
new
ServiceException
(
ResponseResult
.
SHOPPING_CART_QTY_LIMIT_ERR
);
throw
new
ServiceException
(
ResponseResult
.
SHOPPING_CART_QTY_LIMIT_ERR
);
}
}
...
...
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