阿里云消息通知优化
This commit is contained in:
parent
1e32df45b0
commit
c649ed7a35
|
|
@ -46,25 +46,25 @@ public class UserDaoImpl extends HibernateBaseDao<User, Integer> implements User
|
||||||
public List<Integer> getUserIds(String pushType,Integer firstResult, int maxResults) {
|
public List<Integer> getUserIds(String pushType,Integer firstResult, int maxResults) {
|
||||||
//商家用户
|
//商家用户
|
||||||
if(PushTypeEnum.all_shops_push.getKey().equals(pushType)){
|
if(PushTypeEnum.all_shops_push.getKey().equals(pushType)){
|
||||||
String sql = "select user.user_id from tbl_user user,tbl_aliyun_device_info device where user_type=? and user.user_id = device.user_id and is_register_netease=? limit ?,?";
|
String sql = "select DISTINCT user.user_id from tbl_user user,tbl_aliyun_device_info device where user_type=? and user.user_id = device.user_id and is_register_netease=? limit ?,?";
|
||||||
List<Integer> list = this.getSession().createSQLQuery(sql).setString(0, UserTypeEnum.userType1.getKey()).setString(1, BooleanEnum.YES.getKey()).setInteger(2, firstResult).setInteger(3,maxResults).list();
|
List<Integer> list = this.getSession().createSQLQuery(sql).setString(0, UserTypeEnum.userType1.getKey()).setString(1, BooleanEnum.YES.getKey()).setInteger(2, firstResult).setInteger(3,maxResults).list();
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
//安卓用户
|
//安卓用户
|
||||||
else if(PushTypeEnum.all_android_push.getKey().equals(pushType)){
|
else if(PushTypeEnum.all_android_push.getKey().equals(pushType)){
|
||||||
String sql = "select user.user_id from tbl_user user,tbl_aliyun_device_info device where login_type=? and user.user_id = device.user_id and is_register_netease=? limit ?,?";
|
String sql = "select DISTINCT user.user_id from tbl_user user,tbl_aliyun_device_info device where user.user_id = device.user_id and is_register_netease=? limit ?,?";
|
||||||
List<Integer> list = this.getSession().createSQLQuery(sql).setString(0, PhoneTypeEnum.android.getKey()).setString(1, BooleanEnum.YES.getKey()).setInteger(2, firstResult).setInteger(3,maxResults).list();
|
List<Integer> list = this.getSession().createSQLQuery(sql).setString(0, BooleanEnum.YES.getKey()).setInteger(1, firstResult).setInteger(2,maxResults).list();
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
//IOS用户
|
//IOS用户
|
||||||
else if(PushTypeEnum.all_ios_push.getKey().equals(pushType)){
|
else if(PushTypeEnum.all_ios_push.getKey().equals(pushType)){
|
||||||
String sql = "select user.user_id from tbl_user user,tbl_aliyun_device_info device where login_type=? and user.user_id = device.user_id and is_register_netease=? limit ?,?";
|
String sql = "select DISTINCT user.user_id from tbl_user user,tbl_aliyun_device_info device where user.user_id = device.user_id and is_register_netease=? limit ?,?";
|
||||||
List<Integer> list = this.getSession().createSQLQuery(sql).setString(0, PhoneTypeEnum.ios.getKey()).setString(1, BooleanEnum.YES.getKey()).setInteger(2, firstResult).setInteger(3,maxResults).list();
|
List<Integer> list = this.getSession().createSQLQuery(sql).setString(0, BooleanEnum.YES.getKey()).setInteger(1, firstResult).setInteger(2,maxResults).list();
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
//所有用户
|
//所有用户
|
||||||
else if(PushTypeEnum.all_push.getKey().equals(pushType)){
|
else if(PushTypeEnum.all_push.getKey().equals(pushType)){
|
||||||
String sql = "select user.user_id from tbl_user user,tbl_aliyun_device_info device where is_register_netease=? and user.user_id = device.user_id limit ?,?";
|
String sql = "select DISTINCT user.user_id from tbl_user user,tbl_aliyun_device_info device where is_register_netease=? and user.user_id = device.user_id limit ?,?";
|
||||||
List<Integer> list = this.getSession().createSQLQuery(sql).setString(0, BooleanEnum.YES.getKey()).setInteger(1, firstResult).setInteger(2,maxResults).list();
|
List<Integer> list = this.getSession().createSQLQuery(sql).setString(0, BooleanEnum.YES.getKey()).setInteger(1, firstResult).setInteger(2,maxResults).list();
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
broker_url=tcp://localhost:61616
|
broker_url=tcp://localhost:61616
|
||||||
|
#broker_url=tcp://test.ifish7.com:61616
|
||||||
username=admin
|
username=admin
|
||||||
#password=admin
|
#password=admin
|
||||||
password=adminifish7
|
password=adminifish7
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue