打折优惠券计算错误问题处理
This commit is contained in:
parent
37ec1bf771
commit
eb19b8f218
@ -32,7 +32,8 @@ public class Specification extends BaseIdEntity {
|
|||||||
/**
|
/**
|
||||||
* 所属卖家 0属于平台
|
* 所属卖家 0属于平台
|
||||||
* <p>
|
* <p>
|
||||||
* 店铺自定义规格暂时废弃 2021-06-23 后续推出新配置方式
|
* 店铺自定义规格暂时废弃 2021-06-23
|
||||||
|
* 后续推出新配置方式
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(hidden = true)
|
@ApiModelProperty(hidden = true)
|
||||||
private String storeId;
|
private String storeId;
|
||||||
|
@ -245,13 +245,17 @@ public class CouponRender implements CartRenderStep {
|
|||||||
if (item.getGoodsSku().getId().equals(skuId)) {
|
if (item.getGoodsSku().getId().equals(skuId)) {
|
||||||
|
|
||||||
PriceDetailDTO priceDetailDTO = item.getPriceDetailDTO();
|
PriceDetailDTO priceDetailDTO = item.getPriceDetailDTO();
|
||||||
|
|
||||||
|
// 打折金额=商品金额*折扣/10
|
||||||
|
Double discountCouponPrice = CurrencyUtil.mul(priceDetailDTO.getGoodsPrice(),
|
||||||
|
CurrencyUtil.div(coupon.getDiscount(), 10, 3));
|
||||||
|
|
||||||
//平台券则写入店铺承担优惠券比例
|
//平台券则写入店铺承担优惠券比例
|
||||||
if (coupon.getIsPlatform()) {
|
if (coupon.getIsPlatform()) {
|
||||||
priceDetailDTO.setSiteCouponPrice(CurrencyUtil.mul(priceDetailDTO.getGoodsPrice(), coupon.getDiscount()));
|
priceDetailDTO.setSiteCouponPrice(discountCouponPrice);
|
||||||
priceDetailDTO.setSiteCouponPoint(coupon.getStoreCommission());
|
priceDetailDTO.setSiteCouponPoint(coupon.getStoreCommission());
|
||||||
}
|
}
|
||||||
priceDetailDTO.setCouponPrice(CurrencyUtil.add(priceDetailDTO.getCouponPrice(),
|
priceDetailDTO.setCouponPrice(CurrencyUtil.add(priceDetailDTO.getCouponPrice(), discountCouponPrice));
|
||||||
CurrencyUtil.mul(priceDetailDTO.getGoodsPrice(), coupon.getDiscount())));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user