You've already forked FrameTour-BE
refactor(order): 调整优惠排序逻辑
- 将券码优惠的排序顺序从 1 调整为 2,使其显示顺序低于限时立减- 将限时立减优惠的排序顺序从 2 调整为 1,使其显示在最前面
This commit is contained in:
@@ -126,7 +126,7 @@ public class OrderServiceImpl implements IOrderService {
|
|||||||
voucherDiscount.setDiscountType(DiscountType.VOUCHER);
|
voucherDiscount.setDiscountType(DiscountType.VOUCHER);
|
||||||
voucherDiscount.setDiscountName(voucherInfo.getBatchName());
|
voucherDiscount.setDiscountName(voucherInfo.getBatchName());
|
||||||
voucherDiscount.setDiscountAmount(voucherInfo.getActualDiscountAmount());
|
voucherDiscount.setDiscountAmount(voucherInfo.getActualDiscountAmount());
|
||||||
voucherDiscount.setSortOrder(1); // 券码显示顺序最高
|
voucherDiscount.setSortOrder(2); // 券码显示顺序低于限时立减
|
||||||
voucherDiscount.setVoucherCode(voucherInfo.getVoucherCode());
|
voucherDiscount.setVoucherCode(voucherInfo.getVoucherCode());
|
||||||
voucherDiscount.setCreateTime(now);
|
voucherDiscount.setCreateTime(now);
|
||||||
|
|
||||||
|
@@ -44,7 +44,7 @@ public class DiscountDetail {
|
|||||||
detail.setDiscountName("限时立减");
|
detail.setDiscountName("限时立减");
|
||||||
detail.setDiscountAmount(discountAmount);
|
detail.setDiscountAmount(discountAmount);
|
||||||
detail.setDescription("限时优惠,立即享受");
|
detail.setDescription("限时优惠,立即享受");
|
||||||
detail.setSortOrder(2); // 限时立减排在券码后面
|
detail.setSortOrder(1); // 限时立减排在最前面
|
||||||
return detail;
|
return detail;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -70,7 +70,7 @@ public class DiscountDetail {
|
|||||||
detail.setDiscountName("券码优惠");
|
detail.setDiscountName("券码优惠");
|
||||||
detail.setDiscountAmount(discountAmount);
|
detail.setDiscountAmount(discountAmount);
|
||||||
detail.setDescription(String.format("券码 %s - %s", voucherCode, discountTypeName));
|
detail.setDescription(String.format("券码 %s - %s", voucherCode, discountTypeName));
|
||||||
detail.setSortOrder(1); // 券码优先级最高,排在最前面
|
detail.setSortOrder(2); // 券码显示顺序低于限时立减
|
||||||
return detail;
|
return detail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user