diff options
Diffstat (limited to 'juick-server-jdbc/src/main')
-rw-r--r-- | juick-server-jdbc/src/main/java/com/juick/service/PMQueriesServiceImpl.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/juick-server-jdbc/src/main/java/com/juick/service/PMQueriesServiceImpl.java b/juick-server-jdbc/src/main/java/com/juick/service/PMQueriesServiceImpl.java index 9e04b064..6b13f7bc 100644 --- a/juick-server-jdbc/src/main/java/com/juick/service/PMQueriesServiceImpl.java +++ b/juick-server-jdbc/src/main/java/com/juick/service/PMQueriesServiceImpl.java @@ -58,7 +58,7 @@ public class PMQueriesServiceImpl extends BaseJdbcService implements PMQueriesSe @Override public boolean addPMinRoster(final int uid, final String jid) { return getJdbcTemplate().update( - "INSERT INTO pm_inroster(user_id, jid) VALUES (?, ?)", uid, jid) > 0; + "INSERT INTO pm_inroster(user_id, jid) VALUES (?, ?) ON DUPLICATE KEY UPDATE user_id=user_id", uid, jid) > 0; } @Transactional |