提交 77c1e6fd authored 作者: Whispa's avatar Whispa

commit

上级 4102d14f
......@@ -16,7 +16,7 @@ public interface TbCfStationItemRepository extends PagingAndSortingRepository<Tb
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 )")
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 (SELECT l.item FROM itemLabel l WHERE l.description IN :tags GROUP BY l.id) pre join #{#entityName} a ON a.item = l.item WHERE a in (pre.item) group by pre.item having count(pre.item) > :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(l.item) FROM ItemLabel l WHERE a.item = l.item and l.description IN :tags) >= :num ")
Page<TbCfStationItem> getItemsByImageSearch(@Param("tags") String[] tags,@Param("num") Long num, Pageable pageable);
Page<TbCfStationItem> findAllByItemNameContainingOrItemTagsContaining(String itemName, String itemTags, Pageable pageable);
Page<TbCfStationItem> findByItemCategory(String itemName, Pageable pageable);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论