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

复制价格修改业务逻辑

parent 4fa32e12
......@@ -1259,7 +1259,7 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
//没有价格信息不继续后面的处理
if (!hasPrice) {
zTest3 m=new zTest3();
zTest3 m = new zTest3();
m.setTestname("没有价格信息,不后续处理");
m.setCreatedate(new Date());
zTestMapper.insert(m);
......@@ -1297,10 +1297,8 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
//ProductPriceExceptionHandleListener 监听
handleData.setNeedHandleList(needHandleList);
applicationContext.publishEvent(handleData);
}
else
{
zTest3 m=new zTest3();
} else {
zTest3 m = new zTest3();
m.setTestname("needHandleList 为空");
m.setCreatedate(new Date());
zTestMapper.insert(m);
......@@ -3020,10 +3018,13 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
private void checkAndUpdateStepToMainPrice(ProductPriceDO productPrice, ProductPriceReqBaseVO productPriceStepBaseVO) {
checkStepPrice(productPriceStepBaseVO);
if (productPrice.getStepPrice() == 1) {
// 只有阶梯定价才需要执行下面的逻辑
updateStepToMainPriceAir(productPrice, productPriceStepBaseVO.getFreightPriceStepList(), PriceTypeEnum.FREIGHT);
updateStepToMainPriceAir(productPrice, productPriceStepBaseVO.getClearancePriceStepList(), PriceTypeEnum.CLEARANCE);
updateStepToMainPriceAir(productPrice, productPriceStepBaseVO.getFullPriceStepList(), PriceTypeEnum.FULL_PRICE);
}
}
private void updateStepToMainPriceAir(ProductPriceDO productPrice, List<ProductPriceStepDO> priceStepList, PriceTypeEnum priceTypeEnum) {
if (CollectionUtil.isNotEmpty(priceStepList)) {
......@@ -3446,7 +3447,8 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
in(ProductPriceDO::getId, ids));
if (productPriceDOList.size() > 0) {
productPriceDOList.forEach(price -> {
for (ProductPriceDO price : productPriceDOList) {
ProductPriceAirCreateReqVO createReqVO = new ProductPriceAirCreateReqVO();
BeanUtils.copyProperties(price, createReqVO);
......@@ -3619,7 +3621,7 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
warehouseLineList,
productList,
price);
});
}
}
......
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