From 528bc9cfd98489d59ed2cf4764c84c1805215c54 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 16 Dec 2022 23:03:37 +0300 Subject: Make tag query SQL-compatible --- src/main/java/com/juick/service/TagServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java/com') diff --git a/src/main/java/com/juick/service/TagServiceImpl.java b/src/main/java/com/juick/service/TagServiceImpl.java index 1ae98c0f..07dffc23 100644 --- a/src/main/java/com/juick/service/TagServiceImpl.java +++ b/src/main/java/com/juick/service/TagServiceImpl.java @@ -106,10 +106,10 @@ public class TagServiceImpl extends BaseJdbcService implements TagService { @Transactional(readOnly = true) @Override public boolean getTagNoIndex(final int tagId) { - List list = getJdbcTemplate().queryForList( - "SELECT noindex FROM tags WHERE tag_id=?", Integer.class, tagId); + List list = getJdbcTemplate().queryForList( + "SELECT noindex FROM tags WHERE tag_id=?", Boolean.class, tagId); - return !list.isEmpty() && list.get(0) == 1; + return !list.isEmpty() && list.get(0); } @Transactional -- cgit v1.2.3