aboutsummaryrefslogtreecommitdiff
path: root/juick-server-jdbc/src/main/java/com/juick/service
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server-jdbc/src/main/java/com/juick/service')
-rw-r--r--juick-server-jdbc/src/main/java/com/juick/service/MessagesServiceImpl.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/juick-server-jdbc/src/main/java/com/juick/service/MessagesServiceImpl.java b/juick-server-jdbc/src/main/java/com/juick/service/MessagesServiceImpl.java
index 362a918c3..7816ef67e 100644
--- a/juick-server-jdbc/src/main/java/com/juick/service/MessagesServiceImpl.java
+++ b/juick-server-jdbc/src/main/java/com/juick/service/MessagesServiceImpl.java
@@ -240,6 +240,16 @@ public class MessagesServiceImpl extends BaseJdbcService implements MessagesServ
}
@Override
+ public List<Reaction> listReactions() {
+ return jdbcTemplate.query("SELECT like_id, description FROM reactions", (RowMapper<Reaction>) (rs, rowNum) -> {
+ Reaction reaction = new Reaction(rs.getInt("like_id"));
+ reaction.setDescription(rs.getString("description"));
+ return reaction;
+ });
+ }
+
+ @Transactional
+ @Override
public RecommendStatus likeMessage(int mid, int vuid, int reactionId) throws IllegalArgumentException {
if(reactionId == Reaction.LIKE) throw new IllegalArgumentException("this reaction type does not support here");