xiongzhu %!s(int64=4) %!d(string=hai) anos
pai
achega
f64f4fb48e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/main/java/com/izouma/nineth/repo/CollectionRepo.java

+ 1 - 1
src/main/java/com/izouma/nineth/repo/CollectionRepo.java

@@ -44,7 +44,7 @@ public interface CollectionRepo extends JpaRepository<Collection, Long>, JpaSpec
     Collection save(@Nonnull Collection collection);
     Collection save(@Nonnull Collection collection);
 
 
     @Query("select c from Collection c join Recommend r on c.id = r.collectionId " +
     @Query("select c from Collection c join Recommend r on c.id = r.collectionId " +
-            "where c.del = false and c.onShelf = true order by r.sort desc")
+            "where c.del = false and c.onShelf = true and r.type = ?1 order by r.sort desc")
     @Cacheable("recommend")
     @Cacheable("recommend")
     List<Collection> recommend(String type);
     List<Collection> recommend(String type);
 }
 }