aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/service
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-11-22 17:49:03 +0300
committerGravatar Vitaly Takmazov2016-11-22 17:49:03 +0300
commitaa3c1a06ed46f49b617e2956b6cf9a1b0d367fb0 (patch)
tree722163db0e9b060a5c4f7902fd422c0c2b13032e /juick-server/src/main/java/com/juick/service
parent8b267a3b630f5843623801f42eb90d0ad6a9d849 (diff)
add APNS feedback component
Diffstat (limited to 'juick-server/src/main/java/com/juick/service')
-rw-r--r--juick-server/src/main/java/com/juick/service/PushQueriesService.java2
-rw-r--r--juick-server/src/main/java/com/juick/service/PushQueriesServiceImpl.java5
2 files changed, 7 insertions, 0 deletions
diff --git a/juick-server/src/main/java/com/juick/service/PushQueriesService.java b/juick-server/src/main/java/com/juick/service/PushQueriesService.java
index 8e7ce543..fe956c3a 100644
--- a/juick-server/src/main/java/com/juick/service/PushQueriesService.java
+++ b/juick-server/src/main/java/com/juick/service/PushQueriesService.java
@@ -17,4 +17,6 @@ public interface PushQueriesService {
List<String> getAPNSToken(int uid);
List<String> getAPNSTokens(List<Integer> uids);
+
+ boolean deleteAPNSToken(String token);
}
diff --git a/juick-server/src/main/java/com/juick/service/PushQueriesServiceImpl.java b/juick-server/src/main/java/com/juick/service/PushQueriesServiceImpl.java
index 91861bd9..9bbadef6 100644
--- a/juick-server/src/main/java/com/juick/service/PushQueriesServiceImpl.java
+++ b/juick-server/src/main/java/com/juick/service/PushQueriesServiceImpl.java
@@ -61,6 +61,11 @@ public class PushQueriesServiceImpl extends BaseJdbcService implements PushQueri
}
@Override
+ public boolean deleteAPNSToken(String token) {
+ return getJdbcTemplate().update("DELETE FROM ios WHERE token=?", token) > 0;
+ }
+
+ @Override
public List<String> getAPNSTokens(final List<Integer> uids) {
return getJdbcTemplate().queryForList(
"SELECT token FROM ios INNER JOIN users " +