diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/domain/CookRecipeDetail.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/domain/CookRecipeDetail.java index 259e67e..9ad676d 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/domain/CookRecipeDetail.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/domain/CookRecipeDetail.java @@ -1,5 +1,6 @@ package com.bonus.canteen.core.cook.domain; +import java.time.LocalDate; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; import com.bonus.common.core.annotation.Excel; @@ -38,7 +39,7 @@ public class CookRecipeDetail extends BaseEntity { @ApiModelProperty(value = "启用时间(天)") @JsonFormat(pattern = "yyyy-MM-dd") @Excel(name = "启用时间(天)", width = 30, dateFormat = "yyyy-MM-dd") - private Date applyDate; + private LocalDate applyDate; /** 启用时间(周) */ @Excel(name = "启用时间(周)") diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/impl/CookRecipeServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/impl/CookRecipeServiceImpl.java index fb9ff90..7fe64c4 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/impl/CookRecipeServiceImpl.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/service/impl/CookRecipeServiceImpl.java @@ -155,9 +155,12 @@ public class CookRecipeServiceImpl implements ICookRecipeService { private void insertDetailAndDishes(CookRecipeDTO cookRecipeDTO, CookRecipeDateDTO recipeDateDTO, CookRecipeDetailDTO detailDTO) { CookRecipeDetail cookRecipeDetail = new CookRecipeDetail(); - detailDTO.setApplyDate(recipeDateDTO.getApplyDate()); - detailDTO.setApplyWeek(recipeDateDTO.getApplyWeek()); - BeanUtils.copyProperties(detailDTO, cookRecipeDetail); + cookRecipeDetail.setRecipeDetailId(detailDTO.getRecipeDetailId()); + cookRecipeDetail.setMealtimeType(detailDTO.getMealtimeType()); + cookRecipeDetail.setSaleTypeId(detailDTO.getSaleTypeId()); + cookRecipeDetail.setApplyDate(recipeDateDTO.getApplyDate()); + cookRecipeDetail.setApplyWeek(recipeDateDTO.getApplyWeek()); + cookRecipeDetail.setApplyMonth(detailDTO.getApplyMonth()); cookRecipeDetail.setRecipeId(cookRecipeDTO.getRecipeId()); if (Objects.isNull(cookRecipeDetail.getApplyDate())) { cookRecipeDetail.setDetailType(1L); //模板数据