更新菜谱
This commit is contained in:
parent
bf073b2f5a
commit
c7496379ef
|
|
@ -97,9 +97,11 @@ public class CookRecipeServiceImpl implements ICookRecipeService {
|
|||
// 循环菜谱,删掉模板数据 + 今日开始的详情数据
|
||||
if (!isCreate) {
|
||||
List<Long> cookRecipeDetailIds = cookRecipeDetailMapper.getToDeleteCookRecipeDetailIds(cookRecipeDTO.getRecipeId());
|
||||
Long[] cookRecipeDetailArray = cookRecipeDetailIds.stream().toArray(Long[]::new);
|
||||
cookRecipeDishesMapper.deleteCookRecipeDishesByCookRecipeDetailIds(cookRecipeDetailArray);
|
||||
cookRecipeDetailMapper.deleteCookRecipeDetailByRecipeDetailIds(cookRecipeDetailArray);
|
||||
if (!CollectionUtils.isEmpty(cookRecipeDetailIds)) {
|
||||
Long[] cookRecipeDetailArray = cookRecipeDetailIds.stream().toArray(Long[]::new);
|
||||
cookRecipeDishesMapper.deleteCookRecipeDishesByCookRecipeDetailIds(cookRecipeDetailArray);
|
||||
cookRecipeDetailMapper.deleteCookRecipeDetailByRecipeDetailIds(cookRecipeDetailArray);
|
||||
}
|
||||
}
|
||||
// 插入指定日期、日循环摸板、周循环模板
|
||||
if (!CollectionUtils.isEmpty(cookRecipeDTO.getRecipeDateList())) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue