关联关系状态
This commit is contained in:
@@ -183,7 +183,6 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
|
|||||||
record.setSkuList(skuList);
|
record.setSkuList(skuList);
|
||||||
record.setProdConsRelations(prodConsRelationMapper.selectListByQuery(query()
|
record.setProdConsRelations(prodConsRelationMapper.selectListByQuery(query()
|
||||||
.eq(ProdConsRelation::getProductId, record.getId())
|
.eq(ProdConsRelation::getProductId, record.getId())
|
||||||
.eq(ConsInfo::getStatus, SystemConstants.OneZero.ONE)
|
|
||||||
.eq(ProdConsRelation::getShopId, record.getShopId())));
|
.eq(ProdConsRelation::getShopId, record.getShopId())));
|
||||||
});
|
});
|
||||||
return records;
|
return records;
|
||||||
@@ -391,6 +390,7 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
|
|||||||
for (Long categoryId : categoryIds) {
|
for (Long categoryId : categoryIds) {
|
||||||
redisService.del(prefix + categoryId);
|
redisService.del(prefix + categoryId);
|
||||||
}
|
}
|
||||||
|
redisService.del(ADMIN_CLIENT_PRODUCT_LIST + "::" + shopId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -544,6 +544,12 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
|
|||||||
List<Long> list = skuList.stream().map(ProdSkuDTO::getId).filter(Objects::nonNull).distinct().toList();
|
List<Long> list = skuList.stream().map(ProdSkuDTO::getId).filter(Objects::nonNull).distinct().toList();
|
||||||
skuIdList.removeAll(list);
|
skuIdList.removeAll(list);
|
||||||
}
|
}
|
||||||
|
// 清除商品分类列表缓存
|
||||||
|
if (!old.getCategoryId().equals(dto.getCategoryId())) {
|
||||||
|
clearProductCache(old.getCategoryId(), entity.getCategoryId());
|
||||||
|
} else {
|
||||||
|
clearProductCache(old.getCategoryId());
|
||||||
|
}
|
||||||
if (CollUtil.isNotEmpty(skuIdList)) {
|
if (CollUtil.isNotEmpty(skuIdList)) {
|
||||||
// 逻辑删除无用的SKU数据
|
// 逻辑删除无用的SKU数据
|
||||||
UpdateChain.of(ProdSku.class)
|
UpdateChain.of(ProdSku.class)
|
||||||
|
|||||||
Reference in New Issue
Block a user