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
f1bd5692
Commit
f1bd5692
authored
Sep 29, 2020
by
ping.wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
定制属性不一致商品非同一个商品
parent
7135b453
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
shopping-cart-application-service/src/main/java/cn/freemud/entities/vo/CartGoods.java
+15
-0
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/entities/vo/CartGoods.java
View file @
f1bd5692
...
@@ -345,6 +345,9 @@ public class CartGoods {
...
@@ -345,6 +345,9 @@ public class CartGoods {
if
(
CollectionUtils
.
isNotEmpty
(
extra
))
{
if
(
CollectionUtils
.
isNotEmpty
(
extra
))
{
extra
.
stream
().
sorted
(
Comparator
.
comparing
(
CartGoodsExtra:
:
getAttributeId
)).
forEach
(
e
->
sb
.
append
(
e
.
getAttributeId
()));
extra
.
stream
().
sorted
(
Comparator
.
comparing
(
CartGoodsExtra:
:
getAttributeId
)).
forEach
(
e
->
sb
.
append
(
e
.
getAttributeId
()));
}
}
if
(
CollectionUtils
.
isNotEmpty
(
specialExtra
))
{
specialExtra
.
stream
().
sorted
(
Comparator
.
comparing
(
SpecialExtra:
:
getAttributeId
)).
forEach
(
e
->
sb
.
append
(
e
.
getAttributeId
()));
}
return
sb
.
toString
();
return
sb
.
toString
();
}
}
}
}
...
@@ -366,6 +369,9 @@ public class CartGoods {
...
@@ -366,6 +369,9 @@ public class CartGoods {
if
(
CollectionUtils
.
isNotEmpty
(
productComboList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
productComboList
))
{
for
(
ComboxGoods
goods
:
productComboList
)
{
for
(
ComboxGoods
goods
:
productComboList
)
{
originalString
.
append
(
goods
.
toString
());
originalString
.
append
(
goods
.
toString
());
if
(
CollectionUtils
.
isNotEmpty
(
goods
.
getSpecialExtra
()))
{
goods
.
getSpecialExtra
().
stream
().
sorted
(
Comparator
.
comparing
(
SpecialExtra:
:
getAttributeId
)).
forEach
(
e
->
originalString
.
append
(
e
.
getAttributeId
()));
}
}
}
}
}
if
(
CollectionUtils
.
isNotEmpty
(
productGroupList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
productGroupList
))
{
...
@@ -376,6 +382,9 @@ public class CartGoods {
...
@@ -376,6 +382,9 @@ public class CartGoods {
if
(
CollectionUtils
.
isNotEmpty
(
productMaterialList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
productMaterialList
))
{
productMaterialList
.
stream
().
sorted
(
Comparator
.
comparing
(
MaterialGoods:
:
getSpuId
)).
forEach
(
e
->
originalString
.
append
(
e
.
getSpuId
()));
productMaterialList
.
stream
().
sorted
(
Comparator
.
comparing
(
MaterialGoods:
:
getSpuId
)).
forEach
(
e
->
originalString
.
append
(
e
.
getSpuId
()));
}
}
if
(
CollectionUtils
.
isNotEmpty
(
specialExtra
))
{
specialExtra
.
stream
().
sorted
(
Comparator
.
comparing
(
SpecialExtra:
:
getAttributeId
)).
forEach
(
e
->
originalString
.
append
(
e
.
getAttributeId
()));
}
//当前字符串
//当前字符串
CartGoods
cartGoods
=
(
CartGoods
)
o
;
CartGoods
cartGoods
=
(
CartGoods
)
o
;
...
@@ -388,6 +397,9 @@ public class CartGoods {
...
@@ -388,6 +397,9 @@ public class CartGoods {
if
(
CollectionUtils
.
isNotEmpty
(
cartGoods
.
getProductComboList
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
cartGoods
.
getProductComboList
()))
{
for
(
ComboxGoods
goods
:
cartGoods
.
getProductComboList
())
{
for
(
ComboxGoods
goods
:
cartGoods
.
getProductComboList
())
{
currentString
.
append
(
goods
.
toString
());
currentString
.
append
(
goods
.
toString
());
if
(
CollectionUtils
.
isNotEmpty
(
goods
.
getSpecialExtra
()))
{
goods
.
getSpecialExtra
().
stream
().
sorted
(
Comparator
.
comparing
(
SpecialExtra:
:
getAttributeId
)).
forEach
(
e
->
currentString
.
append
(
e
.
getAttributeId
()));
}
}
}
}
}
if
(
CollectionUtils
.
isNotEmpty
(
cartGoods
.
getProductGroupList
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
cartGoods
.
getProductGroupList
()))
{
...
@@ -398,6 +410,9 @@ public class CartGoods {
...
@@ -398,6 +410,9 @@ public class CartGoods {
if
(
CollectionUtils
.
isNotEmpty
(
cartGoods
.
getProductMaterialList
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
cartGoods
.
getProductMaterialList
()))
{
cartGoods
.
getProductMaterialList
().
stream
().
sorted
(
Comparator
.
comparing
(
MaterialGoods:
:
getSpuId
)).
forEach
(
e
->
currentString
.
append
(
e
.
getSpuId
()));
cartGoods
.
getProductMaterialList
().
stream
().
sorted
(
Comparator
.
comparing
(
MaterialGoods:
:
getSpuId
)).
forEach
(
e
->
currentString
.
append
(
e
.
getSpuId
()));
}
}
if
(
CollectionUtils
.
isNotEmpty
(
cartGoods
.
getSpecialExtra
()))
{
cartGoods
.
getSpecialExtra
().
stream
().
sorted
(
Comparator
.
comparing
(
SpecialExtra:
:
getAttributeId
)).
forEach
(
e
->
currentString
.
append
(
e
.
getAttributeId
()));
}
return
StringUtils
.
equals
(
originalString
.
toString
(),
currentString
.
toString
());
return
StringUtils
.
equals
(
originalString
.
toString
(),
currentString
.
toString
());
}
}
...
...
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