|
@@ -279,13 +279,7 @@ public class CartClubServiceImpl implements CartClubService {
|
|
|
// 叠加赠品
|
|
|
if (shopPromotion.getDiscount() != null && shopPromotion.getDiscount() == 1 && floor > 1) {
|
|
|
Integer in = floor.intValue();
|
|
|
- List<CartItemVo> g = new ArrayList<>();
|
|
|
- g.addAll(giftList);
|
|
|
- if (in > 1) {
|
|
|
- for (Integer i = 1; i < in; i++) {
|
|
|
- giftList.addAll(g);
|
|
|
- }
|
|
|
- }
|
|
|
+ giftList.forEach(g -> g.setNumber(MathUtil.mul(g.getNumber(), in).intValue()));
|
|
|
}
|
|
|
shopPromotion.setGiftList(giftList);
|
|
|
}
|
|
@@ -964,13 +958,7 @@ public class CartClubServiceImpl implements CartClubService {
|
|
|
//叠加满赠
|
|
|
if (shopPromotion.getDiscount() != null && shopPromotion.getDiscount() == 1 && floor > 1) {
|
|
|
Integer in = floor.intValue();
|
|
|
- List<CartItemVo> g = new ArrayList<>();
|
|
|
- g.addAll(giftList);
|
|
|
- if (in > 1) {
|
|
|
- for (Integer i = 1; i < in; i++) {
|
|
|
- giftList.addAll(g);
|
|
|
- }
|
|
|
- }
|
|
|
+ giftList.forEach(g -> g.setNumber(MathUtil.mul(g.getNumber(), in).intValue()));
|
|
|
}
|
|
|
shopPromotion.setGiftList(giftList);
|
|
|
}
|
|
@@ -1066,13 +1054,7 @@ public class CartClubServiceImpl implements CartClubService {
|
|
|
//满足叠加
|
|
|
if (promotions.getDiscount() != null && promotions.getDiscount() == 1 && floor > 1) {
|
|
|
Integer in = floor.intValue();
|
|
|
- List<CartItemVo> g = new ArrayList<>();
|
|
|
- g.addAll(giftList);
|
|
|
- if (in > 1) {
|
|
|
- for (Integer i = 1; i < in; i++) {
|
|
|
- giftList.addAll(g);
|
|
|
- }
|
|
|
- }
|
|
|
+ giftList.forEach(g -> g.setNumber(MathUtil.mul(g.getNumber(), in).intValue()));
|
|
|
}
|
|
|
promotions.setGiftList(giftList);
|
|
|
// 全部满赠
|
|
@@ -1324,13 +1306,7 @@ public class CartClubServiceImpl implements CartClubService {
|
|
|
//叠加满赠
|
|
|
if (shopPromotion.getDiscount() != null && shopPromotion.getDiscount() == 1 && floor > 1) {
|
|
|
Integer in = floor.intValue();
|
|
|
- List<CartItemVo> g = new ArrayList<>();
|
|
|
- g.addAll(giftList);
|
|
|
- if (in > 1) {
|
|
|
- for (Integer i = 1; i < in; i++) {
|
|
|
- giftList.addAll(g);
|
|
|
- }
|
|
|
- }
|
|
|
+ giftList.forEach(g -> g.setNumber(MathUtil.mul(g.getNumber(), in).intValue()));
|
|
|
}
|
|
|
shopPromotion.setGiftList(giftList);
|
|
|
}
|
|
@@ -1426,13 +1402,7 @@ public class CartClubServiceImpl implements CartClubService {
|
|
|
//满足叠加
|
|
|
if (promotions.getDiscount() != null && promotions.getDiscount() == 1 && floor > 1) {
|
|
|
Integer in = floor.intValue();
|
|
|
- List<CartItemVo> g = new ArrayList<>();
|
|
|
- g.addAll(giftList);
|
|
|
- if (in > 1) {
|
|
|
- for (Integer i = 1; i < in; i++) {
|
|
|
- giftList.addAll(g);
|
|
|
- }
|
|
|
- }
|
|
|
+ giftList.forEach(g -> g.setNumber(MathUtil.mul(g.getNumber(), in).intValue()));
|
|
|
}
|
|
|
promotions.setGiftList(giftList);
|
|
|
// 全部满赠
|
|
@@ -1592,13 +1562,7 @@ public class CartClubServiceImpl implements CartClubService {
|
|
|
//满足叠加
|
|
|
if (promotions.getDiscount() != null && promotions.getDiscount() == 1 && floor > 1) {
|
|
|
Integer in = floor.intValue();
|
|
|
- List<CartItemVo> g = new ArrayList<>();
|
|
|
- g.addAll(giftList);
|
|
|
- if (in > 1) {
|
|
|
- for (Integer i = 1; i < in; i++) {
|
|
|
- giftList.addAll(g);
|
|
|
- }
|
|
|
- }
|
|
|
+ giftList.forEach(g -> g.setNumber(MathUtil.mul(g.getNumber(), in).intValue()));
|
|
|
}
|
|
|
promotions.setGiftList(giftList);
|
|
|
}
|
|
@@ -1655,13 +1619,7 @@ public class CartClubServiceImpl implements CartClubService {
|
|
|
//满足叠加
|
|
|
if (promotions.getDiscount() != null && promotions.getDiscount() == 1 && floor > 1) {
|
|
|
Integer in = floor.intValue();
|
|
|
- List<CartItemVo> g = new ArrayList<>();
|
|
|
- g.addAll(giftList);
|
|
|
- if (in > 1) {
|
|
|
- for (Integer i = 1; i < in; i++) {
|
|
|
- giftList.addAll(g);
|
|
|
- }
|
|
|
- }
|
|
|
+ giftList.forEach(g -> g.setNumber(MathUtil.mul(g.getNumber(), in).intValue()));
|
|
|
}
|
|
|
promotions.setGiftList(giftList);
|
|
|
|