xuxueyang
2024-09-24 272188e47087a8ef92eb0a48b122fa1c73ea94d3
src/main/java/com/mzl/flower/service/payment/OrderService.java
@@ -14,6 +14,7 @@
import com.mzl.flower.dto.PriceDTO;
import com.mzl.flower.dto.request.menber.MemberGrowthRecordDTO;
import com.mzl.flower.dto.request.payment.*;
import com.mzl.flower.dto.response.coupon.CouponRecordVO;
import com.mzl.flower.dto.response.flower.FlowerCartListDTO;
import com.mzl.flower.dto.response.flower.FlowerCartListWrapDTO;
import com.mzl.flower.dto.response.flower.FlowerDTO;
@@ -60,6 +61,7 @@
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ObjectUtils;
import java.math.BigDecimal;
import java.math.RoundingMode;
@@ -1099,6 +1101,15 @@
        List<OrderPointGoodsListDTO> pointGoodsList = orderMapper.getPointGoodsList(id);
        dto.setPointGoodsList(pointGoodsList);
        //判断优惠券ID是否为空 用户优惠券id
        if(StringUtils.isNotBlank(o.getMemberCouponId())){
            CouponRecordVO couponRecordVO = couponRecordService.getCouponRecordById(o.getMemberCouponId());
            if(!ObjectUtils.isEmpty(couponRecordVO)){
                dto.setCouponDiscountType(couponRecordVO.getCouponDiscountType());
                dto.setMinOrderAmount("满"+couponRecordVO.getMinOrderAmount());
            }
        }
        return dto;
    }