diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/alloc/domain/AllocStallMealtime.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/alloc/domain/AllocStallMealtime.java index b13f848..a7772bf 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/alloc/domain/AllocStallMealtime.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/alloc/domain/AllocStallMealtime.java @@ -33,7 +33,7 @@ public class AllocStallMealtime extends BaseEntity { /** 餐次类型 */ @Excel(name = "餐次类型") @ApiModelProperty(value = "餐次类型") - private Long mealtimeType; + private Integer mealtimeType; /** 餐次名称 */ @Excel(name = "餐次名称") diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/service/impl/MenuAppRecipeServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/service/impl/MenuAppRecipeServiceImpl.java index 41021a7..ccb05ce 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/service/impl/MenuAppRecipeServiceImpl.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/service/impl/MenuAppRecipeServiceImpl.java @@ -204,52 +204,7 @@ public class MenuAppRecipeServiceImpl implements IMenuAppRecipeService { resultList = resultList.stream().filter((time) -> { return finalMealTimeList.stream().map(AllocStallMealtime::getMealtimeType).collect(Collectors.toList()).contains(time.getMealtimeType()); }).collect(Collectors.toList()); - Set dishesIdSet = resultList.stream().flatMap((time) -> { - return time.getTypeList().stream().flatMap((type) -> { - return type.getDishesList().stream().map((item) -> { - return (item.getDishesDetailList().get(0)).getDishesId(); - }); - }); - }).collect(Collectors.toSet()); - if (ObjectUtil.isEmpty(dishesIdSet)) { - return resultList; - } else { - Iterator var10 = resultList.iterator(); - - while (true) { - List typeList; - do { - if (!var10.hasNext()) { - return resultList; - } - - AppletReserveRecipeVO mealtime = (AppletReserveRecipeVO) var10.next(); - typeList = mealtime.getTypeList(); - } while (!ObjectUtil.isNotEmpty(typeList)); - - List recommendList = Lists.newArrayList(); - - for (AppletReserveRecipeTypeVO type : typeList) { - List dishesList = type.getDishesList(); - if (ObjectUtil.isNotEmpty(dishesList)) { - List tempList = dishesList.stream().filter((d) -> { - return d.getRecommendFlag() == 1; - }).collect(Collectors.toList()); - if (ObjectUtil.isNotEmpty(tempList)) { - recommendList.addAll(tempList); - } - } - } - - if (ObjectUtil.isNotEmpty(recommendList)) { - AppletReserveRecipeTypeVO recommend = new AppletReserveRecipeTypeVO(); - recommend.setTypeId(999L); - recommend.setTypeName("推荐"); - recommend.setDishesList(recommendList); - typeList.add(0, recommend); - } - } - } + return resultList; } } }