Cui Zhi Feng
2024-09-20 bbce1624d0d4e9063a2ad71b7f54e34298da9b7a
src/main/java/com/mzl/flower/service/flower/FlowerMarkupSpService.java
@@ -15,6 +15,7 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.util.List;
@Slf4j
@@ -77,6 +78,11 @@
        if(ll != null && ll.size() > 0){
            for(FlowerMarkupSpListDTO ss : ll){
                ss.setPrice(getFinalPriceForPartner(dto.getPartnerId(), ss.getCategory(), ss.getFlowerId(), ss.getPrice(), ss.getLevel()));
                BigDecimal fee = ss.getFee();
                if (fee == null) {
                    fee = BigDecimal.ZERO;
                }
                ss.setSellPrice(ss.getPrice().add(fee));
            }
        }
@@ -90,6 +96,11 @@
        if(ll != null && ll.size() > 0){
            for(FlowerMarkupSpListDTO ss : ll){
                ss.setPrice(getFinalPriceForPartner(dto.getPartnerId(), ss.getCategory(), ss.getFlowerId(), ss.getPrice(), ss.getLevel()));
                BigDecimal fee = ss.getFee();
                if (fee == null) {
                    fee = BigDecimal.ZERO;
                }
                ss.setSellPrice(ss.getPrice().add(fee));
            }
        }