Commit 7084609a by ping.wu

Merge branches 'develop' and 'feature/20200926_麦咖啡特定属性与加料_wuping' of…

Merge branches 'develop' and 'feature/20200926_麦咖啡特定属性与加料_wuping' of http://gitlab.freemud.com/order-group-application/order-group into develop
parents b59af9f7 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());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment