会员列表报错修复
This commit is contained in:
parent
547143920b
commit
548f582d49
|
|
@ -494,6 +494,9 @@ public class TbMemberConfigServiceImpl extends ServiceImpl<TbMemberConfigMapper,
|
||||||
@Override
|
@Override
|
||||||
public List<MemberListVO> getMemberList(Long userId) {
|
public List<MemberListVO> getMemberList(Long userId) {
|
||||||
List<ShopUser> shopUsers = shopUserService.list(new QueryWrapper().eq(ShopUser::getUserId, 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());
|
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));
|
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<>();
|
ArrayList<MemberListVO> memberListVOS = new ArrayList<>();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue