Merge remote-tracking branch 'origin/test' into test

# Conflicts:
#	cash-service/order-service/src/main/java/com/czg/service/order/service/impl/OrderInfoServiceImpl.java
This commit is contained in:
张松
2025-09-26 09:46:31 +08:00
3 changed files with 33 additions and 18 deletions

View File

@@ -943,6 +943,10 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
log.error("订单积分使用或优惠券扣除失败订单id{}", orderInfo.getId());
}
} else {
//新客立减
if (orderInfo.getNewCustomerDiscountAmount() != null) {
newConsumerDiscountRecordService.useDiscount(shopUser.getId(), orderInfo.getId(), orderInfo.getNewCustomerDiscountAmount());
}
//积分使用
if (orderInfo.getPointsNum() != null && orderInfo.getPointsNum() > 0) {
pointsService.deductPoints(shopUser.getId(), orderInfo.getPointsNum(), "积分抵扣账单", orderInfo);
@@ -1139,7 +1143,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
} else {
//新客立减
if (param.getNewCustomerDiscountId() != null) {
newConsumerDiscountRecordService.useDiscount(shopUser.getId(), param.getOrderId(), param.getNewCustomerDiscountAmount());
newConsumerDiscountRecordService.checkDiscount(param.getNewCustomerDiscountId(), shopUser.getId(), param.getOrderId(), param.getNewCustomerDiscountAmount());
}
//积分使用
if (orderInfo.getPointsNum() != null && orderInfo.getPointsNum() > 0) {