This commit is contained in:
shuo.wang
2025-04-21 21:39:51 +08:00
parent 90570d4121
commit 76e9d7c149

View File

@@ -167,17 +167,20 @@ public class ShopServiceImpl implements ShopService {
*/
@Override
public List<MiniShopPageVO> getShopList(Long lineId, String userId) {
log.info("_________________________1");
List<Long> authRegions = new ArrayList<>();
if (StringUtils.isNotBlank(userId) && !sysRoleService.checkIsAdmin(userId)) {
for (String region : userAuthMappingService.getAuthRegionIdAndSubRegionIdByUserId(userId)) {
authRegions.add(Long.valueOf(region));
}
}
log.info("_________________________2");
List<ShopInfoDO> shopList = shopInfoDAO.getShopListByRegion(lineId, authRegions, userId);
List<Long> shopIds = shopList.stream().map(ShopInfoDO::getId).collect(Collectors.toList());
List<Long> wantShopAreaIds = shopList.stream().map(ShopInfoDO::getWantShopAreaId).collect(Collectors.toList());
Map<Long, String> wantRegionMap = hyOpenAreaInfoDAO.selectNameMapByIds(wantShopAreaIds);
List<ScheduleDTO> scheduleList = shopStageInfoDAO.getScheduleList(shopIds);
log.info("_________________________3");
Map<Long, ScheduleDTO> scheduleMap = scheduleList.stream().collect(Collectors.toMap(ScheduleDTO::getShopId, x -> x));
List<ShopStageInfoDO> subStageList = shopStageInfoDAO.getSubStageList(shopIds, ShopSubStageEnum.SHOP_STAGE_8.getShopSubStage());
Map<Long, ShopStageInfoDO> stageMap = subStageList.stream().collect(Collectors.toMap(ShopStageInfoDO::getShopId, Function.identity()));