aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/service/UserServiceImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src/main/java/com/juick/service/UserServiceImpl.java')
-rw-r--r--juick-server/src/main/java/com/juick/service/UserServiceImpl.java27
1 files changed, 0 insertions, 27 deletions
diff --git a/juick-server/src/main/java/com/juick/service/UserServiceImpl.java b/juick-server/src/main/java/com/juick/service/UserServiceImpl.java
index 050fc281..2de3dfc6 100644
--- a/juick-server/src/main/java/com/juick/service/UserServiceImpl.java
+++ b/juick-server/src/main/java/com/juick/service/UserServiceImpl.java
@@ -307,18 +307,6 @@ public class UserServiceImpl extends BaseJdbcService implements UserService {
return list.get(0);
}
- @Override
- public int getUIDByHttpAuth(String auth) {
- if (auth != null && auth.length() > 8 && auth.startsWith("Basic ")) {
- Base64.Decoder dec = Base64.getDecoder();
- String loginpassw[] = new String(dec.decode(auth.substring(6))).split(":", 2);
- if (loginpassw.length == 2 && loginpassw[0].length() > 1 && loginpassw[0].length() < 16 && loginpassw[0].matches("[a-zA-Z0-9\\-]+") && !loginpassw[1].isEmpty()) {
- return checkPassword(loginpassw[0], loginpassw[1]);
- }
- }
- return 0;
- }
-
@Transactional(readOnly = true)
@Override
public int checkPassword(final String username, final String password) {
@@ -499,13 +487,6 @@ public class UserServiceImpl extends BaseJdbcService implements UserService {
@Transactional(readOnly = true)
@Override
- public List<Integer> getUserRead(final int uid) {
- return getJdbcTemplate().queryForList(
- "SELECT user_id FROM subscr_users WHERE suser_id=?", Integer.class, uid);
- }
-
- @Transactional(readOnly = true)
- @Override
public List<com.juick.User> getUserReadLeastPopular(final int uid, final int cnt) {
return getJdbcTemplate().query(
"SELECT users.id,users.nick FROM (subscr_users " +
@@ -586,14 +567,6 @@ public class UserServiceImpl extends BaseJdbcService implements UserService {
@Transactional(readOnly = true)
@Override
- public int getStatsIRead(final int uid) {
- List<Integer> list = getJdbcTemplate().queryForList(
- "SELECT COUNT(*) FROM subscr_users WHERE suser_id = ?", Integer.class, uid);
- return list.isEmpty() ? 0 : list.get(0);
- }
-
- @Transactional(readOnly = true)
- @Override
public int getStatsMyReaders(final int uid) {
List<Integer> list = getJdbcTemplate().queryForList("SELECT COUNT(*) FROM subscr_users WHERE user_id = ?", Integer.class, uid);
return list.isEmpty() ? 0 : list.get(0);