一周菜谱
This commit is contained in:
parent
fd74445693
commit
3bdcf42f3f
|
|
@ -42,7 +42,13 @@ public class SysUtil {
|
||||||
|
|
||||||
public static String getCutFileUrl(String fileUrl) {
|
public static String getCutFileUrl(String fileUrl) {
|
||||||
log.info("出参_补图_原路径:{},前缀:{},存储桶:{}", new Object[]{fileUrl, getPrefix(), getBucket()});
|
log.info("出参_补图_原路径:{},前缀:{},存储桶:{}", new Object[]{fileUrl, getPrefix(), getBucket()});
|
||||||
String cutFileUrl = getCutFileUrl(fileUrl, getPrefix(), getBucket());
|
String cutFileUrl = null;
|
||||||
|
try {
|
||||||
|
cutFileUrl = getCutFileUrl(fileUrl, getPrefix(), getBucket());
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("获取存储桶图片地址失败, " + e.getMessage());
|
||||||
|
cutFileUrl = fileUrl;
|
||||||
|
}
|
||||||
log.info("出参_补图_补图后路径:{}", cutFileUrl);
|
log.info("出参_补图_补图后路径:{}", cutFileUrl);
|
||||||
return cutFileUrl;
|
return cutFileUrl;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,14 @@
|
||||||
package com.bonus.core.menu.vo;
|
package com.bonus.core.menu.vo;
|
||||||
|
|
||||||
|
import com.bonus.core.common.utils.SysUtil;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.time.LocalTime;
|
import java.time.LocalTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
@ApiModel("档口菜谱")
|
@ApiModel("档口菜谱")
|
||||||
@Data
|
|
||||||
public class AppletCurrentStallVO {
|
public class AppletCurrentStallVO {
|
||||||
@ApiModelProperty("档口id")
|
@ApiModelProperty("档口id")
|
||||||
private Long stallId;
|
private Long stallId;
|
||||||
|
|
@ -31,4 +30,84 @@ public class AppletCurrentStallVO {
|
||||||
private LocalTime endBusinessTime;
|
private LocalTime endBusinessTime;
|
||||||
@ApiModelProperty("食堂营业状态")
|
@ApiModelProperty("食堂营业状态")
|
||||||
private Integer businessState;
|
private Integer businessState;
|
||||||
|
|
||||||
|
public String getStallImgUrl() {
|
||||||
|
return SysUtil.getCutFileUrl(this.stallImgUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getMonthlySales() {
|
||||||
|
return (Integer)Optional.ofNullable(this.monthlySales).orElse(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getStallId() {
|
||||||
|
return this.stallId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStallName() {
|
||||||
|
return this.stallName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getStallState() {
|
||||||
|
return this.stallState;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getRecipeId() {
|
||||||
|
return this.recipeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<AppletRecommendDishesVO> getRecommendList() {
|
||||||
|
return this.recommendList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalTime getStartBusinessTime() {
|
||||||
|
return this.startBusinessTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalTime getEndBusinessTime() {
|
||||||
|
return this.endBusinessTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getBusinessState() {
|
||||||
|
return this.businessState;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStallId(final Long stallId) {
|
||||||
|
this.stallId = stallId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStallName(final String stallName) {
|
||||||
|
this.stallName = stallName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStallState(final Integer stallState) {
|
||||||
|
this.stallState = stallState;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStallImgUrl(final String stallImgUrl) {
|
||||||
|
this.stallImgUrl = stallImgUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRecipeId(final Long recipeId) {
|
||||||
|
this.recipeId = recipeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRecommendList(final List<AppletRecommendDishesVO> recommendList) {
|
||||||
|
this.recommendList = recommendList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMonthlySales(final Integer monthlySales) {
|
||||||
|
this.monthlySales = monthlySales;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStartBusinessTime(final LocalTime startBusinessTime) {
|
||||||
|
this.startBusinessTime = startBusinessTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEndBusinessTime(final LocalTime endBusinessTime) {
|
||||||
|
this.endBusinessTime = endBusinessTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBusinessState(final Integer businessState) {
|
||||||
|
this.businessState = businessState;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
package com.bonus.core.menu.vo;
|
package com.bonus.core.menu.vo;
|
||||||
|
|
||||||
|
import com.bonus.core.common.utils.SysUtil;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@ApiModel("推荐菜品")
|
@ApiModel("推荐菜品")
|
||||||
@Data
|
|
||||||
public class AppletRecommendDishesVO {
|
public class AppletRecommendDishesVO {
|
||||||
@ApiModelProperty("菜品id")
|
@ApiModelProperty("菜品id")
|
||||||
private Long dishesId;
|
private Long dishesId;
|
||||||
|
|
@ -15,4 +15,36 @@ public class AppletRecommendDishesVO {
|
||||||
private Integer dishesPrice;
|
private Integer dishesPrice;
|
||||||
@ApiModelProperty("菜品图片")
|
@ApiModelProperty("菜品图片")
|
||||||
private String dishesImgUrl;
|
private String dishesImgUrl;
|
||||||
|
|
||||||
|
public String getDishesImgUrl() {
|
||||||
|
return SysUtil.getCutFileUrl(this.dishesImgUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getDishesId() {
|
||||||
|
return this.dishesId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDishesName() {
|
||||||
|
return this.dishesName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getDishesPrice() {
|
||||||
|
return this.dishesPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDishesId(final Long dishesId) {
|
||||||
|
this.dishesId = dishesId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDishesName(final String dishesName) {
|
||||||
|
this.dishesName = dishesName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDishesPrice(final Integer dishesPrice) {
|
||||||
|
this.dishesPrice = dishesPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDishesImgUrl(final String dishesImgUrl) {
|
||||||
|
this.dishesImgUrl = dishesImgUrl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.bonus.core.menu.vo;
|
package com.bonus.core.menu.vo;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import com.bonus.core.common.utils.SysUtil;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.time.LocalTime;
|
import java.time.LocalTime;
|
||||||
|
|
@ -27,11 +28,75 @@ public class AppletReserveCanteenVO {
|
||||||
@ApiModelProperty("档口菜谱")
|
@ApiModelProperty("档口菜谱")
|
||||||
private List<AppletReserveStallVO> stallList;
|
private List<AppletReserveStallVO> stallList;
|
||||||
|
|
||||||
// public String getCanteenImgUrl() {
|
public String getCanteenImgUrl() {
|
||||||
// return SysUtil.getCutFileUrl(this.canteenImgUrl);
|
return SysUtil.getCutFileUrl(this.canteenImgUrl);
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// public Integer getMonthlySales() {
|
public Integer getMonthlySales() {
|
||||||
// return CollUtil.isNotEmpty(this.stallList) ? this.stallList.stream().mapToInt(AppletReserveStallVO::getMonthlySales).sum() : 0;
|
return CollUtil.isNotEmpty(this.stallList) ? this.stallList.stream().mapToInt(AppletReserveStallVO::getMonthlySales).sum() : 0;
|
||||||
// }
|
}
|
||||||
|
|
||||||
|
public Long getCanteenId() {
|
||||||
|
return this.canteenId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCanteenName() {
|
||||||
|
return this.canteenName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCanteenState() {
|
||||||
|
return this.canteenState;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalTime getStartBusinessTime() {
|
||||||
|
return this.startBusinessTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalTime getEndBusinessTime() {
|
||||||
|
return this.endBusinessTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getBusinessState() {
|
||||||
|
return this.businessState;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<AppletReserveStallVO> getStallList() {
|
||||||
|
return this.stallList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCanteenId(final Long canteenId) {
|
||||||
|
this.canteenId = canteenId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCanteenName(final String canteenName) {
|
||||||
|
this.canteenName = canteenName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCanteenState(final Integer canteenState) {
|
||||||
|
this.canteenState = canteenState;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCanteenImgUrl(final String canteenImgUrl) {
|
||||||
|
this.canteenImgUrl = canteenImgUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMonthlySales(final Integer monthlySales) {
|
||||||
|
this.monthlySales = monthlySales;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStartBusinessTime(final LocalTime startBusinessTime) {
|
||||||
|
this.startBusinessTime = startBusinessTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEndBusinessTime(final LocalTime endBusinessTime) {
|
||||||
|
this.endBusinessTime = endBusinessTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBusinessState(final Integer businessState) {
|
||||||
|
this.businessState = businessState;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStallList(final List<AppletReserveStallVO> stallList) {
|
||||||
|
this.stallList = stallList;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.bonus.core.menu.vo;
|
package com.bonus.core.menu.vo;
|
||||||
|
|
||||||
|
import com.bonus.core.common.utils.SysUtil;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.time.LocalTime;
|
import java.time.LocalTime;
|
||||||
|
|
@ -33,4 +34,99 @@ public class AppletReserveStallVO {
|
||||||
@ApiModelProperty("推荐菜品")
|
@ApiModelProperty("推荐菜品")
|
||||||
private List<AppletRecommendDishesVO> recommendList;
|
private List<AppletRecommendDishesVO> recommendList;
|
||||||
|
|
||||||
|
public String getStallImgUrl() {
|
||||||
|
return SysUtil.getCutFileUrl(this.stallImgUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getMonthlySales() {
|
||||||
|
return (Integer)Optional.ofNullable(this.monthlySales).orElse(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getStallId() {
|
||||||
|
return this.stallId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStallName() {
|
||||||
|
return this.stallName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getStallState() {
|
||||||
|
return this.stallState;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalTime getStallStartTime() {
|
||||||
|
return this.stallStartTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalTime getStallEndTime() {
|
||||||
|
return this.stallEndTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getRecipeId() {
|
||||||
|
return this.recipeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalTime getStartBusinessTime() {
|
||||||
|
return this.startBusinessTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalTime getEndBusinessTime() {
|
||||||
|
return this.endBusinessTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getBusinessState() {
|
||||||
|
return this.businessState;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<AppletRecommendDishesVO> getRecommendList() {
|
||||||
|
return this.recommendList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStallId(final Long stallId) {
|
||||||
|
this.stallId = stallId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStallName(final String stallName) {
|
||||||
|
this.stallName = stallName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStallState(final Integer stallState) {
|
||||||
|
this.stallState = stallState;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStallImgUrl(final String stallImgUrl) {
|
||||||
|
this.stallImgUrl = stallImgUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStallStartTime(final LocalTime stallStartTime) {
|
||||||
|
this.stallStartTime = stallStartTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStallEndTime(final LocalTime stallEndTime) {
|
||||||
|
this.stallEndTime = stallEndTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRecipeId(final Long recipeId) {
|
||||||
|
this.recipeId = recipeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMonthlySales(final Integer monthlySales) {
|
||||||
|
this.monthlySales = monthlySales;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStartBusinessTime(final LocalTime startBusinessTime) {
|
||||||
|
this.startBusinessTime = startBusinessTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEndBusinessTime(final LocalTime endBusinessTime) {
|
||||||
|
this.endBusinessTime = endBusinessTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBusinessState(final Integer businessState) {
|
||||||
|
this.businessState = businessState;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRecommendList(final List<AppletRecommendDishesVO> recommendList) {
|
||||||
|
this.recommendList = recommendList;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
package com.bonus.core.menu.vo;
|
package com.bonus.core.menu.vo;
|
||||||
|
|
||||||
|
import com.bonus.core.common.utils.SysUtil;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ApiModel("获取一周菜谱食堂列表")
|
@ApiModel("获取一周菜谱食堂列表")
|
||||||
@Data
|
|
||||||
public class AppletWeekCanteenVO {
|
public class AppletWeekCanteenVO {
|
||||||
@ApiModelProperty("菜谱id")
|
@ApiModelProperty("菜谱id")
|
||||||
private Long recipeId;
|
private Long recipeId;
|
||||||
|
|
@ -20,4 +20,52 @@ public class AppletWeekCanteenVO {
|
||||||
private String stallImgUrl;
|
private String stallImgUrl;
|
||||||
@ApiModelProperty("档口标签")
|
@ApiModelProperty("档口标签")
|
||||||
private List<String> labelList;
|
private List<String> labelList;
|
||||||
|
|
||||||
|
public String getCanteenImgUrl() {
|
||||||
|
return SysUtil.getCutFileUrl(this.canteenImgUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStallImgUrl() {
|
||||||
|
return SysUtil.getCutFileUrl(this.stallImgUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getRecipeId() {
|
||||||
|
return this.recipeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStallName() {
|
||||||
|
return this.stallName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCanteenName() {
|
||||||
|
return this.canteenName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getLabelList() {
|
||||||
|
return this.labelList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRecipeId(final Long recipeId) {
|
||||||
|
this.recipeId = recipeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStallName(final String stallName) {
|
||||||
|
this.stallName = stallName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCanteenName(final String canteenName) {
|
||||||
|
this.canteenName = canteenName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCanteenImgUrl(final String canteenImgUrl) {
|
||||||
|
this.canteenImgUrl = canteenImgUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStallImgUrl(final String stallImgUrl) {
|
||||||
|
this.stallImgUrl = stallImgUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLabelList(final List<String> labelList) {
|
||||||
|
this.labelList = labelList;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Reference in New Issue