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