public class MysqlMessageHelper extends Object implements IMesssageHelper
Constructor and Description |
---|
MysqlMessageHelper() |
Modifier and Type | Method and Description |
---|---|
void |
addGroupUser(String userid,
String group_id)
添加群组成员
|
List<Group> |
getAllFriendUsers(String user_id,
Integer type)
获取好友分组所有成员信息
|
List<Group> |
getAllGroupUsers(String user_id,
Integer type)
获取群组所有成员信息(在线+离线)
|
ImBindListener |
getBindListener()
获取im群组、人员绑定监听器;
|
UserMessageData |
getFriendHistoryMessage(String userid,
String from_userid,
Double beginTime,
Double endTime,
Integer offset,
Integer count)
获取与指定用户历史消息;
|
UserMessageData |
getFriendsOfflineMessage(String userid)
获取与所有用户离线消息;
|
UserMessageData |
getFriendsOfflineMessage(String userid,
String from_userid)
获取与指定用户离线消息;
|
Group |
getFriendUsers(String user_id,
String friend_group_id,
Integer type)
获取好友分组所有成员信息
|
UserMessageData |
getGroupHistoryMessage(String userid,
String groupid,
Double beginTime,
Double endTime,
Integer offset,
Integer count)
获取与指定群组历史消息;
|
UserMessageData |
getGroupOfflineMessage(String userid,
String groupid)
获取用户指定群组离线消息;
|
List<String> |
getGroups(String user_id)
获取用户拥有的群组;
|
List<String> |
getGroupUsers(String group_id)
获取群组所有成员;
|
Group |
getGroupUsers(String group_id,
Integer type)
获取群组所有成员信息(根据type区分在线还是离线)
|
User |
getUserByType(String userid,
Integer type)
根据在线类型获取用户信息;
|
boolean |
isOnline(String userid)
判断用户是否在线
|
void |
removeGroupUser(String userid,
String group_id)
移除群组用户
|
void |
writeMessage(String timelineTable,
String timelineId,
ChatBody chatBody)
消息持久化写入
|
public ImBindListener getBindListener()
IMesssageHelper
getBindListener
in interface IMesssageHelper
public void addGroupUser(String userid, String group_id)
IMesssageHelper
addGroupUser
in interface IMesssageHelper
public List<String> getGroupUsers(String group_id)
IMesssageHelper
getGroupUsers
in interface IMesssageHelper
public void writeMessage(String timelineTable, String timelineId, ChatBody chatBody)
IMesssageHelper
writeMessage
in interface IMesssageHelper
public void removeGroupUser(String userid, String group_id)
IMesssageHelper
removeGroupUser
in interface IMesssageHelper
public UserMessageData getFriendsOfflineMessage(String userid, String from_userid)
IMesssageHelper
getFriendsOfflineMessage
in interface IMesssageHelper
public UserMessageData getFriendsOfflineMessage(String userid)
IMesssageHelper
getFriendsOfflineMessage
in interface IMesssageHelper
public UserMessageData getGroupOfflineMessage(String userid, String groupid)
IMesssageHelper
getGroupOfflineMessage
in interface IMesssageHelper
public UserMessageData getFriendHistoryMessage(String userid, String from_userid, Double beginTime, Double endTime, Integer offset, Integer count)
IMesssageHelper
getFriendHistoryMessage
in interface IMesssageHelper
beginTime
- 消息区间开始时间endTime
- 消息区间结束时间offset
- 分页偏移量count
- 数量public UserMessageData getGroupHistoryMessage(String userid, String groupid, Double beginTime, Double endTime, Integer offset, Integer count)
IMesssageHelper
getGroupHistoryMessage
in interface IMesssageHelper
beginTime
- 消息区间开始时间endTime
- 消息区间结束时间offset
- 分页偏移量count
- 数量public boolean isOnline(String userid)
IMesssageHelper
isOnline
in interface IMesssageHelper
public Group getGroupUsers(String group_id, Integer type)
IMesssageHelper
getGroupUsers
in interface IMesssageHelper
public List<Group> getAllGroupUsers(String user_id, Integer type)
IMesssageHelper
getAllGroupUsers
in interface IMesssageHelper
public Group getFriendUsers(String user_id, String friend_group_id, Integer type)
IMesssageHelper
getFriendUsers
in interface IMesssageHelper
public List<Group> getAllFriendUsers(String user_id, Integer type)
IMesssageHelper
getAllFriendUsers
in interface IMesssageHelper
public User getUserByType(String userid, Integer type)
IMesssageHelper
getUserByType
in interface IMesssageHelper
public List<String> getGroups(String user_id)
IMesssageHelper
getGroups
in interface IMesssageHelper
Copyright © 2018. All rights reserved.