|
|
@@ -48,19 +48,19 @@ public interface UserRepo extends JpaRepository<User, Long>, JpaSpecificationExe
|
|
|
"where f.followUserId = ?1 and u.del = false ")
|
|
|
List<User> userFollowers(Long userId);
|
|
|
|
|
|
- @CacheEvict(value = "user" ,key = "#userId")
|
|
|
@Transactional
|
|
|
@Modifying
|
|
|
@Query(value = "update user set follows = (select count(*) from follow " +
|
|
|
"where follow.user_id = ?1) where user.id = ?1", nativeQuery = true)
|
|
|
+ @CacheEvict(value = {"myUserInfo","user"} ,allEntries = true)
|
|
|
void updateFollows(Long userId);
|
|
|
|
|
|
|
|
|
- @CacheEvict(value = "user" ,key = "#userId")
|
|
|
@Transactional
|
|
|
@Modifying
|
|
|
@Query(value = "update user set followers = (select count(*) from follow " +
|
|
|
"where follow.follow_user_id = ?1) where user.id = ?1", nativeQuery = true)
|
|
|
+ @CacheEvict(value = {"myUserInfo","user"} ,allEntries = true)
|
|
|
void updateFollowers(Long userId);
|
|
|
|
|
|
@Transactional
|