PC端/收银机商品查询增加缓存
This commit is contained in:
parent
5d6907c5d2
commit
2738ca6827
|
|
@ -149,7 +149,7 @@ public class UProductServiceImpl extends ServiceImpl<ProductMapper, Product> imp
|
|||
@Override
|
||||
public Map<Long, Integer> findShopProductStock(Long shopId) {
|
||||
List<Product> list = productMapper.selectListByQuery(query().select(Product::getId, Product::getStockNumber).eq(Product::getShopId, shopId));
|
||||
if (CollUtil.isNotEmpty(list)) {
|
||||
if (CollUtil.isEmpty(list)) {
|
||||
return null;
|
||||
}
|
||||
return list.stream().collect(Collectors.toMap(Product::getId, Product::getStockNumber));
|
||||
|
|
|
|||
Loading…
Reference in New Issue