diff options
author | Vitaly Takmazov | 2016-12-01 13:56:53 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2016-12-01 13:56:53 +0300 |
commit | 3d7f60c1c0b48dad2f58bffe3352d1c5c1b93f00 (patch) | |
tree | ab311d5d6102b2c76c03b266fc1b794108cba0fc /juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java | |
parent | 92d6700919e87c81db4a42a4b286257f62566cbf (diff) |
juick-api: Tags controller from perl, refactoring
Diffstat (limited to 'juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java')
-rw-r--r-- | juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java b/juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java index 948e9137..9cf103a1 100644 --- a/juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java +++ b/juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java @@ -7,7 +7,6 @@ import com.juick.server.helpers.PrivacyOpts; import com.juick.service.search.SearchService; import com.juick.util.MessageUtils; import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.lang3.StringEscapeUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.dao.IncorrectResultSizeDataAccessException; import org.springframework.jdbc.core.ConnectionCallback; @@ -346,31 +345,6 @@ public class MessagesServiceImpl extends BaseJdbcService implements MessagesServ @Transactional(readOnly = true) @Override - public List<com.juick.Tag> getMessageTags(final int mid) { - return getJdbcTemplate().query( - "SELECT tags.tag_id,synonym_id,name,stat_messages FROM tags " + - "INNER JOIN messages_tags ON (messages_tags.message_id = ? AND messages_tags.tag_id = tags.tag_id)", - new Object[]{mid}, - (rs, num) -> { - com.juick.Tag t = new com.juick.Tag(StringEscapeUtils.unescapeHtml4(rs.getString(3))); - t.TID = rs.getInt(1); - t.SynonymID = rs.getInt(2); - t.UsageCnt = rs.getInt(4); - return t; - }); - } - - @Transactional(readOnly = true) - @Override - public List<Integer> getMessageTagsIDs(final int mid) { - return getJdbcTemplate().queryForList( - "SELECT tag_id FROM messages_tags WHERE message_id = ?", - new Object[]{mid}, - Integer.class); - } - - @Transactional(readOnly = true) - @Override public List<String> getMessageRecommendations(final int mid) { return getJdbcTemplate().queryForList( "SELECT users.nick FROM favorites INNER JOIN users " + |