mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-02-15 10:04:59 +08:00
【功能修复】商城:解决商品项图片为空串时,订单项没有使用SPU图片的问题。
This commit is contained in:
parent
6e67120b8e
commit
9af286693f
@ -1,6 +1,7 @@
|
|||||||
package cn.iocoder.yudao.module.trade.service.price.calculator;
|
package cn.iocoder.yudao.module.trade.service.price.calculator;
|
||||||
|
|
||||||
import cn.hutool.core.lang.Assert;
|
import cn.hutool.core.lang.Assert;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
|
import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
|
||||||
import cn.iocoder.yudao.module.product.api.sku.dto.ProductSkuRespDTO;
|
import cn.iocoder.yudao.module.product.api.sku.dto.ProductSkuRespDTO;
|
||||||
import cn.iocoder.yudao.module.product.api.spu.dto.ProductSpuRespDTO;
|
import cn.iocoder.yudao.module.product.api.spu.dto.ProductSpuRespDTO;
|
||||||
@ -61,7 +62,7 @@ public class TradePriceCalculatorHelper {
|
|||||||
orderItem.setSpuName(spu.getName()).setCategoryId(spu.getCategoryId())
|
orderItem.setSpuName(spu.getName()).setCategoryId(spu.getCategoryId())
|
||||||
.setDeliveryTemplateId(spu.getDeliveryTemplateId())
|
.setDeliveryTemplateId(spu.getDeliveryTemplateId())
|
||||||
.setGivePoint(spu.getGiveIntegral()).setUsePoint(0);
|
.setGivePoint(spu.getGiveIntegral()).setUsePoint(0);
|
||||||
if (orderItem.getPicUrl() == null) {
|
if (StrUtil.isBlank(orderItem.getPicUrl())) {
|
||||||
orderItem.setPicUrl(spu.getPicUrl());
|
orderItem.setPicUrl(spu.getPicUrl());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user