aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/service/UserServiceImpl.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2020-03-07 13:20:45 +0300
committerGravatar Vitaly Takmazov2020-03-07 13:20:45 +0300
commitc9d67837cbcaae84a03b7bd14e508ca62880f87f (patch)
tree0f66e38f5b6aa48c66fae7d10c0b8b5ad6f7e7e2 /src/main/java/com/juick/service/UserServiceImpl.java
parentad50d1090b303d3a71c354dd2922a982fda6a289 (diff)
Reorganize project layout
Diffstat (limited to 'src/main/java/com/juick/service/UserServiceImpl.java')
-rw-r--r--src/main/java/com/juick/service/UserServiceImpl.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/main/java/com/juick/service/UserServiceImpl.java b/src/main/java/com/juick/service/UserServiceImpl.java
index 9f01b4db..084f3a00 100644
--- a/src/main/java/com/juick/service/UserServiceImpl.java
+++ b/src/main/java/com/juick/service/UserServiceImpl.java
@@ -17,8 +17,8 @@
package com.juick.service;
-import com.juick.Message;
-import com.juick.User;
+import com.juick.model.Message;
+import com.juick.model.User;
import com.juick.model.AnonymousUser;
import com.juick.model.AuthResponse;
import org.apache.commons.collections4.CollectionUtils;
@@ -284,7 +284,7 @@ public class UserServiceImpl extends BaseJdbcService implements UserService {
@Transactional(readOnly = true)
@Override
- public com.juick.User getUserByHash(final String hash) {
+ public User getUserByHash(final String hash) {
if (StringUtils.isNotBlank(hash)) {
List<User> list = getJdbcTemplate().query(
"SELECT DISTINCT logins.user_id, u.nick, u.passw, u.banned, u.last_seen," +
@@ -504,14 +504,14 @@ public class UserServiceImpl extends BaseJdbcService implements UserService {
@Transactional(readOnly = true)
@Override
- public List<com.juick.User> getUserReadLeastPopular(final int uid, final int cnt) {
+ public List<User> getUserReadLeastPopular(final int uid, final int cnt) {
return getJdbcTemplate().query(
"SELECT users.id,users.nick FROM (subscr_users " +
"INNER JOIN users_subscr ON (subscr_users.suser_id=? " +
"AND subscr_users.user_id=users_subscr.user_id)) INNER JOIN users " +
"ON subscr_users.user_id=users.id ORDER BY cnt LIMIT ?",
(rs, num) -> {
- com.juick.User u = new com.juick.User();
+ User u = new User();
u.setUid(rs.getInt(1));
u.setName(rs.getString(2));
return u;
@@ -528,7 +528,7 @@ public class UserServiceImpl extends BaseJdbcService implements UserService {
"INNER JOIN users ON subscr_users.suser_id=users.id " +
"WHERE subscr_users.user_id=? ORDER BY users.nick",
(rs, num) -> {
- com.juick.User u = new com.juick.User();
+ User u = new User();
u.setUid(rs.getInt(1));
u.setName(rs.getString(2));
return u;
@@ -545,7 +545,7 @@ public class UserServiceImpl extends BaseJdbcService implements UserService {
"WHERE subscr_users.suser_id=? AND users.id!=? " +
"ORDER BY users.nick",
(rs, num) -> {
- com.juick.User u = new com.juick.User();
+ User u = new User();
u.setUid(rs.getInt(1));
u.setName(rs.getString(2));
return u;
@@ -566,11 +566,11 @@ public class UserServiceImpl extends BaseJdbcService implements UserService {
@Transactional(readOnly = true)
@Override
- public List<com.juick.User> getUserBLUsers(final int uid) {
+ public List<User> getUserBLUsers(final int uid) {
return getJdbcTemplate().query("SELECT users.id,users.nick FROM users INNER JOIN bl_users " +
"ON(bl_users.bl_user_id=users.id) WHERE bl_users.user_id=? ORDER BY users.nick",
(rs, num) -> {
- com.juick.User u = new com.juick.User();
+ User u = new User();
u.setUid(rs.getInt(1));
u.setName(rs.getString(2));
return u;