|
@@ -96,16 +96,18 @@ public class StorePlatformBarMenuServiceImpl extends ServiceImpl<StorePlatformSt
|
|
|
|
|
|
|
|
// 查询图片
|
|
// 查询图片
|
|
|
List<Integer> ids = list.stream().map(StorePlatformStoreMenu::getId).collect(Collectors.toList());
|
|
List<Integer> ids = list.stream().map(StorePlatformStoreMenu::getId).collect(Collectors.toList());
|
|
|
- List<StoreImg> imgList = storeImgMapper.selectList(new LambdaQueryWrapper<StoreImg>()
|
|
|
|
|
- .eq(StoreImg::getStoreId, storeId).eq(StoreImg::getImgType, 7).in(StoreImg::getBusinessId, ids));
|
|
|
|
|
-
|
|
|
|
|
- if (CollectionUtil.isNotEmpty(imgList)) {
|
|
|
|
|
- list.forEach(menu -> {
|
|
|
|
|
- imgList.stream()
|
|
|
|
|
- .filter(img -> img.getBusinessId().equals(menu.getId()))
|
|
|
|
|
- .findFirst()
|
|
|
|
|
- .ifPresent(img -> menu.setImgUrl(img.getImgUrl()));
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ if (CollectionUtil.isNotEmpty(ids)) {
|
|
|
|
|
+ List<StoreImg> imgList = storeImgMapper.selectList(new LambdaQueryWrapper<StoreImg>()
|
|
|
|
|
+ .eq(StoreImg::getStoreId, storeId).eq(StoreImg::getImgType, 7).in(StoreImg::getBusinessId, ids));
|
|
|
|
|
+
|
|
|
|
|
+ if (CollectionUtil.isNotEmpty(imgList)) {
|
|
|
|
|
+ list.forEach(menu -> {
|
|
|
|
|
+ imgList.stream()
|
|
|
|
|
+ .filter(img -> img.getBusinessId().equals(menu.getId()))
|
|
|
|
|
+ .findFirst()
|
|
|
|
|
+ .ifPresent(img -> menu.setImgUrl(img.getImgUrl()));
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// // 查询图片
|
|
// // 查询图片
|