diff options
Diffstat (limited to 'juick-server-jdbc/src/main/java/com/juick')
-rw-r--r-- | juick-server-jdbc/src/main/java/com/juick/service/TelegramServiceImpl.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/juick-server-jdbc/src/main/java/com/juick/service/TelegramServiceImpl.java b/juick-server-jdbc/src/main/java/com/juick/service/TelegramServiceImpl.java index 325396e4d..8e941531a 100644 --- a/juick-server-jdbc/src/main/java/com/juick/service/TelegramServiceImpl.java +++ b/juick-server-jdbc/src/main/java/com/juick/service/TelegramServiceImpl.java @@ -46,6 +46,12 @@ public class TelegramServiceImpl extends BaseJdbcService implements TelegramServ return getJdbcTemplate().update("INSERT IGNORE INTO telegram_chats(chat_id) VALUES(?)", id) > 0; } + @Transactional + @Override + public boolean deleteChat(Long id) { + return getJdbcTemplate().update("DELETE FROM telegram_chats WHERE chat_id=?", id) > 0; + } + @Transactional(readOnly = true) @Override public List<Long> getChats() { |