|
|
@@ -32,7 +32,7 @@ public interface AssetRepo extends JpaRepository<Asset, Long>, JpaSpecificationE
|
|
|
|
|
|
List<Asset> findAllByCollectionIdInAndStatusIn(List<Long> collectionId, Iterable<AssetStatus> statuses);
|
|
|
|
|
|
- List<Asset> findAllByCollectionIdAndStatusInAndUserId(Long collectionId, Iterable<AssetStatus> statuses,Long userId);
|
|
|
+ List<Asset> findAllByCollectionIdAndStatusInAndUserId(Long collectionId, Iterable<AssetStatus> statuses, Long userId);
|
|
|
|
|
|
List<Asset> findByCreatedAtBefore(LocalDateTime localDateTime);
|
|
|
|
|
|
@@ -168,6 +168,10 @@ public interface AssetRepo extends JpaRepository<Asset, Long>, JpaSpecificationE
|
|
|
@Query(nativeQuery = true, value = "select count(a.id) countNum,a.user_Id userId,a.owner_avatar avatar,a.`owner` nickname from asset a inner join `user` u on u.id = a.user_id where a.status = 'NORMAL' and a.type = 'DOMAIN' GROUP BY a.user_id ORDER BY count(a.id) desc limit 60")
|
|
|
List<Map<String, Object>> domainTop20();
|
|
|
|
|
|
+ @Query(nativeQuery = true, value = "select count(a.id) countNum,sum(price) amount,a.user_Id userId,u.avatar avatar,u.nickname nickname from order_info a inner join `user` u on u.id = a.user_id where a.status = 'FINISH' and a.type = 'DOMAIN'\n" +
|
|
|
+ " and a.created_at <= ?2 and a.created_at >= ?1 GROUP BY a.user_id ORDER BY sum(price) desc limit 60")
|
|
|
+ List<Map<String, Object>> domainBuyerTop60(LocalDateTime start, LocalDateTime end);
|
|
|
+
|
|
|
@Query(nativeQuery = true, value = "update asset a set a.hold_days = null,a.old_hold_days = null where a.name like ?1")
|
|
|
@Modifying
|
|
|
@Transactional
|