diff options
Diffstat (limited to 'src/main/java/com/juick/service/SubscriptionServiceImpl.java')
-rw-r--r-- | src/main/java/com/juick/service/SubscriptionServiceImpl.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/com/juick/service/SubscriptionServiceImpl.java b/src/main/java/com/juick/service/SubscriptionServiceImpl.java index bf7d1045..fae1b824 100644 --- a/src/main/java/com/juick/service/SubscriptionServiceImpl.java +++ b/src/main/java/com/juick/service/SubscriptionServiceImpl.java @@ -175,7 +175,7 @@ public class SubscriptionServiceImpl extends BaseJdbcService implements Subscrip try { return getJdbcTemplate().update( - "INSERT INTO subscr_tags(tag_id,suser_id) VALUES (?,?)", toTag.TID, + "INSERT INTO subscr_tags(tag_id,suser_id) VALUES (?,?)", toTag.getId(), user.getUid()) == 1; } catch (DuplicateKeyException e) { return true; @@ -186,7 +186,7 @@ public class SubscriptionServiceImpl extends BaseJdbcService implements Subscrip @Override public boolean unSubscribeTag(final User user, final Tag toTag) { return getJdbcTemplate().update( - "DELETE FROM subscr_tags WHERE tag_id=? AND suser_id=?", toTag.TID, user.getUid()) > 0; + "DELETE FROM subscr_tags WHERE tag_id=? AND suser_id=?", toTag.getId(), user.getUid()) > 0; } @Transactional(readOnly = true) |