|
@@ -51,4 +51,36 @@ public interface UserRepo extends JpaRepository<User, Long>, JpaSpecificationExe
|
|
|
@Query(value = "update user set followers = (select count(*) from follow " +
|
|
@Query(value = "update user set followers = (select count(*) from follow " +
|
|
|
"where follow.follow_user_id = ?1) where user.id = ?1", nativeQuery = true)
|
|
"where follow.follow_user_id = ?1) where user.id = ?1", nativeQuery = true)
|
|
|
void updateFollowers(Long userId);
|
|
void updateFollowers(Long userId);
|
|
|
|
|
+
|
|
|
|
|
+ @Transactional
|
|
|
|
|
+ @Modifying
|
|
|
|
|
+ @Query(value = "update collection_info join user on collection_info.minter_id = user.id " +
|
|
|
|
|
+ "set collection_info.minter = user.nickname, " +
|
|
|
|
|
+ " collection_info.minter_avatar = user.avatar " +
|
|
|
|
|
+ "where user.id = ?1", nativeQuery = true)
|
|
|
|
|
+ void updateMinterForCollection(Long userId);
|
|
|
|
|
+
|
|
|
|
|
+ @Transactional
|
|
|
|
|
+ @Modifying
|
|
|
|
|
+ @Query(value = "update collection_info join user on collection_info.owner_id = user.id " +
|
|
|
|
|
+ "set collection_info.owner = user.nickname, " +
|
|
|
|
|
+ " collection_info.owner_avatar = user.avatar " +
|
|
|
|
|
+ "where user.id = ?1", nativeQuery = true)
|
|
|
|
|
+ void updateOwnerForCollection(Long userId);
|
|
|
|
|
+
|
|
|
|
|
+ @Transactional
|
|
|
|
|
+ @Modifying
|
|
|
|
|
+ @Query(value = "update order_info join user on order_info.minter_id = user.id " +
|
|
|
|
|
+ "set order_info.minter = user.nickname, " +
|
|
|
|
|
+ " order_info.minter_avatar = user.avatar " +
|
|
|
|
|
+ "where user.id = ?1", nativeQuery = true)
|
|
|
|
|
+ void updateMinterForOrder(Long userId);
|
|
|
|
|
+
|
|
|
|
|
+ @Transactional
|
|
|
|
|
+ @Modifying
|
|
|
|
|
+ @Query(value = "update asset join user on asset.minter_id = user.id " +
|
|
|
|
|
+ "set asset.minter = user.nickname, " +
|
|
|
|
|
+ " asset.minter_avatar = user.avatar " +
|
|
|
|
|
+ "where user.id = ?1", nativeQuery = true)
|
|
|
|
|
+ void updateMinterForAsset(Long userId);
|
|
|
}
|
|
}
|