|
|
@@ -4,6 +4,7 @@ import com.izouma.nineth.domain.Collection;
|
|
|
import com.izouma.nineth.dto.CollectionInfoDTO;
|
|
|
import com.izouma.nineth.dto.CollectionStockAndSale;
|
|
|
import com.izouma.nineth.dto.RecommendCollection;
|
|
|
+import com.izouma.nineth.enums.CollectionSource;
|
|
|
import org.springframework.cache.annotation.CacheEvict;
|
|
|
import org.springframework.cache.annotation.CachePut;
|
|
|
import org.springframework.cache.annotation.Cacheable;
|
|
|
@@ -18,6 +19,7 @@ import java.math.BigDecimal;
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.util.List;
|
|
|
import java.util.Optional;
|
|
|
+import java.util.Set;
|
|
|
|
|
|
public interface CollectionRepo extends JpaRepository<Collection, Long>, JpaSpecificationExecutor<Collection> {
|
|
|
@Query("update Collection t set t.del = true where t.id = ?1")
|
|
|
@@ -148,4 +150,7 @@ public interface CollectionRepo extends JpaRepository<Collection, Long>, JpaSpec
|
|
|
@Query("select c.vipQuota from Collection c where c.id = ?1")
|
|
|
Integer getVipQuota(Long id);
|
|
|
|
|
|
+ @Query("select c.assetId from Collection c where c.price >= ?1 and c.source = ?2 and c.startTime <= ?3 and c.salable = ?4")
|
|
|
+ Set<Long> findResaleCollectionPriceOver20K(BigDecimal price, CollectionSource source, LocalDateTime startTime, boolean salable);
|
|
|
+
|
|
|
}
|