diff options
author | Vitaly Takmazov | 2023-01-28 01:46:13 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2023-01-28 19:07:28 +0300 |
commit | 556d10c400add4b69d8832a40fb704fda4333080 (patch) | |
tree | 4b19255566ada761ddd23baa66c695906329f1a8 /src/main/java/com/juick/service/UserServiceImpl.java | |
parent | 906bf8ef21463f99820764807b656cb617b0aaa2 (diff) |
Improve SQL server compatibility
Diffstat (limited to 'src/main/java/com/juick/service/UserServiceImpl.java')
-rw-r--r-- | src/main/java/com/juick/service/UserServiceImpl.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/com/juick/service/UserServiceImpl.java b/src/main/java/com/juick/service/UserServiceImpl.java index 5ae0b2d1..ca63c322 100644 --- a/src/main/java/com/juick/service/UserServiceImpl.java +++ b/src/main/java/com/juick/service/UserServiceImpl.java @@ -444,7 +444,7 @@ public class UserServiceImpl extends BaseJdbcService implements UserService { "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 ?", + "ON subscr_users.user_id=users.id ORDER BY cnt OFFSET 0 ROWS FETCH NEXT ? ROWS ONLY", (rs, num) -> { User u = new User(); u.setUid(rs.getInt(1)); @@ -664,7 +664,7 @@ public class UserServiceImpl extends BaseJdbcService implements UserService { @Override public ApplicationStatus getFbCrossPostStatus(final int uid) { List<ApplicationStatus> list = getJdbcTemplate().query( - "SELECT 1, crosspost FROM facebook WHERE user_id = ? LIMIT 1", + "SELECT 1, crosspost FROM facebook WHERE user_id = ?", (rs, num) -> { ApplicationStatus status = new ApplicationStatus(); |