新增菜谱
This commit is contained in:
parent
8708c17555
commit
def2530573
|
|
@ -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 = "启用时间(周)")
|
||||
|
|
|
|||
|
|
@ -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); //模板数据
|
||||
|
|
|
|||
Loading…
Reference in New Issue