h5周菜谱
This commit is contained in:
parent
0e5cab6adf
commit
0e64334328
|
|
@ -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("获取一周菜谱详情")
|
@ApiOperation("获取一周菜谱详情")
|
||||||
@PostMapping({"/week/recipe/detail"})
|
@PostMapping({"/week/recipe/detail"})
|
||||||
public TableDataInfo getWeekRecipeDetailList(@RequestBody @Valid AppletWeekRecipeDTO content) {
|
public TableDataInfo getWeekRecipeDetailList(@RequestBody @Valid AppletWeekRecipeDTO content) {
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -32,6 +32,8 @@ public interface CookRecipeH5Mapper {
|
||||||
|
|
||||||
Long selectStallIdByRecipeId(@Param("recipeId") Long recipeId);
|
Long selectStallIdByRecipeId(@Param("recipeId") Long recipeId);
|
||||||
|
|
||||||
|
List<AppletWeekCanteenVO> selectWeekCanteenList();
|
||||||
|
|
||||||
List<Long> selectWeekRecipeId(@Param("recipeId") Long recipeId);
|
List<Long> selectWeekRecipeId(@Param("recipeId") Long recipeId);
|
||||||
|
|
||||||
String getBingTimeByRecipeId(@Param("recipeId") Long recipeId);
|
String getBingTimeByRecipeId(@Param("recipeId") Long recipeId);
|
||||||
|
|
|
||||||
|
|
@ -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.basic.domain.AppletReserveCanteenVO;
|
||||||
import com.bonus.canteen.core.cook.domain.CookRecipe;
|
import com.bonus.canteen.core.cook.domain.CookRecipe;
|
||||||
import com.bonus.canteen.core.cook.dto.*;
|
import com.bonus.canteen.core.cook.dto.*;
|
||||||
import com.bonus.canteen.core.cook.vo.AllocRecipeStallVO;
|
import com.bonus.canteen.core.cook.vo.*;
|
||||||
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 org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
|
@ -27,5 +24,7 @@ public interface ICookRecipeH5Service {
|
||||||
|
|
||||||
public List<AppletReserveRecipeVO> getReserveRecipeDetailList(AppletReserveRecipeDTO content);
|
public List<AppletReserveRecipeVO> getReserveRecipeDetailList(AppletReserveRecipeDTO content);
|
||||||
|
|
||||||
|
List<AppletWeekCanteenVO> selectWeekCanteenList(AppletWeekCanteenDTO appletWeekCanteenDTO);
|
||||||
|
|
||||||
public List<AppletWeekRecipeVO> getWeekRecipeDetailList(AppletWeekRecipeDTO content);
|
public List<AppletWeekRecipeVO> getWeekRecipeDetailList(AppletWeekRecipeDTO content);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -124,6 +124,11 @@ public class CookRecipeServiceH5Impl implements ICookRecipeH5Service {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<AppletWeekCanteenVO> selectWeekCanteenList(AppletWeekCanteenDTO content) {
|
||||||
|
return this.cookRecipeH5Mapper.selectWeekCanteenList();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<AppletWeekRecipeVO> getWeekRecipeDetailList(AppletWeekRecipeDTO content) {
|
public List<AppletWeekRecipeVO> getWeekRecipeDetailList(AppletWeekRecipeDTO content) {
|
||||||
List<Long> recipeIdList = Lists.newArrayList();
|
List<Long> recipeIdList = Lists.newArrayList();
|
||||||
|
|
|
||||||
|
|
@ -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<String> labelList;
|
||||||
|
|
||||||
|
public String getCanteenImgUrl() {
|
||||||
|
return SysUtil.getCutFileUrl(this.canteenImgUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStallImgUrl() {
|
||||||
|
return SysUtil.getCutFileUrl(this.stallImgUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -86,6 +86,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</collection>
|
</collection>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
<resultMap id="appletWeekCanteenVO" type="com.bonus.canteen.core.cook.vo.AppletWeekCanteenVO">
|
||||||
|
<result property="recipeId" column="recipe_id"/>
|
||||||
|
<result property="stallName" column="stall_name"/>
|
||||||
|
<result property="canteenName" column="canteen_name"/>
|
||||||
|
<result property="canteenImgUrl" column="canteen_img_url"/>
|
||||||
|
<result property="stallImgUrl" column="stall_img_url"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
<select id="selectReserveMealCanteenList" resultMap="appletReserveCanteenVO">
|
<select id="selectReserveMealCanteenList" resultMap="appletReserveCanteenVO">
|
||||||
select
|
select
|
||||||
ac.canteen_id,
|
ac.canteen_id,
|
||||||
|
|
@ -179,6 +187,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where recipe_id = #{recipeId}
|
where recipe_id = #{recipeId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!-- 获取一周菜谱食堂列表 -->
|
||||||
|
<select id="selectWeekCanteenList" resultMap="appletWeekCanteenVO">
|
||||||
|
select
|
||||||
|
mr.recipe_id,
|
||||||
|
ass.stall_name,
|
||||||
|
ac.canteen_name,
|
||||||
|
ac.img_url as canteen_img_url,
|
||||||
|
ass.img_url as stall_img_url
|
||||||
|
from
|
||||||
|
cook_recipe_bind_app mar
|
||||||
|
left join cook_recipe mr on mar.recipe_id = mr.recipe_id
|
||||||
|
left join basic_canteen ac on mr.canteen_id = ac.canteen_id
|
||||||
|
left join basic_stall ass on mr.stall_id = ass.stall_id
|
||||||
|
where
|
||||||
|
bind_type = 3
|
||||||
|
</select>
|
||||||
|
|
||||||
<!-- 获取菜谱id -->
|
<!-- 获取菜谱id -->
|
||||||
<select id="selectWeekRecipeId" resultType="java.lang.Long">
|
<select id="selectWeekRecipeId" resultType="java.lang.Long">
|
||||||
select
|
select
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue