Commit defeae42 authored by 332784038@qq.com's avatar 332784038@qq.com

Merge branch 'master-fix' into dev

# Conflicts:
#	yudao-module-product/yudao-module-product-core/src/main/java/cn/iocoder/yudao/module/product/service/product/impl/ProductPriceServiceImpl.java
parents 9019db04 8856a394
...@@ -3371,7 +3371,7 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper, ...@@ -3371,7 +3371,7 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
.collect(toList()); .collect(toList());
if (CollectionUtil.isNotEmpty(stepSpecialList)) { if (CollectionUtil.isNotEmpty(stepSpecialList)) {
Map<String, ProductPriceStepSpecialDO> stepSpecialMap = stepSpecialList.stream() Map<String, ProductPriceStepSpecialDO> stepSpecialMap = stepSpecialList.stream()
.collect(Collectors.toMap(ProductPriceStepSpecialDO::getSpecialDictType, v -> v)); .collect(Collectors.toMap(ProductPriceStepSpecialDO::getSpecialDictType, v -> v, (v1, v2) -> v2));
List<ProductPriceStepSpecialDO> dbStepSpecialList = stepSpecialGroupMap.get(dbStep.getId()); List<ProductPriceStepSpecialDO> dbStepSpecialList = stepSpecialGroupMap.get(dbStep.getId());
if (CollectionUtil.isEmpty(dbStepSpecialList)) continue; if (CollectionUtil.isEmpty(dbStepSpecialList)) continue;
for (ProductPriceStepSpecialDO dbStepSpecial : dbStepSpecialList) { for (ProductPriceStepSpecialDO dbStepSpecial : dbStepSpecialList) {
...@@ -3561,7 +3561,7 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper, ...@@ -3561,7 +3561,7 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
dbItem.setProductId(productDO.getId()); dbItem.setProductId(productDO.getId());
dbItem.setWarehouseLineId(lineId); dbItem.setWarehouseLineId(lineId);
dbItem.setShippingChannelId(shippingChannelId); dbItem.setShippingChannelId(shippingChannelId);
dbItem.setId(null);
if (dbItem.getNeedBook() == null) { if (dbItem.getNeedBook() == null) {
dbItem.setNeedBook(0); dbItem.setNeedBook(0);
} }
...@@ -3589,13 +3589,14 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper, ...@@ -3589,13 +3589,14 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
dbItem.setBlacklist(0); dbItem.setBlacklist(0);
dbItem.setStatus(0); dbItem.setStatus(0);
dbItem.setCreateTime(current); dbItem.setCreateTime(current);
dbItem.setId(null);
} }
dbItem.setUpdateTime(current); dbItem.setUpdateTime(current);
String transportType = lineTransportTypeMap.get(lineId); String transportType = lineTransportTypeMap.get(lineId);
initBasePrice(dbItem, transportType); initBasePrice(dbItem, transportType);
if (Objects.isNull(dbItem.getId())){ if (Objects.isNull(dbItem.getId())){
productPriceMapper.insert(dbItem); productPriceMapper.insert(dbItem);
}else { }else {
productPriceMapper.updateById(dbItem); productPriceMapper.updateById(dbItem);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment