From a3bb23ba498de4a71406e3b050a436619554271b Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 20 Dec 2022 01:23:36 +0300 Subject: Fix Twitter account linkage --- src/main/java/com/juick/service/UserServiceImpl.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/main/java/com/juick/service/UserServiceImpl.java b/src/main/java/com/juick/service/UserServiceImpl.java index 4b07d882..b9301d06 100644 --- a/src/main/java/com/juick/service/UserServiceImpl.java +++ b/src/main/java/com/juick/service/UserServiceImpl.java @@ -578,9 +578,8 @@ public class UserServiceImpl extends BaseJdbcService implements UserService { public boolean linkTwitterAccount( final User user, final String accessToken, final String accessTokenSecret, final String screenName) { return getJdbcTemplate().update("INSERT INTO twitter(user_id,access_token,access_token_secret,uname) " + - "VALUES (?,?,?,?)" + - " ON DUPLICATE KEY UPDATE access_token=?,access_token_secret=?,uname=?", - user.getUid(), accessToken, accessTokenSecret, screenName, accessToken, accessTokenSecret, screenName) > 0; + "VALUES (?,?,?,?)", + user.getUid(), accessToken, accessTokenSecret, screenName) > 0; } @Transactional(readOnly = true) -- cgit v1.2.3