fix: 订单保存优惠券折扣价格
This commit is contained in:
@@ -1189,7 +1189,7 @@ public class CartService {
|
|||||||
tbActivateOutRecord.setRefNum(0);
|
tbActivateOutRecord.setRefNum(0);
|
||||||
outRecords.add(tbActivateOutRecord);
|
outRecords.add(tbActivateOutRecord);
|
||||||
|
|
||||||
couponVo.setCurrentDiscountAmount(couponVo.getCurrentDiscountAmount().add(couponVo.getCurrentDiscountAmount()));
|
couponVo.setCurrentDiscountAmount(couponVo.getCurrentDiscountAmount().add(discountAmount));
|
||||||
// 优惠券未消耗完毕
|
// 优惠券未消耗完毕
|
||||||
if (balanceCart != null && getCanUseCoupon(couponMap, balanceCart.getProductId()) != null) {
|
if (balanceCart != null && getCanUseCoupon(couponMap, balanceCart.getProductId()) != null) {
|
||||||
discountAmount = reduceProCoupon(couponMap, balanceCart, usedCouponMap, discountAmount, balanceCartList, outRecords, memberId);
|
discountAmount = reduceProCoupon(couponMap, balanceCart, usedCouponMap, discountAmount, balanceCartList, outRecords, memberId);
|
||||||
@@ -1404,7 +1404,10 @@ public class CartService {
|
|||||||
couponInfo.setProductCouponMap(BeanUtil.copyProperties(couponInfo.getProductCouponMap(), HashMap.class));
|
couponInfo.setProductCouponMap(BeanUtil.copyProperties(couponInfo.getProductCouponMap(), HashMap.class));
|
||||||
HashMap<String, Object> map = new HashMap<>();
|
HashMap<String, Object> map = new HashMap<>();
|
||||||
map.put("outRecordList", couponInfo.getOutRecordList());
|
map.put("outRecordList", couponInfo.getOutRecordList());
|
||||||
map.put("couponInfo", couponInfo.getProductCouponMap().values().addAll(couponInfo.getFullReductionCouponMap().values()));
|
ArrayList<Object> list = new ArrayList<>();
|
||||||
|
list.addAll(couponInfo.getProductCouponMap().values());
|
||||||
|
list.addAll(couponInfo.getFullReductionCouponMap().values());
|
||||||
|
map.put("couponInfo", list);
|
||||||
orderInfo.setCouponInfoList(JSONObject.toJSONString(map));
|
orderInfo.setCouponInfoList(JSONObject.toJSONString(map));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user