File tree Expand file tree Collapse file tree
sluv-api/src/main/java/com/sluv/api Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -491,9 +491,12 @@ public List<ItemSimpleDto> getCurationItem(Long userId) {
491491 @ Transactional (readOnly = true )
492492 public List <ItemSimpleDto > getHowAboutItem (Long userId ) {
493493 User user = userDomainService .findByIdOrNull (userId );
494- List <Long > blockUserIds = userBlockDomainService .getAllBlockedUser (userId ).stream ()
495- .map (userBlock -> userBlock .getBlockedUser ().getId ())
496- .toList ();
494+ List <Long > blockUserIds = new ArrayList <>();
495+ if (userId != null ) {
496+ blockUserIds = userBlockDomainService .getAllBlockedUser (userId ).stream ()
497+ .map (userBlock -> userBlock .getBlockedUser ().getId ())
498+ .toList ();
499+ }
497500
498501 List <Item > items = itemDomainService .getAllByItemStatus (blockUserIds , ACTIVE );
499502 Collections .shuffle (items , new Random ());
Original file line number Diff line number Diff line change 4040import org .springframework .stereotype .Service ;
4141import org .springframework .transaction .annotation .Transactional ;
4242
43+ import java .util .ArrayList ;
4344import java .util .List ;
4445import java .util .Objects ;
4546
@@ -218,9 +219,12 @@ public PaginationCountResponse<CommentSimpleResponse> getUserUploadComment(Long
218219 @ Transactional (readOnly = true )
219220 public List <UserSearchInfoDto > getHotSluver (Long userId , Long celebId ) {
220221 User user = userDomainService .findByIdOrNull (userId );
221- List <Long > blockUserIds = userBlockDomainService .getAllBlockedUser (userId ).stream ()
222- .map (userBlock -> userBlock .getBlockedUser ().getId ())
223- .toList ();
222+ List <Long > blockUserIds = new ArrayList <>();
223+ if (userId != null ) {
224+ blockUserIds = userBlockDomainService .getAllBlockedUser (userId ).stream ()
225+ .map (userBlock -> userBlock .getBlockedUser ().getId ())
226+ .toList ();
227+ }
224228
225229 List <User > userList = userDomainService .getHotSluver (celebId , blockUserIds );
226230
You can’t perform that action at this time.
0 commit comments