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
91e58071
Commit
91e58071
authored
Apr 06, 2021
by
孙昱
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sunyu::update::fix bug about updateGoodsQty
parent
51c8dd4b
Hide 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 @
91e58071
...
...
@@ -562,7 +562,7 @@ public class ShoppingCartMCoffeeServiceImpl {
}
if
(
cartGoodsUid
.
equals
(
cartGoods_
.
getCartGoodsUid
()))
{
if
(
cartGoods_
.
getIsMonthCard
()
==
1
&&
qty
==
0
){
cartGoodsList
=
clearMonthCouponInfo
(
cartGoodsList
,
cartGoods_
.
get
CouponCode
()
);
cartGoodsList
=
clearMonthCouponInfo
(
cartGoodsList
,
cartGoods_
.
get
MonthCardInfo
().
getCardCode
(),
cartGoodsUid
);
}
cartGoods
=
cartGoods_
;
cartGoods_
.
setQty
(
qty
);
...
...
@@ -2340,13 +2340,13 @@ public class ShoppingCartMCoffeeServiceImpl {
* @param cartGoods
* @param couponCode
*/
private
List
<
CartGoods
>
clearMonthCouponInfo
(
List
<
CartGoods
>
cartGoods
,
String
couponCode
){
private
List
<
CartGoods
>
clearMonthCouponInfo
(
List
<
CartGoods
>
cartGoods
,
String
couponCode
,
String
cartGoodsUid
){
for
(
CartGoods
cartGood
:
cartGoods
)
{
if
(
StringUtils
.
equals
(
c
artGood
.
getCouponCode
(),
couponCode
)){
if
(
StringUtils
.
equals
(
c
ouponCode
,
cartGood
.
getCouponCode
()
)){
cartGood
.
setCouponCode
(
null
);
cartGood
.
setIsMonthCardGoods
(
0
);
}
}
return
cartGoods
.
stream
().
filter
(
t
->
!
StringUtils
.
equals
(
"9999"
,
t
.
getSkuId
())).
collect
(
Collectors
.
toList
());
return
cartGoods
.
stream
().
filter
(
t
->
!
StringUtils
.
equals
(
"9999"
,
t
.
getSkuId
())
&&
!
t
.
getCartGoodsUid
().
equals
(
cartGoodsUid
)
).
collect
(
Collectors
.
toList
());
}
}
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