fix配置pad端菜品bug
This commit is contained in:
@@ -211,7 +211,8 @@ public class TbPadProductCategoryServiceImpl extends ServiceImpl<TbPadProductCat
|
|||||||
BeanUtil.copyProperties(dto, entity);
|
BeanUtil.copyProperties(dto, entity);
|
||||||
entity.setCreateTime(new Date());
|
entity.setCreateTime(new Date());
|
||||||
super.save(entity);
|
super.save(entity);
|
||||||
for (Long productId : productIdList) {
|
Set<Long> productIdSet = productIdList.stream().collect(Collectors.toSet());
|
||||||
|
for (Long productId : productIdSet) {
|
||||||
TbPadProductCategoryDetail subEntity = new TbPadProductCategoryDetail();
|
TbPadProductCategoryDetail subEntity = new TbPadProductCategoryDetail();
|
||||||
subEntity.setProductId(productId);
|
subEntity.setProductId(productId);
|
||||||
subEntity.setPadProductCategoryId(entity.getId());
|
subEntity.setPadProductCategoryId(entity.getId());
|
||||||
@@ -269,8 +270,9 @@ public class TbPadProductCategoryServiceImpl extends ServiceImpl<TbPadProductCat
|
|||||||
BeanUtil.copyProperties(dto, entity, "createTime");
|
BeanUtil.copyProperties(dto, entity, "createTime");
|
||||||
entity.setUpdateTime(new Date());
|
entity.setUpdateTime(new Date());
|
||||||
super.updateById(entity);
|
super.updateById(entity);
|
||||||
for (Long productId : productIdList) {
|
tbPadProductCategoryDetailMapper.delete(Wrappers.<TbPadProductCategoryDetail>lambdaQuery().eq(TbPadProductCategoryDetail::getPadProductCategoryId, entity.getId()));
|
||||||
tbPadProductCategoryDetailMapper.delete(Wrappers.<TbPadProductCategoryDetail>lambdaQuery().eq(TbPadProductCategoryDetail::getPadProductCategoryId, entity.getId()));
|
Set<Long> productIdSet = productIdList.stream().collect(Collectors.toSet());
|
||||||
|
for (Long productId : productIdSet) {
|
||||||
TbPadProductCategoryDetail subEntity = new TbPadProductCategoryDetail();
|
TbPadProductCategoryDetail subEntity = new TbPadProductCategoryDetail();
|
||||||
subEntity.setProductId(productId);
|
subEntity.setProductId(productId);
|
||||||
subEntity.setPadProductCategoryId(entity.getId());
|
subEntity.setPadProductCategoryId(entity.getId());
|
||||||
|
|||||||
Reference in New Issue
Block a user