会员列表报错修复

This commit is contained in:
张松 2025-09-28 09:08:49 +08:00
parent 547143920b
commit 548f582d49
1 changed files with 3 additions and 0 deletions

View File

@ -494,6 +494,9 @@ public class TbMemberConfigServiceImpl extends ServiceImpl<TbMemberConfigMapper,
@Override
public List<MemberListVO> getMemberList(Long userId) {
List<ShopUser> shopUsers = shopUserService.list(new QueryWrapper().eq(ShopUser::getUserId, userId));
if (shopUsers.isEmpty()) {
return new ArrayList<>();
}
Set<Long> shopIdList = shopUsers.stream().map(ShopUser::getSourceShopId).collect(Collectors.toSet());
Map<Long, ShopInfo> shopInfoMap = shopInfoService.list(new QueryWrapper().in(ShopInfo::getId, shopIdList)).stream().collect(Collectors.toMap(ShopInfo::getId, item -> item));
ArrayList<MemberListVO> memberListVOS = new ArrayList<>();