扫码点餐部分
This commit is contained in:
@@ -148,7 +148,9 @@ public class ProductService {
|
||||
AtomicDouble sum = new AtomicDouble(0.0);
|
||||
BigDecimal lowerPrice = null;
|
||||
for (TbProductSku item : tbProductSkus) {
|
||||
sum.addAndGet(item.getStockNumber());
|
||||
if (item.getRealSalesNumber() != null) {
|
||||
sum.addAndGet(item.getRealSalesNumber());
|
||||
}
|
||||
if (lowerPrice == null || lowerPrice.compareTo(item.getSalePrice()) > 0) {
|
||||
lowerPrice = item.getSalePrice();
|
||||
}
|
||||
@@ -210,7 +212,9 @@ public class ProductService {
|
||||
AtomicDouble sum = new AtomicDouble(0.0);
|
||||
BigDecimal lowerPrice = null;
|
||||
for (TbProductSku item : tbProductSkus) {
|
||||
sum.addAndGet(item.getStockNumber());
|
||||
if (item.getRealSalesNumber() != null) {
|
||||
sum.addAndGet(item.getRealSalesNumber());
|
||||
}
|
||||
if (lowerPrice == null || lowerPrice.compareTo(item.getSalePrice()) > 0) {
|
||||
lowerPrice = item.getSalePrice();
|
||||
}
|
||||
@@ -260,7 +264,6 @@ public class ProductService {
|
||||
it.setProductSkuResult(skuResult);
|
||||
});
|
||||
hot.setProducts(hots);
|
||||
|
||||
//商品
|
||||
groupList.parallelStream().forEach(g -> {
|
||||
String in = g.getProductIds().substring(1, g.getProductIds().length() - 1);
|
||||
@@ -282,7 +285,9 @@ public class ProductService {
|
||||
AtomicDouble sum = new AtomicDouble(0.0);
|
||||
BigDecimal lowerPrice = null;
|
||||
for (TbProductSku item : tbProductSkus) {
|
||||
sum.addAndGet(item.getStockNumber());
|
||||
if (item.getRealSalesNumber() != null) {
|
||||
sum.addAndGet(item.getRealSalesNumber());
|
||||
}
|
||||
if (lowerPrice == null || lowerPrice.compareTo(item.getSalePrice()) > 0) {
|
||||
lowerPrice = item.getSalePrice();
|
||||
}
|
||||
@@ -340,7 +345,7 @@ public class ProductService {
|
||||
g.setProducts(new ArrayList<>());
|
||||
}
|
||||
});
|
||||
|
||||
groupList.add(0, hot);
|
||||
concurrentMap.put("productInfo", groupList);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user