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

复制价格修改业务逻辑

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