Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
@@ -391,7 +391,6 @@ public class StockServiceImpl implements StockService {
|
||||
sqlQuery.append(" id = ").append(updateValueVO.getTargetId());
|
||||
|
||||
sqlQuery.append(" ;");
|
||||
System.out.println(sqlQuery);
|
||||
|
||||
Query nativeQuery = em.createNativeQuery(String.valueOf(sqlQuery));
|
||||
nativeQuery.executeUpdate();
|
||||
|
||||
@@ -154,9 +154,11 @@ public class TbProductServiceImpl implements TbProductService {
|
||||
for (TbProduct product : page.getContent()) {
|
||||
//sku
|
||||
List<TbProductSku> tbProductSkus = tbProductSkuRepository.searchSku(product.getId().toString());
|
||||
|
||||
BigDecimal maxPrice=tbProductSkus.stream().map(TbProductSku::getSalePrice).max(BigDecimal::compareTo).get();
|
||||
log.info("maxPrice:{}",maxPrice);
|
||||
BigDecimal maxPrice = BigDecimal.ZERO;
|
||||
Optional<BigDecimal> max = tbProductSkus.stream().map(TbProductSku::getSalePrice).max(BigDecimal::compareTo);
|
||||
if (max.isPresent()) {
|
||||
maxPrice = max.get();
|
||||
}
|
||||
|
||||
List<TbProductSku> skuList = new ArrayList<>();
|
||||
TbProductVo tbProductVo = new TbProductVo();
|
||||
|
||||
@@ -69,6 +69,7 @@ public class TbProductNewVo {
|
||||
private Integer id;
|
||||
private BigDecimal salePrice = new BigDecimal("0.00");
|
||||
private String specSnap="";
|
||||
private Integer isPauseSale = 0;
|
||||
private Integer isPauseSale;
|
||||
private Integer isGrounding;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user