diff options
author | 2016-11-13 21:21:45 +0700 | |
---|---|---|
committer | 2016-11-13 21:21:45 +0700 | |
commit | 6ba7eb5fe1384ec87cdd0031d185a9b26512a016 (patch) | |
tree | 1448ba6c8dda4302e3ad847cb085d49b8b054867 /juick-core/src/main/java/com/juick/server/PushQueries.java | |
parent | b75258ee5ed84510579050b5dba1edb904a09dfa (diff) |
server core module
Diffstat (limited to 'juick-core/src/main/java/com/juick/server/PushQueries.java')
-rw-r--r-- | juick-core/src/main/java/com/juick/server/PushQueries.java | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/juick-core/src/main/java/com/juick/server/PushQueries.java b/juick-core/src/main/java/com/juick/server/PushQueries.java deleted file mode 100644 index 904b3c0d..00000000 --- a/juick-core/src/main/java/com/juick/server/PushQueries.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ -package com.juick.server; - -import org.springframework.jdbc.core.JdbcTemplate; -import org.springframework.util.StringUtils; - -import java.util.List; - -/** - * - * @author ugnich - */ -public class PushQueries { - - public static List<String> getAndroidRegID(JdbcTemplate sql, int uid) { - return sql.queryForList("SELECT regid FROM android WHERE user_id=?", String.class, uid); - } - - public static List<String> getAndroidTokens(JdbcTemplate sql, List<Integer> uids) { - return sql.queryForList("SELECT regid FROM android INNER JOIN users " + - "ON (users.id=android.user_id) WHERE users.id IN (" + StringUtils.collectionToCommaDelimitedString(uids) + ")", String.class); - } - - public static List<String> getWinPhoneURL(JdbcTemplate sql, int uid) { - return sql.queryForList("SELECT url FROM winphone WHERE user_id=?", String.class, uid); - } - - public static List<String> getWindowsTokens(JdbcTemplate sql, List<Integer> uids) { - return sql.queryForList("SELECT url FROM winphone INNER JOIN users " + - "ON (users.id=winphone.user_id) WHERE users.id IN (" + StringUtils.collectionToCommaDelimitedString(uids) + ")", String.class); - } - - public static List<String> getAPNSToken(JdbcTemplate sql, int uid) { - return sql.queryForList("SELECT token from ios WHERE user_id=?", String.class, uid); - } - - public static List<String> getAPNSTokens(JdbcTemplate sql, List<Integer> uids) { - return sql.queryForList("SELECT token FROM ios INNER JOIN users " + - "ON (users.id=ios.user_id) WHERE users.id IN (" + StringUtils.collectionToCommaDelimitedString(uids) + ")", String.class); - } -} |