master:商品删除后,storeProduct中的prodStatus仍然为4 BUG修复;

pull/1121/head
liujiang 2025-11-09 20:47:49 +08:00
parent 77c706d765
commit c44f4341a1
1 changed files with 2 additions and 3 deletions

View File

@ -553,10 +553,9 @@ public class StoreProductServiceImpl implements IStoreProductService {
Map<Long, StoreProduct> storeProdMap = storeProdList.stream().collect(Collectors.toMap(StoreProduct::getId, Function.identity()));
// 旧的商品状态map
final Map<Long, Integer> storeProdStatusMap = storeProdList.stream().collect(Collectors.toMap(StoreProduct::getId, StoreProduct::getProdStatus));
// 筛选所有的商品,判断商品的状态
// 筛选所有的商品,判断商品的状态 此处不能筛选del_flag=0因为页面删除时会将del_flag置为2
List<StoreProductColor> curProdColorList = this.storeProdColorMapper.selectList(new LambdaQueryWrapper<StoreProductColor>()
.in(StoreProductColor::getStoreProdId, storeProdIdList).eq(StoreProductColor::getDelFlag, Constants.UNDELETED)
.eq(StoreProductColor::getStoreId, prodStatusDTO.getStoreId()));
.in(StoreProductColor::getStoreProdId, storeProdIdList).eq(StoreProductColor::getStoreId, prodStatusDTO.getStoreId()));
Map<Long, List<StoreProductColor>> prodColorMap = curProdColorList.stream().collect(Collectors.groupingBy(StoreProductColor::getStoreProdId));
List<StoreProduct> updateProdList = new ArrayList<>();
prodColorMap.forEach((storeProdId, prodColorList) -> {