Commit 7d9d1705 by hanghang.wang

满减购物车提示语

parent 250d90e2
......@@ -184,6 +184,11 @@ public class ActivityCalculationDiscountResponseDto {
* 门槛件数
*/
private Integer thresholdQuantity;
/**
* 门槛启用金额 满足多少钱,参与件数活动
*/
private Integer invokeAmount;
}
@Data
......
......@@ -61,6 +61,9 @@ public class ActivityList {
private List<McCafeSendGoods> mcCafeSendGoodsList;
//满足多少 参与活动
private String invokeAmount;
@Data
public static class SendGoods {
private Integer qty;
......
......@@ -88,9 +88,10 @@ public class ActivityPromptEnum {
EIGHT(8, ""),
TEN(10, ""),
ELEVEN(11, "满足 X 件 减 Y 元 还差 Z元"),
ELEVEN(11, "购买in 元以上的商品可参与 满足 X 件 减 Y 元 还差 Z元"),
TWELVE(12, "已减 X 元 再买 Y 件 减 Z 元"),
THIRTEEN(13, "购买in 元以上的商品可参与 满足 X 件 减 Y 元 还差 Z元"),
FOURTEEN(14, "已减 X 元 再买 Y 件 减 Z 元"),
FIFTEEN(15, "每满 : 每满 x 件 减 Y 元 ,最高 减 Z元"),
SIXTEEN(16, "每满 : 每满 x 件 减 Y 元 ,最高 减 Z元"),
......
......@@ -146,8 +146,11 @@ public class FullPromotionService implements IPromotionService {
//此处的getCouponType == getPreferentialType 优惠类型
if(ActivityPromptEnum.PreferentialTypeEnum.TO_ORDER_ITEM_QUANTITY.getCode().equals(activityResponseDto.getCouponType())) {
messageBuilder.append("每满 <span style=\"color:#fa5555\">")
messageBuilder
.append("购买 <span style=\"color:#fa5555\">")
.append(WebUtil.formatAmount(activityResponseDto.getDelayTimes() * 1.00 / 100) )
.append(" 元以上的商品可参与 <span style=\"color:#fa5555\">")
.append("每满 <span style=\"color:#fa5555\">")
.append(benefitBeanDto.getBenefitNumber())
.append("</span>件 减 <span style=\"color:#fa5555\">")
.append(WebUtil.formatAmount(benefitBeanDto.getDiscountAmount() * 1.00 / 100))
......@@ -158,11 +161,11 @@ public class FullPromotionService implements IPromotionService {
//满足 x 元 减 Y 元 ,最高 减 Z元
ActivityList notInShopping = new ActivityList();
notInShopping.setTipType(13);
notInShopping.setTipType(ActivityPromptEnum.TipTypeEnum.THIRTEEN.getCode());
notInShopping.setSatisfy(benefitBeanDto.getBenefitNumber().toString());
notInShopping.setDeduct(WebUtil.formatAmount(benefitBeanDto.getDiscountAmount() * 1.00 / 100).toString());
notInShopping.setMaxDeduct(WebUtil.formatAmount(activityResponseDto.getMaxMoney() * 1.00 / 100).toString());
activityList.add(notInShopping);
notInShopping.setInvokeAmount(WebUtil.formatAmount(activityResponseDto.getDelayTimes() * 1.00 / 100).toString()); activityList.add(notInShopping);
}else{
messageBuilder.append("每满 <span style=\"color:#fa5555\">")
.append(WebUtil.formatAmount(benefitBeanDto.getThresholdAmount() * 1.00 / 100))
......@@ -188,7 +191,14 @@ public class FullPromotionService implements IPromotionService {
if(ActivityPromptEnum.PreferentialTypeEnum.TO_ORDER_ITEM_QUANTITY.getCode().equals(activityResponseDto.getCouponType())) {
for (int i = len - 1; i >= 0; i--) {
benefitBeanDto = benefitBeanDtos.get(i);
messageBuilder.append("满 <span style=\"color:#fa5555\">")
messageBuilder
.append("购买 <span style=\"color:#fa5555\">")
.append(WebUtil.formatAmount(activityResponseDto.getDelayTimes() * 1.00 / 100) )
.append(" 元以上的商品可参与 <span style=\"color:#fa5555\">")
.append("购买 <span style=\"color:#fa5555\">")
.append(WebUtil.formatAmount(activityResponseDto.getDelayTimes() * 1.00 / 100) )
.append(" 元以上的商品可参与 <span style=\"color:#fa5555\">")
.append("满 <span style=\"color:#fa5555\">")
.append(benefitBeanDto.getBenefitNumber())
.append("</span> 件减 <span style=\"color:#fa5555\">")
.append(WebUtil.formatAmount(benefitBeanDto.getDiscountAmount() * 1.00 / 100))
......@@ -199,9 +209,10 @@ public class FullPromotionService implements IPromotionService {
for (int j = len - 1; j >= 0; j--) {
benefitBeanDto = benefitBeanDtos.get(j);
cn.freemud.entities.vo.ActivityList notInShopping = new ActivityList();
notInShopping.setTipType(14);
notInShopping.setTipType(ActivityPromptEnum.TipTypeEnum.FOURTEEN.getCode());
notInShopping.setSatisfy(benefitBeanDto.getBenefitNumber().toString());
notInShopping.setDeduct(WebUtil.formatAmount(benefitBeanDto.getDiscountAmount() * 1.00 / 100).toString());
notInShopping.setInvokeAmount(WebUtil.formatAmount(activityResponseDto.getDelayTimes() * 1.00 / 100).toString());
activityList.add(notInShopping);
}
}else{
......@@ -277,6 +288,7 @@ public class FullPromotionService implements IPromotionService {
satisfyList.setSatisfy(activityPrompt.getThresholdQuantity().toString());
satisfyList.setDeduct(WebUtil.formatAmount(activityPrompt.getDiscountAmout() * 1.00 / 100).toString());
satisfyList.setMissing(String.valueOf(activityPrompt.getThresholdQuantity() - activityPrompt.getTotalQuantity()));
satisfyList.setInvokeAmount(WebUtil.formatAmount(activityPrompt.getInvokeAmount() * 1.00 / 100).toString());
}else{
// 满足 X 元 减 Y 元 还差 Z元
satisfyList.setTipType(ActivityPromptEnum.TipTypeEnum.THREE.getCode());
......@@ -299,6 +311,7 @@ public class FullPromotionService implements IPromotionService {
satisfyList.setDeduct(WebUtil.formatAmount(activityPrompt.getAlreadyDiscountAmount() * 1.00 / 100).toString());
satisfyList.setAgainBuy(String.valueOf(activityPrompt.getThresholdQuantity() - activityPrompt.getTotalQuantity()));
satisfyList.setAgianDeduct(WebUtil.formatAmount(toDiscountAmout * 1.00 / 100).toString());
satisfyList.setInvokeAmount(WebUtil.formatAmount(activityPrompt.getInvokeAmount() * 1.00 / 100).toString());
}else{
//已减 X 元 再买 Y 元 减 Z 元
satisfyList.setTipType(ActivityPromptEnum.TipTypeEnum.FOUR.getCode());
......
......@@ -88,6 +88,7 @@ public class FullSubtractionActivityServiceImpl {
notInShopping.setSatisfy(benefitBeanDto.getBenefitNumber().toString());
notInShopping.setDeduct(WebUtil.formatAmount(benefitBeanDto.getDiscountAmount() * 1.00 / 100).toString());
notInShopping.setMaxDeduct(WebUtil.formatAmount(activityResponseDto.getMaxMoney() * 1.00 / 100).toString());
notInShopping.setInvokeAmount(WebUtil.formatAmount(activityResponseDto.getDelayTimes() * 1.00 / 100).toString());
activityList.add(notInShopping);
arrayList.add(notInShopping);
}else{
......@@ -140,6 +141,8 @@ public class FullSubtractionActivityServiceImpl {
notInShopping.setTipType(ActivityPromptEnum.TipTypeEnum.SIXTEEN.getCode());
notInShopping.setSatisfy(WebUtil.formatAmount(benefitBeanDto.getBenefitNumber() * 1.00 / 100).toString());
notInShopping.setDeduct(WebUtil.formatAmount(benefitBeanDto.getDiscountAmount() * 1.00 / 100).toString());
notInShopping.setInvokeAmount(WebUtil.formatAmount(activityResponseDto.getDelayTimes() * 1.00 / 100).toString());
activityList.add(notInShopping);
arrayList.add(notInShopping);
}else{
......
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