菜谱管理
This commit is contained in:
parent
596c7d16fd
commit
070bf9c495
|
|
@ -241,11 +241,13 @@ public class CookRecipeServiceImpl implements ICookRecipeService {
|
||||||
if (!CollectionUtils.isEmpty(cookRecipeDTO.getRecipeDateList())) {
|
if (!CollectionUtils.isEmpty(cookRecipeDTO.getRecipeDateList())) {
|
||||||
for (CookRecipeDateDTO recipeDateDTO : cookRecipeDTO.getRecipeDateList()) {
|
for (CookRecipeDateDTO recipeDateDTO : cookRecipeDTO.getRecipeDateList()) {
|
||||||
List<CookRecipeDetailDTO> detailList = recipeDateDTO.getDetailList();
|
List<CookRecipeDetailDTO> detailList = recipeDateDTO.getDetailList();
|
||||||
for (CookRecipeDetailDTO detailDTO : detailList) {
|
if (!CollectionUtils.isEmpty(detailList)) {
|
||||||
if (CollectionUtils.isEmpty(detailDTO.getDishesList())) { //不插入空数据
|
for (CookRecipeDetailDTO detailDTO : detailList) {
|
||||||
continue;
|
if (CollectionUtils.isEmpty(detailDTO.getDishesList())) { //不插入空数据
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
insertDetailAndDishes(cookRecipeDTO, recipeDateDTO, detailDTO);
|
||||||
}
|
}
|
||||||
insertDetailAndDishes(cookRecipeDTO, recipeDateDTO, detailDTO);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -254,11 +256,13 @@ public class CookRecipeServiceImpl implements ICookRecipeService {
|
||||||
if (!CollectionUtils.isEmpty(generatedRecipeDateList)) {
|
if (!CollectionUtils.isEmpty(generatedRecipeDateList)) {
|
||||||
for (CookRecipeDateDTO recipeDateDTO : generatedRecipeDateList) {
|
for (CookRecipeDateDTO recipeDateDTO : generatedRecipeDateList) {
|
||||||
List<CookRecipeDetailDTO> detailList = recipeDateDTO.getDetailList();
|
List<CookRecipeDetailDTO> detailList = recipeDateDTO.getDetailList();
|
||||||
for (CookRecipeDetailDTO detailDTO : detailList) {
|
if (!CollectionUtils.isEmpty(detailList)) {
|
||||||
if (CollectionUtils.isEmpty(detailDTO.getDishesList())) { //不插入空数据
|
for (CookRecipeDetailDTO detailDTO : detailList) {
|
||||||
continue;
|
if (CollectionUtils.isEmpty(detailDTO.getDishesList())) { //不插入空数据
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
insertDetailAndDishes(cookRecipeDTO, recipeDateDTO, detailDTO);
|
||||||
}
|
}
|
||||||
insertDetailAndDishes(cookRecipeDTO, recipeDateDTO, detailDTO);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -293,15 +297,6 @@ public class CookRecipeServiceImpl implements ICookRecipeService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
recipeDateListNew.add(cookRecipeDateDTO);
|
recipeDateListNew.add(cookRecipeDateDTO);
|
||||||
// if (!CollectionUtils.isEmpty(cookRecipeDateDTO.getDetailList())) {
|
|
||||||
// List<CookRecipeDetailDTO> detailList = cookRecipeDateDTO.getDetailList();
|
|
||||||
// for (CookRecipeDetailDTO detail : detailList) {
|
|
||||||
// if (!CollectionUtils.isEmpty(detail.getDishesList())) {
|
|
||||||
// recipeDateListNew.add(cookRecipeDateDTO);
|
|
||||||
// }
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return recipeDateListNew;
|
return recipeDateListNew;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue