修改每日选择菜品接口
This commit is contained in:
1 parent
557d3e73e4
commit
29966ce9e2
1 file changed
+7
+7
@@ -115,6 +115,13 @@ public class CanteenSpuServiceImpl extends ServiceImpl<CanteenSpuMapper, Canteen
|
||||
List<Long> spuIds = list.stream().map(CanteenDailyMenuEntity::getSpuId).distinct().collect(java.util.stream.Collectors.toList());
|
||||
wrapper.notIn(!CollectionUtils.isEmpty(list), CanteenSpuEntity::getId, spuIds);
|
||||
|
||||
//再次分类餐段过滤
|
||||
LambdaQueryWrapper<CanteenCategoryEntity> canteenCategoryEntityLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
canteenCategoryEntityLambdaQueryWrapper.like(CanteenCategoryEntity::getCategoryType, canteenDailySpuDTO.getHourType());
|
||||
List<CanteenCategoryEntity> canteenCategoryEntities = canteenCategoryMapper.selectList(canteenCategoryEntityLambdaQueryWrapper);
|
||||
List<Long> caIds = canteenCategoryEntities.stream().map(CanteenCategoryEntity::getId).collect(Collectors.toList());
|
||||
|
||||
wrapper.in(!CollectionUtils.isEmpty(caIds), CanteenSpuEntity::getCategoryId, caIds);
|
||||
return baseMapper.selectPageByScope(page, wrapper, DataScope.of());
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user