diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/juick/service/UserServiceImpl.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/com/juick/service/UserServiceImpl.java b/src/main/java/com/juick/service/UserServiceImpl.java index b2941d59..4b07d882 100644 --- a/src/main/java/com/juick/service/UserServiceImpl.java +++ b/src/main/java/com/juick/service/UserServiceImpl.java @@ -687,7 +687,7 @@ public class UserServiceImpl extends BaseJdbcService implements UserService { @Override public Optional<ExternalToken> getTwitterToken(final int uid) { List<ExternalToken> list = getJdbcTemplate().query( - "SELECT uname, access_token, access_token_secret FROM twitter WHERE user_id = ? AND crosspost = 1", + "SELECT uname, access_token, access_token_secret FROM twitter WHERE user_id = ? AND crosspost = true", (rs, num) -> new ExternalToken(rs.getString(1), "twitter", rs.getString(2), rs.getString(3)), uid); @@ -736,7 +736,7 @@ public class UserServiceImpl extends BaseJdbcService implements UserService { @Override public Optional<Pair<String, String>> getFacebookTokens(final int uid) { List<Optional<Pair<String, String>>> list = getJdbcTemplate().query( - "SELECT fb_id, access_token FROM facebook WHERE user_id = ? AND access_token IS NOT NULL AND crosspost = 1", + "SELECT fb_id, access_token FROM facebook WHERE user_id = ? AND access_token IS NOT NULL AND crosspost = true", (rs, num) -> Optional.of(Pair.of(rs.getString(1), rs.getString(2))), uid); return list.isEmpty() ? @@ -765,13 +765,13 @@ public class UserServiceImpl extends BaseJdbcService implements UserService { @Transactional @Override public boolean enableFBCrosspost(Integer uid) { - return getJdbcTemplate().update("UPDATE facebook SET crosspost=1 WHERE user_id=?", uid) > 0; + return getJdbcTemplate().update("UPDATE facebook SET crosspost=true WHERE user_id=?", uid) > 0; } @Transactional @Override public void disableFBCrosspost(Integer uid) { - getJdbcTemplate().update("UPDATE facebook SET crosspost=0 WHERE user_id=?", uid); + getJdbcTemplate().update("UPDATE facebook SET crosspost=false WHERE user_id=?", uid); } @Transactional(readOnly = true) |