diff options
author | 2018-01-17 13:43:53 +0300 | |
---|---|---|
committer | 2018-01-17 13:43:53 +0300 | |
commit | f641853214daace2a73503f3a78e1f9ba29fd386 (patch) | |
tree | 0eeeab99a0512d98198289714fa06edf9e5cef9a /juick-server-jdbc/src | |
parent | 62df283157ff32dded77e833fbd0f4e3007acbbe (diff) |
api: delete telegram id when got 403
Diffstat (limited to 'juick-server-jdbc/src')
-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 325396e4..8e941531 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() { |