From 48c9ea1dc8830c4baade9ae0c9f311e81e0890b3 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 7 Mar 2022 09:26:19 +0300 Subject: Fix readonly query --- src/main/java/com/juick/service/MessagesServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main') diff --git a/src/main/java/com/juick/service/MessagesServiceImpl.java b/src/main/java/com/juick/service/MessagesServiceImpl.java index b135f3c2..369c508e 100644 --- a/src/main/java/com/juick/service/MessagesServiceImpl.java +++ b/src/main/java/com/juick/service/MessagesServiceImpl.java @@ -349,7 +349,7 @@ public class MessagesServiceImpl extends BaseJdbcService implements MessagesServ @Override public void setReadOnly(final int mid, final boolean readonly) { - getJdbcTemplate().update("UPDATE messages SET readonly=?", readonly); + getJdbcTemplate().update("UPDATE messages SET readonly=? WHERE message_id=?", readonly, mid); } @Transactional(readOnly = true) -- cgit v1.2.3