From 6c567bdd883224ced77fc15e47fda264afce3cdd Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 16 Dec 2019 09:32:53 +0300 Subject: Remove unused code --- src/main/java/com/juick/service/UserService.java | 6 ----- .../java/com/juick/service/UserServiceImpl.java | 29 ---------------------- 2 files changed, 35 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/juick/service/UserService.java b/src/main/java/com/juick/service/UserService.java index 92025b26..cc834173 100644 --- a/src/main/java/com/juick/service/UserService.java +++ b/src/main/java/com/juick/service/UserService.java @@ -119,12 +119,6 @@ public interface UserService { String getEmailHash(User user); - int deleteLoginForUser(String name); - - int setLoginForUser(int uid, String loginHash); - - void logout(int uid); - boolean deleteJID(int uid, String jid); boolean unauthJID(int uid, String jid); diff --git a/src/main/java/com/juick/service/UserServiceImpl.java b/src/main/java/com/juick/service/UserServiceImpl.java index 1ea15107..dc35f361 100644 --- a/src/main/java/com/juick/service/UserServiceImpl.java +++ b/src/main/java/com/juick/service/UserServiceImpl.java @@ -653,35 +653,6 @@ public class UserServiceImpl extends BaseJdbcService implements UserService { return list.isEmpty() ? StringUtils.EMPTY : list.get(0) + "@mail.juick.com"; } - @Transactional - @Override - public int deleteLoginForUser(final String name) { - if (StringUtils.isBlank(name)) - return 0; - - return getJdbcTemplate().update( - "delete from logins where user_id in (select id from users where nick = ?)", name); - } - - @Transactional - @Override - public int setLoginForUser(final int uid, final String loginHash) { - if (StringUtils.isEmpty(loginHash)) - return 0; - - return getNamedParameterJdbcTemplate().update( - "INSERT INTO logins (user_id, hash) VALUES(:uid, :hash) ON DUPLICATE KEY UPDATE hash = :hash", - new MapSqlParameterSource() - .addValue("hash", loginHash) - .addValue("uid", uid)); - } - - @Transactional - @Override - public void logout(int uid) { - getJdbcTemplate().update("DELETE FROM logins WHERE user_id=?", uid); - } - @Transactional @Override public boolean deleteJID(int uid, String jid) { -- cgit v1.2.3