From def2530573191858f1df26bdbb2bff9d4e320322 Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Wed, 28 May 2025 10:01:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=8F=9C=E8=B0=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bonus/canteen/core/cook/domain/CookRecipeDetail.java | 3 ++- .../core/cook/service/impl/CookRecipeServiceImpl.java | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) 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); //模板数据