提交 3e4cdedb authored 作者: Whispa's avatar Whispa

commit

上级 3114ab9a
...@@ -16,7 +16,7 @@ public interface TbCfStationItemRepository extends PagingAndSortingRepository<Tb ...@@ -16,7 +16,7 @@ public interface TbCfStationItemRepository extends PagingAndSortingRepository<Tb
Page<TbCfStationItem> findAllByItemLabelContaining(String label, Pageable pageable); Page<TbCfStationItem> findAllByItemLabelContaining(String label, Pageable pageable);
@Query(value = "select a from #{#entityName} a WHERE a.itemId <> :itemId and (a.itemDescritionId = :descriptionId or a.itemCategorytwo = :categoryTwo or a.itemCategory = :category )") @Query(value = "select a from #{#entityName} a WHERE a.itemId <> :itemId and (a.itemDescritionId = :descriptionId or a.itemCategorytwo = :categoryTwo or a.itemCategory = :category )")
Page<TbCfStationItem> getRecommendItems(@Param("itemId") String itemId,@Param("descriptionId") String descriptionId,@Param("categoryTwo") String categoryTwo,@Param("category") String category, Pageable pageable); Page<TbCfStationItem> getRecommendItems(@Param("itemId") String itemId,@Param("descriptionId") String descriptionId,@Param("categoryTwo") String categoryTwo,@Param("category") String category, Pageable pageable);
@Query(value = "select a from #{#entityName} a WHERE a in (SELECT l.item FROM ItemLabel l WHERE l.description IN :tags) and (SELECT count(l.item) FROM ItemLabel l WHERE l.item = a and l.description IN :tags) >= :num ") @Query(value = "select a from #{#entityName} a WHERE a in (SELECT l.item FROM ItemLabel l WHERE l.description IN :tags) and (SELECT count(x.item) FROM ItemLabel x WHERE x.item = a and x.description IN :tags) >= :num ")
Page<TbCfStationItem> getItemsByImageSearch(@Param("tags") String[] tags,@Param("num") Long num, Pageable pageable); Page<TbCfStationItem> getItemsByImageSearch(@Param("tags") String[] tags,@Param("num") Long num, Pageable pageable);
Page<TbCfStationItem> findAllByItemNameContainingOrItemTagsContaining(String itemName, String itemTags, Pageable pageable); Page<TbCfStationItem> findAllByItemNameContainingOrItemTagsContaining(String itemName, String itemTags, Pageable pageable);
Page<TbCfStationItem> findByItemCategory(String itemName, Pageable pageable); Page<TbCfStationItem> findByItemCategory(String itemName, Pageable pageable);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论