diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/controller/CookRecipeH5Controller.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/controller/CookRecipeH5Controller.java index aa0d31e..60143a5 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/controller/CookRecipeH5Controller.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/controller/CookRecipeH5Controller.java @@ -76,6 +76,16 @@ public class CookRecipeH5Controller extends BaseController { } } + @PostMapping({"/list/week/canteen"}) + @ApiOperation("获取一周菜谱食堂列表") + public AjaxResult getWeekMealList(@RequestBody AppletWeekCanteenDTO appletWeekCanteenDTO) { + try { + return AjaxResult.success(this.cookRecipeH5Service.selectWeekCanteenList(appletWeekCanteenDTO)); + } catch (Exception e) { + return AjaxResult.error("获取一周菜谱食堂列表失败"); + } + } + @ApiOperation("获取一周菜谱详情") @PostMapping({"/week/recipe/detail"}) public TableDataInfo getWeekRecipeDetailList(@RequestBody @Valid AppletWeekRecipeDTO content) { diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/dto/AppletWeekCanteenDTO.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/dto/AppletWeekCanteenDTO.java new file mode 100644 index 0000000..c0f7b80 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/dto/AppletWeekCanteenDTO.java @@ -0,0 +1,11 @@ +package com.bonus.canteen.core.cook.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +public class AppletWeekCanteenDTO { + @ApiModelProperty("人员id") + private Long userId; + +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/mapper/CookRecipeH5Mapper.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/mapper/CookRecipeH5Mapper.java index c3b5fed..00b01ed 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/mapper/CookRecipeH5Mapper.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/mapper/CookRecipeH5Mapper.java @@ -32,6 +32,8 @@ public interface CookRecipeH5Mapper { Long selectStallIdByRecipeId(@Param("recipeId") Long recipeId); + List selectWeekCanteenList(); + List selectWeekRecipeId(@Param("recipeId") Long recipeId); String getBingTimeByRecipeId(@Param("recipeId") Long recipeId); diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/ICookRecipeH5Service.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/ICookRecipeH5Service.java index 5293976..c6522f0 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/ICookRecipeH5Service.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/ICookRecipeH5Service.java @@ -4,10 +4,7 @@ import com.bonus.canteen.core.basic.domain.AllocMobileCanteenQueryDTO; import com.bonus.canteen.core.basic.domain.AppletReserveCanteenVO; import com.bonus.canteen.core.cook.domain.CookRecipe; import com.bonus.canteen.core.cook.dto.*; -import com.bonus.canteen.core.cook.vo.AllocRecipeStallVO; -import com.bonus.canteen.core.cook.vo.AppletReserveRecipeVO; -import com.bonus.canteen.core.cook.vo.AppletWeekRecipeVO; -import com.bonus.canteen.core.cook.vo.CookRecipeDetailVO; +import com.bonus.canteen.core.cook.vo.*; import org.springframework.web.multipart.MultipartFile; import java.time.LocalDate; @@ -27,5 +24,7 @@ public interface ICookRecipeH5Service { public List getReserveRecipeDetailList(AppletReserveRecipeDTO content); + List selectWeekCanteenList(AppletWeekCanteenDTO appletWeekCanteenDTO); + public List getWeekRecipeDetailList(AppletWeekRecipeDTO content); } diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/impl/CookRecipeServiceH5Impl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/impl/CookRecipeServiceH5Impl.java index d4434ee..1cf4ecf 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/impl/CookRecipeServiceH5Impl.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/impl/CookRecipeServiceH5Impl.java @@ -124,6 +124,11 @@ public class CookRecipeServiceH5Impl implements ICookRecipeH5Service { } } + @Override + public List selectWeekCanteenList(AppletWeekCanteenDTO content) { + return this.cookRecipeH5Mapper.selectWeekCanteenList(); + } + @Override public List getWeekRecipeDetailList(AppletWeekRecipeDTO content) { List recipeIdList = Lists.newArrayList(); diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/vo/AppletWeekCanteenVO.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/vo/AppletWeekCanteenVO.java new file mode 100644 index 0000000..533daff --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/vo/AppletWeekCanteenVO.java @@ -0,0 +1,40 @@ +package com.bonus.canteen.core.cook.vo; + +import com.bonus.canteen.core.utils.SysUtil; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +@ApiModel("获取一周菜谱食堂列表") +@Data +public class AppletWeekCanteenVO { + @ApiModelProperty("菜谱id") + @JsonFormat( + shape = JsonFormat.Shape.STRING + ) + private Long recipeId; + private Long stallId; + @ApiModelProperty("档口名称") + private String stallName; + private Long canteenId; + @ApiModelProperty("食堂名称") + private String canteenName; + @ApiModelProperty("食堂图片") + private String canteenImgUrl; + @ApiModelProperty("档口图片") + private String stallImgUrl; + @ApiModelProperty("档口标签") + private List labelList; + + public String getCanteenImgUrl() { + return SysUtil.getCutFileUrl(this.canteenImgUrl); + } + + public String getStallImgUrl() { + return SysUtil.getCutFileUrl(this.stallImgUrl); + } + +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/cook/CookRecipeH5Mapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/cook/CookRecipeH5Mapper.xml index 4b3a4ae..8c6eb42 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/cook/CookRecipeH5Mapper.xml +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/cook/CookRecipeH5Mapper.xml @@ -86,6 +86,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + + + + + + + + +