test
This commit is contained in:
parent
d39356eddb
commit
92a0af2dbc
|
|
@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
|
||||||
|
import java.time.LocalTime;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -43,12 +44,12 @@ public class AllocStallMealtime extends BaseEntity {
|
||||||
@ApiModelProperty(value = "开始时间")
|
@ApiModelProperty(value = "开始时间")
|
||||||
@JsonFormat(pattern = "HH:mm:ss")
|
@JsonFormat(pattern = "HH:mm:ss")
|
||||||
@Excel(name = "开始时间", width = 30, dateFormat = "HH:mm:ss")
|
@Excel(name = "开始时间", width = 30, dateFormat = "HH:mm:ss")
|
||||||
private Date startTime;
|
private LocalTime startTime;
|
||||||
|
|
||||||
/** 结束时间 */
|
/** 结束时间 */
|
||||||
@ApiModelProperty(value = "结束时间")
|
@ApiModelProperty(value = "结束时间")
|
||||||
@JsonFormat(pattern = "HH:mm:ss")
|
@JsonFormat(pattern = "HH:mm:ss")
|
||||||
@Excel(name = "结束时间", width = 30, dateFormat = "HH:mm:ss")
|
@Excel(name = "结束时间", width = 30, dateFormat = "HH:mm:ss")
|
||||||
private Date endTime;
|
private LocalTime endTime;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,12 @@ import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import com.bonus.canteen.core.menu.domain.MenuAppRecipe;
|
import com.bonus.canteen.core.menu.domain.MenuAppRecipe;
|
||||||
|
import com.bonus.canteen.core.menu.dto.AppletReserveRecipeDTO;
|
||||||
import com.bonus.canteen.core.menu.service.IMenuAppRecipeService;
|
import com.bonus.canteen.core.menu.service.IMenuAppRecipeService;
|
||||||
import com.bonus.common.log.enums.OperaType;
|
import com.bonus.common.log.enums.OperaType;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
|
@ -30,6 +32,7 @@ import com.bonus.common.core.web.page.TableDataInfo;
|
||||||
@Api(tags = "移动端菜谱绑定关系接口")
|
@Api(tags = "移动端菜谱绑定关系接口")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/menu_app_recipe")
|
@RequestMapping("/menu_app_recipe")
|
||||||
|
@Slf4j
|
||||||
public class MenuAppRecipeController extends BaseController {
|
public class MenuAppRecipeController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IMenuAppRecipeService menuAppRecipeService;
|
private IMenuAppRecipeService menuAppRecipeService;
|
||||||
|
|
@ -113,4 +116,21 @@ public class MenuAppRecipeController extends BaseController {
|
||||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||||
return toAjax(menuAppRecipeService.deleteMenuAppRecipeByIds(ids));
|
return toAjax(menuAppRecipeService.deleteMenuAppRecipeByIds(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author jsk
|
||||||
|
* @param content
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation("获取预定餐菜谱详情")
|
||||||
|
@PostMapping({"/reserve/recipe/detail"})
|
||||||
|
public TableDataInfo getReserveRecipeDetailList(@RequestBody AppletReserveRecipeDTO content) {
|
||||||
|
try {
|
||||||
|
startPage();
|
||||||
|
return getDataTable(this.menuAppRecipeService.getReserveRecipeDetailList(content));
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.toString(), e);
|
||||||
|
return getDataTable(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
package com.bonus.canteen.core.menu.dto;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class AppletReserveRecipeDTO {
|
||||||
|
@ApiModelProperty("菜谱日期")
|
||||||
|
private @NotNull(
|
||||||
|
message = "{menu_apply_date_null}"
|
||||||
|
) LocalDate applyDate;
|
||||||
|
@ApiModelProperty("菜谱id")
|
||||||
|
private @NotNull(
|
||||||
|
message = "{menu_recipe_id_null}"
|
||||||
|
) Long recipeId;
|
||||||
|
@ApiModelProperty("人员id")
|
||||||
|
private Long custId;
|
||||||
|
|
||||||
|
public LocalDate getApplyDate() {
|
||||||
|
return this.applyDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getRecipeId() {
|
||||||
|
return this.recipeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getCustId() {
|
||||||
|
return this.custId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setApplyDate(final LocalDate applyDate) {
|
||||||
|
this.applyDate = applyDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRecipeId(final Long recipeId) {
|
||||||
|
this.recipeId = recipeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCustId(final Long custId) {
|
||||||
|
this.custId = custId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
String var10000 = String.valueOf(this.getApplyDate());
|
||||||
|
return "AppletReserveRecipeDTO(applyDate=" + var10000 + ", recipeId=" + this.getRecipeId() + ", custId=" + this.getCustId() + ")";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -2,6 +2,8 @@ package com.bonus.canteen.core.menu.service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.bonus.canteen.core.menu.domain.MenuAppRecipe;
|
import com.bonus.canteen.core.menu.domain.MenuAppRecipe;
|
||||||
|
import com.bonus.canteen.core.menu.dto.AppletReserveRecipeDTO;
|
||||||
|
import com.bonus.canteen.core.menu.vo.AppletReserveRecipeVO;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 移动端菜谱绑定关系Service接口
|
* 移动端菜谱绑定关系Service接口
|
||||||
|
|
@ -57,4 +59,6 @@ public interface IMenuAppRecipeService {
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteMenuAppRecipeById(Long id);
|
public int deleteMenuAppRecipeById(Long id);
|
||||||
|
|
||||||
|
public List<AppletReserveRecipeVO> getReserveRecipeDetailList(AppletReserveRecipeDTO content);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,30 @@
|
||||||
package com.bonus.canteen.core.menu.service.impl;
|
package com.bonus.canteen.core.menu.service.impl;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.LocalTime;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.bonus.canteen.core.alloc.domain.AllocStall;
|
||||||
|
import com.bonus.canteen.core.alloc.domain.AllocStallMealtime;
|
||||||
|
import com.bonus.canteen.core.menu.domain.MenuRecipe;
|
||||||
|
import com.bonus.canteen.core.menu.dto.AppletReserveRecipeDTO;
|
||||||
import com.bonus.canteen.core.menu.service.IMenuAppRecipeService;
|
import com.bonus.canteen.core.menu.service.IMenuAppRecipeService;
|
||||||
|
import com.bonus.canteen.core.menu.vo.AppletReserveRecipeDishesVO;
|
||||||
|
import com.bonus.canteen.core.menu.vo.AppletReserveRecipeTypeVO;
|
||||||
|
import com.bonus.canteen.core.menu.vo.AppletReserveRecipeVO;
|
||||||
import com.bonus.common.core.exception.ServiceException;
|
import com.bonus.common.core.exception.ServiceException;
|
||||||
import com.bonus.common.core.utils.DateUtils;
|
import com.bonus.common.core.utils.DateUtils;
|
||||||
|
import com.bonus.common.houqin.constant.DelFlagEnum;
|
||||||
|
import com.google.common.collect.Lists;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.bonus.canteen.core.menu.mapper.MenuAppRecipeMapper;
|
import com.bonus.canteen.core.menu.mapper.MenuAppRecipeMapper;
|
||||||
|
|
@ -18,6 +37,7 @@ import com.bonus.canteen.core.menu.domain.MenuAppRecipe;
|
||||||
* @date 2025-04-03
|
* @date 2025-04-03
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
|
@Slf4j
|
||||||
public class MenuAppRecipeServiceImpl implements IMenuAppRecipeService {
|
public class MenuAppRecipeServiceImpl implements IMenuAppRecipeService {
|
||||||
@Autowired
|
@Autowired
|
||||||
private MenuAppRecipeMapper menuAppRecipeMapper;
|
private MenuAppRecipeMapper menuAppRecipeMapper;
|
||||||
|
|
@ -97,4 +117,133 @@ public class MenuAppRecipeServiceImpl implements IMenuAppRecipeService {
|
||||||
public int deleteMenuAppRecipeById(Long id) {
|
public int deleteMenuAppRecipeById(Long id) {
|
||||||
return menuAppRecipeMapper.deleteMenuAppRecipeById(id);
|
return menuAppRecipeMapper.deleteMenuAppRecipeById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<AppletReserveRecipeVO> getReserveRecipeDetailList(AppletReserveRecipeDTO content) {
|
||||||
|
this.generateRecipe(content.getRecipeId(), content.getApplyDate());
|
||||||
|
List<AppletReserveRecipeVO> resultList = this.baseMapper.selectReserveRecipe(content.getApplyDate(), content.getRecipeId());
|
||||||
|
if (ObjectUtil.isEmpty(resultList)) {
|
||||||
|
return resultList;
|
||||||
|
} else {
|
||||||
|
resultList.sort(Collections.reverseOrder((s1, s2) -> {
|
||||||
|
return s2.getMealtimeType() - s1.getMealtimeType();
|
||||||
|
}));
|
||||||
|
Long stallId = this.baseMapper.selectStallIdByWrappers(Wrappers.lambdaQuery(MenuRecipe.class).eq(MenuRecipe::getRecipeId, content.getRecipeId()).eq(MenuRecipe::getDelFlag, DelFlagEnum.DEL_FALSE.key()));
|
||||||
|
|
||||||
|
AllocStall allocStall = new AllocStall(); //TODO 查询档口
|
||||||
|
List<AllocStallMealtime> mealTimeList = allocStall.getAllocStallMealtimeList();
|
||||||
|
log.info("配置api查询的档口餐次,档口id: {}, 配置: {}", stallId, JSON.toJSONString(mealTimeList));
|
||||||
|
if (ObjectUtil.isEmpty(mealTimeList)) {
|
||||||
|
log.info("未获取到开启餐次");
|
||||||
|
return Lists.newArrayList();
|
||||||
|
} else {
|
||||||
|
if (LocalDate.now().isEqual(content.getApplyDate())) {
|
||||||
|
mealTimeList = mealTimeList.stream().filter((time) -> {
|
||||||
|
return LocalTime.now().isBefore(time.getStartTime());
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ObjectUtil.isEmpty(mealTimeList)) {
|
||||||
|
log.info("未获取到餐次");
|
||||||
|
return Lists.newArrayList();
|
||||||
|
} else {
|
||||||
|
List<AllocMealtimeStateModel> finalMealTimeList = mealTimeList;
|
||||||
|
resultList = resultList.stream().filter((time) -> {
|
||||||
|
return finalMealTimeList.stream().map(AllocMealtimeStateModel::getMealtimeType).collect(Collectors.toList()).contains(time.getMealtimeType());
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
resultList.forEach((time) -> {
|
||||||
|
List<AppletReserveRecipeTypeVO> typeList = time.getTypeList();
|
||||||
|
if (ObjectUtil.isNotEmpty(typeList)) {
|
||||||
|
typeList.forEach((type) -> {
|
||||||
|
List<AppletReserveRecipeDishesVO> dishesList = type.getDishesList();
|
||||||
|
if (ObjectUtil.isNotEmpty(dishesList)) {
|
||||||
|
dishesList.forEach((dishes) -> {
|
||||||
|
dishes.setCostModelList(costModelList);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
Set<Long> 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 {
|
||||||
|
// List<DishNutritionParam> dishNutritionParamList = this.menuDishesMapper.selectNutrition(dishesIdSet);
|
||||||
|
// HealthDishRecommendScoreVO dishesRecommendScore = this.nutritionApi.getDishesRecommendScore(content.getCustId(), dishNutritionParamList);
|
||||||
|
// if (dishesRecommendScore.getRecommendFlag()) {
|
||||||
|
// resultList.forEach((time) -> {
|
||||||
|
// List<AppletReserveRecipeTypeVO> typeList = time.getTypeList();
|
||||||
|
// if (ObjectUtil.isNotEmpty(typeList)) {
|
||||||
|
// typeList.forEach((type) -> {
|
||||||
|
// List<AppletReserveRecipeDishesVO> dishesList = type.getDishesList();
|
||||||
|
// if (ObjectUtil.isNotEmpty(dishesList)) {
|
||||||
|
// dishesList.forEach((dishes) -> {
|
||||||
|
// Integer initialScore = (Integer) dishesRecommendScore.getDishRecommendMap().get(((AppletCurrentDishesDetailVO) dishes.getDishesDetailList().get(0)).getDishesId());
|
||||||
|
// if (ObjectUtil.isNotNull(initialScore)) {
|
||||||
|
// dishes.setInitialScore(initialScore);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
|
Iterator var10 = resultList.iterator();
|
||||||
|
|
||||||
|
while (true) {
|
||||||
|
List<AppletReserveRecipeTypeVO> typeList;
|
||||||
|
do {
|
||||||
|
if (!var10.hasNext()) {
|
||||||
|
return resultList;
|
||||||
|
}
|
||||||
|
|
||||||
|
AppletReserveRecipeVO mealtime = (AppletReserveRecipeVO) var10.next();
|
||||||
|
typeList = mealtime.getTypeList();
|
||||||
|
} while (!ObjectUtil.isNotEmpty(typeList));
|
||||||
|
|
||||||
|
List<AppletReserveRecipeDishesVO> recommendList = Lists.newArrayList();
|
||||||
|
|
||||||
|
for (AppletReserveRecipeTypeVO type : typeList) {
|
||||||
|
List<AppletReserveRecipeDishesVO> dishesList = type.getDishesList();
|
||||||
|
if (ObjectUtil.isNotEmpty(dishesList)) {
|
||||||
|
List<AppletReserveRecipeDishesVO> 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void generateRecipe(Long recipeId, LocalDate applyDate) {
|
||||||
|
if (!ObjectUtil.isEmpty(recipeId) && !ObjectUtil.isEmpty(applyDate)) {
|
||||||
|
this.generateRecipe(Collections.singletonList(recipeId), applyDate);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,111 @@
|
||||||
|
package com.bonus.canteen.core.menu.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
@ApiModel("菜品详情(大小份)")
|
||||||
|
public class AppletCurrentDishesDetailVO {
|
||||||
|
@ApiModelProperty("菜品id")
|
||||||
|
private Long dishesId;
|
||||||
|
@ApiModelProperty("菜品名称")
|
||||||
|
private String dishesName;
|
||||||
|
@ApiModelProperty("库存数量")
|
||||||
|
private Integer surplusNum;
|
||||||
|
@ApiModelProperty("限购数量")
|
||||||
|
private Integer restrictNum;
|
||||||
|
@ApiModelProperty("菜品价格")
|
||||||
|
private Integer dishesPrice;
|
||||||
|
@ApiModelProperty("优惠价")
|
||||||
|
private Integer prefPrice;
|
||||||
|
@ApiModelProperty("规格类型(1-标准,2-大份,3-小份,4-50g,5-100g)")
|
||||||
|
private Long sizeType;
|
||||||
|
@ApiModelProperty("菜品规格")
|
||||||
|
private String sizeJson;
|
||||||
|
@ApiModelProperty("月销量")
|
||||||
|
private Integer monthlySales;
|
||||||
|
@ApiModelProperty("好评率")
|
||||||
|
private BigDecimal goodProbability;
|
||||||
|
|
||||||
|
public Integer getMonthlySales() {
|
||||||
|
return (Integer)Optional.ofNullable(this.monthlySales).orElse(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getGoodProbability() {
|
||||||
|
return (BigDecimal)Optional.ofNullable(this.goodProbability).orElse(BigDecimal.ZERO);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getSizeType() {
|
||||||
|
return (Long)Optional.ofNullable(this.sizeType).orElse(1L);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getDishesId() {
|
||||||
|
return this.dishesId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDishesName() {
|
||||||
|
return this.dishesName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getSurplusNum() {
|
||||||
|
return this.surplusNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getRestrictNum() {
|
||||||
|
return this.restrictNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getDishesPrice() {
|
||||||
|
return this.dishesPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getPrefPrice() {
|
||||||
|
return this.prefPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSizeJson() {
|
||||||
|
return this.sizeJson;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDishesId(final Long dishesId) {
|
||||||
|
this.dishesId = dishesId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDishesName(final String dishesName) {
|
||||||
|
this.dishesName = dishesName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSurplusNum(final Integer surplusNum) {
|
||||||
|
this.surplusNum = surplusNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRestrictNum(final Integer restrictNum) {
|
||||||
|
this.restrictNum = restrictNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDishesPrice(final Integer dishesPrice) {
|
||||||
|
this.dishesPrice = dishesPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPrefPrice(final Integer prefPrice) {
|
||||||
|
this.prefPrice = prefPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSizeType(final Long sizeType) {
|
||||||
|
this.sizeType = sizeType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSizeJson(final String sizeJson) {
|
||||||
|
this.sizeJson = sizeJson;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMonthlySales(final Integer monthlySales) {
|
||||||
|
this.monthlySales = monthlySales;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGoodProbability(final BigDecimal goodProbability) {
|
||||||
|
this.goodProbability = goodProbability;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,172 @@
|
||||||
|
package com.bonus.canteen.core.menu.vo;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@ApiModel("菜品详情")
|
||||||
|
public class AppletReserveRecipeDishesVO {
|
||||||
|
@ApiModelProperty("菜品id")
|
||||||
|
private Long baseDishesId;
|
||||||
|
@ApiModelProperty("菜品名称")
|
||||||
|
private String dishesName;
|
||||||
|
@ApiModelProperty("菜品类型")
|
||||||
|
private Integer detailType;
|
||||||
|
@ApiModelProperty("菜品图片")
|
||||||
|
private String dishesImgUrl;
|
||||||
|
@ApiModelProperty("菜谱详情id")
|
||||||
|
private Long detailId;
|
||||||
|
@ApiModelProperty("食堂id")
|
||||||
|
private Long canteenId;
|
||||||
|
@ApiModelProperty("食堂名称")
|
||||||
|
private String canteenName;
|
||||||
|
@ApiModelProperty("档口id")
|
||||||
|
private Long stallId;
|
||||||
|
@ApiModelProperty("档口名称")
|
||||||
|
private String stallName;
|
||||||
|
@ApiModelProperty("菜品推荐分值")
|
||||||
|
private Integer initialScore;
|
||||||
|
@ApiModelProperty("月销量")
|
||||||
|
private Integer monthlySales;
|
||||||
|
@ApiModelProperty("好评率")
|
||||||
|
private BigDecimal goodProbability;
|
||||||
|
@ApiModelProperty("是否推荐")
|
||||||
|
private Integer recommendFlag;
|
||||||
|
@ApiModelProperty("大小份详情")
|
||||||
|
private List<AppletCurrentDishesDetailVO> dishesDetailList;
|
||||||
|
// @ApiModelProperty("配送方式列表")
|
||||||
|
// private List<AllocDeliveryCostModel> costModelList;
|
||||||
|
@ApiModelProperty("口味列表")
|
||||||
|
private List<String> tasteNameList;
|
||||||
|
|
||||||
|
// public String getDishesImgUrl() {
|
||||||
|
// return ObjectUtil.isNotEmpty(this.dishesImgUrl) ? SysUtil.getCutFileUrl(this.dishesImgUrl.split(",")[0]) : this.dishesImgUrl;
|
||||||
|
// }
|
||||||
|
|
||||||
|
public Long getBaseDishesId() {
|
||||||
|
return baseDishesId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBaseDishesId(Long baseDishesId) {
|
||||||
|
this.baseDishesId = baseDishesId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDishesName() {
|
||||||
|
return dishesName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDishesName(String dishesName) {
|
||||||
|
this.dishesName = dishesName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getDetailType() {
|
||||||
|
return detailType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDetailType(Integer detailType) {
|
||||||
|
this.detailType = detailType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDishesImgUrl(String dishesImgUrl) {
|
||||||
|
this.dishesImgUrl = dishesImgUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getDetailId() {
|
||||||
|
return detailId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDetailId(Long detailId) {
|
||||||
|
this.detailId = detailId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getCanteenId() {
|
||||||
|
return canteenId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCanteenId(Long canteenId) {
|
||||||
|
this.canteenId = canteenId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCanteenName() {
|
||||||
|
return canteenName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCanteenName(String canteenName) {
|
||||||
|
this.canteenName = canteenName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getStallId() {
|
||||||
|
return stallId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStallId(Long stallId) {
|
||||||
|
this.stallId = stallId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStallName() {
|
||||||
|
return stallName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStallName(String stallName) {
|
||||||
|
this.stallName = stallName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getInitialScore() {
|
||||||
|
return initialScore;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInitialScore(Integer initialScore) {
|
||||||
|
this.initialScore = initialScore;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getMonthlySales() {
|
||||||
|
return monthlySales;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMonthlySales(Integer monthlySales) {
|
||||||
|
this.monthlySales = monthlySales;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getGoodProbability() {
|
||||||
|
return goodProbability;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGoodProbability(BigDecimal goodProbability) {
|
||||||
|
this.goodProbability = goodProbability;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getRecommendFlag() {
|
||||||
|
return recommendFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRecommendFlag(Integer recommendFlag) {
|
||||||
|
this.recommendFlag = recommendFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<AppletCurrentDishesDetailVO> getDishesDetailList() {
|
||||||
|
return dishesDetailList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDishesDetailList(List<AppletCurrentDishesDetailVO> dishesDetailList) {
|
||||||
|
this.dishesDetailList = dishesDetailList;
|
||||||
|
}
|
||||||
|
|
||||||
|
// public List<AllocDeliveryCostModel> getCostModelList() {
|
||||||
|
// return costModelList;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public void setCostModelList(List<AllocDeliveryCostModel> costModelList) {
|
||||||
|
// this.costModelList = costModelList;
|
||||||
|
// }
|
||||||
|
|
||||||
|
public List<String> getTasteNameList() {
|
||||||
|
return tasteNameList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTasteNameList(List<String> tasteNameList) {
|
||||||
|
this.tasteNameList = tasteNameList;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
package com.bonus.canteen.core.menu.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@ApiModel("分类详情")
|
||||||
|
public class AppletReserveRecipeTypeVO {
|
||||||
|
@ApiModelProperty("菜品类别id")
|
||||||
|
private Long typeId;
|
||||||
|
@ApiModelProperty("菜品类别名称")
|
||||||
|
private String typeName;
|
||||||
|
@ApiModelProperty("菜品详情")
|
||||||
|
private List<AppletReserveRecipeDishesVO> dishesList;
|
||||||
|
|
||||||
|
public Long getTypeId() {
|
||||||
|
return typeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTypeId(Long typeId) {
|
||||||
|
this.typeId = typeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTypeName() {
|
||||||
|
return typeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTypeName(String typeName) {
|
||||||
|
this.typeName = typeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<AppletReserveRecipeDishesVO> getDishesList() {
|
||||||
|
return dishesList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDishesList(List<AppletReserveRecipeDishesVO> dishesList) {
|
||||||
|
this.dishesList = dishesList;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
package com.bonus.canteen.core.menu.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@ApiModel("获取预定餐菜谱详情")
|
||||||
|
public class AppletReserveRecipeVO {
|
||||||
|
@ApiModelProperty("餐次类型")
|
||||||
|
private Integer mealtimeType;
|
||||||
|
@ApiModelProperty("餐次名称")
|
||||||
|
private String mealtimeName;
|
||||||
|
@ApiModelProperty("分类详情")
|
||||||
|
private List<AppletReserveRecipeTypeVO> typeList;
|
||||||
|
|
||||||
|
public Integer getMealtimeType() {
|
||||||
|
return mealtimeType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMealtimeType(Integer mealtimeType) {
|
||||||
|
this.mealtimeType = mealtimeType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMealtimeName() {
|
||||||
|
return mealtimeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMealtimeName(String mealtimeName) {
|
||||||
|
this.mealtimeName = mealtimeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<AppletReserveRecipeTypeVO> getTypeList() {
|
||||||
|
return typeList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTypeList(List<AppletReserveRecipeTypeVO> typeList) {
|
||||||
|
this.typeList = typeList;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue