|
@@ -19,11 +19,11 @@ public interface NewsRepository extends JpaSpecificationExecutor<News>, JpaRepos
|
|
|
* @param taskName
|
|
|
* @return
|
|
|
*/
|
|
|
- @Query(value = "select c.id from\n" +
|
|
|
- "jpress_content c \n" +
|
|
|
- "join jpress_mapping m on c.id = m.content_id \n" +
|
|
|
- "join jpress_taxonomy t on m.taxonomy_id = t.id \n" +
|
|
|
- "where 1=1 and t.slug= :name ",nativeQuery = true)
|
|
|
+ @Query(value = " select c.id from\n" +
|
|
|
+ " jpress_content c \n" +
|
|
|
+ " join jpress_mapping m on c.id = m.content_id \n" +
|
|
|
+ " join jpress_taxonomy t on m.taxonomy_id = t.id \n" +
|
|
|
+ " where 1=1 and t.slug = :name and c.status = 'normal'",nativeQuery = true)
|
|
|
@QueryHints({@QueryHint(name = "org.hibernate.cacheable", value ="true")})
|
|
|
List<Long> findNewsIdByTaxonomySlug (@Param("name")String taskName);
|
|
|
|