diff options
author | Vitaly Takmazov | 2019-12-16 09:32:53 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2019-12-16 09:32:53 +0300 |
commit | 6c567bdd883224ced77fc15e47fda264afce3cdd (patch) | |
tree | 4bba4f8556d6b7b92712002bec17b274fc4e3236 | |
parent | 9a33c17b9e1c5f80e1c3d8b696d9970fce675765 (diff) |
Remove unused code
-rw-r--r-- | src/main/java/com/juick/service/UserService.java | 6 | ||||
-rw-r--r-- | src/main/java/com/juick/service/UserServiceImpl.java | 29 |
2 files changed, 0 insertions, 35 deletions
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 @@ -655,35 +655,6 @@ public class UserServiceImpl extends BaseJdbcService implements UserService { @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) { return getNamedParameterJdbcTemplate().update("DELETE FROM jids " + "WHERE (SELECT COUNT(*) cnt FROM (select user_id, jid FROM jids j) c WHERE user_id=:uid) > 1 " + |