licailing 3 лет назад
Родитель
Сommit
9abbb83ce8

+ 2 - 0
src/main/java/com/izouma/nineth/repo/UserRepo.java

@@ -178,6 +178,8 @@ public interface UserRepo extends JpaRepository<User, Long>, JpaSpecificationExe
 
     List<User> findAllByCollectionIdAndCollectionInvitor(Long collectionId, Long collectionInvitor);
 
+    List<User> findAllByCollectionIdAndCollectionInvitorAndSettleAccountIdIsNotNull(Long collectionId, Long collectionInvitor);
+
     int countAllByCollectionIdAndCollectionInvitorAndSettleAccountIdIsNotNull(Long collectionId, Long collectionInvitor);
 
     long countAllByDelFalse();

+ 2 - 2
src/main/java/com/izouma/nineth/web/UserController.java

@@ -297,8 +297,8 @@ public class UserController extends BaseController {
 
     @GetMapping("/collectionInvite")
     public List<User> collectionInvite(@RequestParam Long collectionId) {
-        return userRepo.findAllByCollectionIdAndCollectionInvitor(collectionId, SecurityUtils.getAuthenticatedUser()
-                .getId());
+        return userRepo.findAllByCollectionIdAndCollectionInvitorAndSettleAccountIdIsNotNull(collectionId,
+                SecurityUtils.getAuthenticatedUser().getId());
     }
 
     @PreAuthorize("hasAnyRole('ADMIN')")