From 3feb0307d778c6ceb6b3805587f539fe96a3eb34 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 29 Nov 2018 14:48:49 +0300 Subject: fix likes deletion --- src/main/java/com/juick/service/MessagesServiceImpl.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/juick/service/MessagesServiceImpl.java b/src/main/java/com/juick/service/MessagesServiceImpl.java index 7951eb42..f6723260 100644 --- a/src/main/java/com/juick/service/MessagesServiceImpl.java +++ b/src/main/java/com/juick/service/MessagesServiceImpl.java @@ -279,10 +279,9 @@ public class MessagesServiceImpl extends BaseJdbcService implements MessagesServ SqlParameterSource sqlParameterSource = new MapSqlParameterSource() .addValue("uid", vuid) .addValue("uri", userUri) - .addValue("like_id", reaction) .addValue("mid", mid); boolean wasDeleted = getNamedParameterJdbcTemplate() - .update("DELETE FROM favorites WHERE user_id=:uid AND message_id=:mid AND like_id=:like_id AND user_uri=:uri", sqlParameterSource) > 0; + .update("DELETE FROM favorites WHERE user_id=:uid AND message_id=:mid AND user_uri=:uri", sqlParameterSource) > 0; if (wasDeleted) { return RecommendStatus.Deleted; } else { -- cgit v1.2.3