fix配置pad端菜品bug
This commit is contained in:
parent
a38fbfd564
commit
9d0b0a4c25
|
|
@ -211,7 +211,8 @@ public class TbPadProductCategoryServiceImpl extends ServiceImpl<TbPadProductCat
|
|||
BeanUtil.copyProperties(dto, entity);
|
||||
entity.setCreateTime(new Date());
|
||||
super.save(entity);
|
||||
for (Long productId : productIdList) {
|
||||
Set<Long> productIdSet = productIdList.stream().collect(Collectors.toSet());
|
||||
for (Long productId : productIdSet) {
|
||||
TbPadProductCategoryDetail subEntity = new TbPadProductCategoryDetail();
|
||||
subEntity.setProductId(productId);
|
||||
subEntity.setPadProductCategoryId(entity.getId());
|
||||
|
|
@ -269,8 +270,9 @@ public class TbPadProductCategoryServiceImpl extends ServiceImpl<TbPadProductCat
|
|||
BeanUtil.copyProperties(dto, entity, "createTime");
|
||||
entity.setUpdateTime(new Date());
|
||||
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();
|
||||
subEntity.setProductId(productId);
|
||||
subEntity.setPadProductCategoryId(entity.getId());
|
||||
|
|
|
|||
Loading…
Reference in New Issue