fix: 导出公司概览时按companyId过滤店铺列表,防止数据串公司

This commit is contained in:
小蟑螂
2026-04-20 01:36:53 +08:00
parent 2b23e46d87
commit 2c422bed26
@@ -81,7 +81,9 @@ public class ExportServiceImpl implements ExportService {
Long companyId = currentUserContext.getCurrentCompanyId();
LocalDate[] dateRange = parseDateRange(dto.getDateRange());
List<ShopPO> shops = shopService.list();
List<ShopPO> shops = shopService.list(
new LambdaQueryWrapper<ShopPO>().eq(ShopPO::getCompanyId, companyId)
);
if (dto.getShopIds() != null && !dto.getShopIds().isEmpty()) {
shops = shops.stream()
.filter(s -> dto.getShopIds().contains(s.getId()))