Commit 55161e60 by 缪晖

Update ShoppingCartCollageServiceImpl.java

parent 882a4ef7
......@@ -773,13 +773,10 @@ public class ShoppingCartCollageServiceImpl extends AbstractShoppingCartImpl imp
}
// 调用促销前先对购物车行id进行排序
calculationDiscountGoodsList.sort((o1, o2) -> {
if (o1.getAddCartTime() == null || o2.getAddCartTime() == null) { return 0;}
if (o1.getAddCartTime() > o2.getAddCartTime()) {
return 1;
} else if (o1.getCartGoodsUid().hashCode() > o2.getCartGoodsUid().hashCode()) {
return -1;
} else {
if (o1.getAddCartTime() == null || o2.getAddCartTime() == null) {
return 0;
} else {
return (int) (o1.getAddCartTime() - o2.getAddCartTime());
}
});
activityCalculationDiscountRequestDto.setGoods(calculationDiscountGoodsList);
......
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