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

批量加价时如果价格是负数会立减,这里对与立减后结果集为负数的值做最低价格为0的处理

parent 898d4df7
...@@ -2663,7 +2663,7 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper, ...@@ -2663,7 +2663,7 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
if (yfPriceUnit.equals(addYfPriceUnit) && yfVolumeUnit.equals(addYfVolumeUnit)) { if (yfPriceUnit.equals(addYfPriceUnit) && yfVolumeUnit.equals(addYfVolumeUnit)) {
update = true; update = true;
yf = yf.add(addYf); yf = yf.add(addYf);
dbItem.setTransportPrice(yf); dbItem.setTransportPrice(yf.compareTo(BigDecimal.ZERO) < 0? BigDecimal.ZERO: yf);
} }
} }
...@@ -2678,7 +2678,7 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper, ...@@ -2678,7 +2678,7 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
if (qgfPriceUnit.equals(addQgfPriceUnit) && qgfVolumeUnit.equals(addQgfVolumeUnit)) { if (qgfPriceUnit.equals(addQgfPriceUnit) && qgfVolumeUnit.equals(addQgfVolumeUnit)) {
update = true; update = true;
qgf = qgf.add(addQgf); qgf = qgf.add(addQgf);
dbItem.setClearancePrice(qgf); dbItem.setClearancePrice(qgf.compareTo(BigDecimal.ZERO) < 0? BigDecimal.ZERO: qgf);
} }
} }
} }
...@@ -2694,7 +2694,7 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper, ...@@ -2694,7 +2694,7 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
if (qbjPriceUnit.equals(addQbjPriceUnit) && qbjVolumeUnit.equals(addQbjVolumeUnit)) { if (qbjPriceUnit.equals(addQbjPriceUnit) && qbjVolumeUnit.equals(addQbjVolumeUnit)) {
update = true; update = true;
qbj = qbj.add(addQbj); qbj = qbj.add(addQbj);
dbItem.setAllPrice(qbj); dbItem.setAllPrice(qbj.compareTo(BigDecimal.ZERO) < 0? BigDecimal.ZERO: qbj);
} }
} }
} }
...@@ -2710,7 +2710,7 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper, ...@@ -2710,7 +2710,7 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
if (qgfPriceUnit.equals(addQgfPriceUnit) && qgfVolumeUnit.equals(addQgfVolumeUnit)) { if (qgfPriceUnit.equals(addQgfPriceUnit) && qgfVolumeUnit.equals(addQgfVolumeUnit)) {
update = true; update = true;
qgf = qgf.add(addQgf); qgf = qgf.add(addQgf);
dbItem.setClearancePrice(qgf); dbItem.setClearancePrice(qgf.compareTo(BigDecimal.ZERO) < 0? BigDecimal.ZERO: qgf);
} }
} }
} }
......
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