public interface UserMessageManager
限定符和类型 | 方法和说明 |
---|---|
Map |
countMessage()
分时间段及消息类型统计消息
时间段:本月,本季度,本年
消息类型:个人消息,系统消息
|
Integer[] |
countNewMessage(Long memberId)
统计某人未读新消息的数目
return {系统消息数目,在线消息数目}
|
void |
deleteMessage(Long userId,
String deleteType,
List<Long> ids)
删除聊天记录
|
void |
deleteReadMessage() |
List<UserHistoryMessage> |
getAllHistoryMessage(Constants.UserMessage_TYPE type,
Long userId,
Long id,
boolean search,
String area,
String time,
String content)
获取当前所有聊天记录
|
List<UserHistoryMessage> |
getAllHistoryMessage(Constants.UserMessage_TYPE type,
Long userId,
Long id,
boolean search,
String area,
String time,
String content,
boolean isPage)
获取当前所有聊天记录,不分页
|
List<UserHistoryMessage> |
getAllPersonMessages(long userInternalID,
String condition,
String textfield,
String textfield1)
获取当前全部的个人消息列表,包括我发的和发给我的
|
List<UserHistoryMessage> |
getAllPersonMessages(long userInternalID,
String condition,
String textfield,
String textfield1,
Boolean isPage) |
List<UserHistoryMessage> |
getAllSystemMessages(long userInternalID,
String condition,
String textfield,
String textfield1)
获取当前全部的系统消息列表
|
List<UserHistoryMessage> |
getAllSystemMessages(long userInternalID,
String condition,
String textfield,
String textfield1,
Boolean isPage) |
List<UserHistoryMessage> |
getAllSystemMessages(long userInternalID,
String condition,
String textfield,
String textfield1,
Boolean isPage,
String readType) |
int |
getCachedUserCount()
消息缓存中已缓存的用户个数
|
List<UserHistoryMessage> |
getHistoryMessageTree(Long userId)
获取所有聊天对象
|
List<String> |
getMessageAttachmentNames(long senderId,
long recieverId,
int size)
取得消息附件
|
Map<String,String> |
getMessageLinkTypes() |
String |
getNewMessagesAndOnlineSize() |
List<UserHistoryMessage> |
getSystemHistoryMessages(FlipInfo fi,
Map<String,String> params)
查询当前人的历史消息列表
|
int |
getThisHistoryMessage(Constants.UserMessage_TYPE type,
Long userId,
Long id,
String createDate)
获取当前聊天记录的总数
|
List<UserHistoryMessage> |
getThisHistoryMessage(Constants.UserMessage_TYPE type,
Long userId,
Long id,
String createDate,
int start,
int pageSize)
获取当前聊天记录
|
List<Ent_UserMessage> |
getUnresolvedMessagesForMB(long userInternalID) |
UserHistoryMessage |
getUserHistoryMsgById(Long id)
根据历史消息id获取历史消息
|
String |
getUserOnlineMessage() |
int |
getWaitingParseQLength()
获取等待解析的队列长度
|
int |
getWaitingSaveQLength()
获取等待入库的队列长度
|
void |
initMessageState() |
boolean |
isCachedUserMessage(long userInternalID)
用户消息是否被缓存
|
void |
processPcAndMobileOnlineAtSameTime(Long userId,
String pLang,
String userAgentFrom,
Map<Constants.login_sign,OnlineUser.LoginInfo> loginInfoMapper,
String loginType)
异步处理:登录时PC和移动端同时在线时的消息提醒
|
void |
removeAllMessages(long userInternalID,
int messageType)
清空我接收到的消息
|
void |
removeMessage(String condition,
Long longfield)
根据消息的保留时间或每人的最大消息数量清除消息
|
void |
removeMessage(String startTime,
String endTime)
根据消息阅读状态及时间段清除消息
|
void |
saveMessage(Ent_UserMessage msg)
保存消息
|
void |
savePatchHistory(List<UserHistoryMessage> ms)
批量保存历史消息记录
|
void |
sendIMMessage(int type,
Constants.UserMessage_TYPE messageType,
Long referenceId,
String content,
long senderId,
List<Long> receiverIds,
String creationDate)
发送在线IM消息
实现策略:直接写入历史消息 |
void |
sendMessage(UserMessage userMessage)
发送消息
|
void |
sendPersonMessage(Constants.UserMessage_TYPE messageType,
Long referenceId,
String content,
long senderId,
List<Long> receiverIds,
String creationDate)
发送个人消息
实现策略:直接写入消息表 |
void |
sendPersonMessage(String content,
long senderId,
long... receiverId)
发送个人消息
实现策略:直接写入消息表 |
void |
sendSystemMessage(MessageContent content,
ApplicationCategoryEnum messageCategroy,
long senderId,
Collection<MessageReceiver> receivers,
Object... messageFilterArgs)
发送系统消息
实现策略:先调用异步任务接口TaskManager.sendTaskToQueue,然后由异步任务调度器调度消息解析器,然后写入消息表 |
void |
sendSystemMessage(MessageContent content,
ApplicationCategoryEnum messageCategroy,
long senderId,
MessageReceiver receiver,
Object... messageFilterArgs)
发送系统消息
实现策略:先调用异步任务接口TaskManager.sendTaskToQueue,然后由异步任务调度器调度消息解析器,然后写入消息表 |
void |
sendSystemMessage(MessageContent content,
int messageCategroy,
long senderId,
Collection<MessageReceiver> receivers,
Object... messageFilterArgs)
发送系统消息
实现策略:先调用异步任务接口TaskManager.sendTaskToQueue,然后由异步任务调度器调度消息解析器,然后写入消息表 |
void |
sendSystemMessage(MessageContent content,
int messageCategroy,
long senderId,
Date creationDate,
Collection<MessageReceiver> receivers,
Object... messageFilterArgs)
发送系统消息
实现策略:先调用异步任务接口TaskManager.sendTaskToQueue,然后由异步任务调度器调度消息解析器,然后写入消息表 |
void |
setMessageReadedSate(Long memberId,
int msgTypte)
修改 消息的读状态
|
void |
updateMessageFlagByZhixin(List<Long> messageIdArray)
致信消息已读后同步修改数据库标示
|
void |
updateSystemMessageState(long id)
更新系统消息未读状态
|
void |
updateSystemMessageStateByCategory(long userId,
int messageCategory)
更新系统消息未读状态
|
void |
updateSystemMessageStateByUser(long userInternalID)
更新用户系统消息未读状态
|
void |
updateSystemMessageStateByUserAndReference(long userInternalID,
long referenceId)
更新指定用户指定业务的消息状态。
|
void initMessageState()
void deleteReadMessage()
List<UserHistoryMessage> getAllSystemMessages(long userInternalID, String condition, String textfield, String textfield1) throws BusinessException
userInternalID
- 用户内部IDcondition
- 查询条件,默认为null,支持:用户姓名,消息内容,时间段textfield
- textfield1
- BusinessException
List<UserHistoryMessage> getAllSystemMessages(long userInternalID, String condition, String textfield, String textfield1, Boolean isPage) throws BusinessException
List<UserHistoryMessage> getAllSystemMessages(long userInternalID, String condition, String textfield, String textfield1, Boolean isPage, String readType) throws BusinessException
List<UserHistoryMessage> getAllPersonMessages(long userInternalID, String condition, String textfield, String textfield1) throws BusinessException
userInternalID
- 用户内部IDcondition
- 查询条件,默认为null,支持:用户姓名,消息内容,时间段textfield
- textfield1
- BusinessException
List<UserHistoryMessage> getAllPersonMessages(long userInternalID, String condition, String textfield, String textfield1, Boolean isPage) throws BusinessException
int getThisHistoryMessage(Constants.UserMessage_TYPE type, Long userId, Long id, String createDate) throws BusinessException
List<UserHistoryMessage> getThisHistoryMessage(Constants.UserMessage_TYPE type, Long userId, Long id, String createDate, int start, int pageSize) throws BusinessException
List<UserHistoryMessage> getHistoryMessageTree(Long userId) throws BusinessException
List<UserHistoryMessage> getAllHistoryMessage(Constants.UserMessage_TYPE type, Long userId, Long id, boolean search, String area, String time, String content) throws BusinessException
List<UserHistoryMessage> getAllHistoryMessage(Constants.UserMessage_TYPE type, Long userId, Long id, boolean search, String area, String time, String content, boolean isPage) throws BusinessException
void deleteMessage(Long userId, String deleteType, List<Long> ids) throws BusinessException
void sendMessage(UserMessage userMessage) throws BusinessException
userMessage
- BusinessException
void sendSystemMessage(MessageContent content, ApplicationCategoryEnum messageCategroy, long senderId, MessageReceiver receiver, Object... messageFilterArgs) throws BusinessException
content
- 消息体messageCategroy
- 消息所属应用分类
在com.seeyon.ctp.common.constants.ApplicationCategoryEnum中定义senderId
- 发送在和IDreceiver
- 接收者messageFilterArgs
- 消息转移的参数,与对应的UserMessageFilter对应BusinessException
ApplicationCategoryEnum
void sendSystemMessage(MessageContent content, ApplicationCategoryEnum messageCategroy, long senderId, Collection<MessageReceiver> receivers, Object... messageFilterArgs) throws BusinessException
content
- 消息体messageCategroy
- 消息所属应用分类
在com.seeyon.ctp.common.constants.ApplicationCategoryEnum中定义senderId
- 发送在和IDreceivers
- 接收者messageFilterArgs
- 消息转移的参数,与对应的UserMessageFilter对应BusinessException
ApplicationCategoryEnum
void sendSystemMessage(MessageContent content, int messageCategroy, long senderId, Collection<MessageReceiver> receivers, Object... messageFilterArgs) throws BusinessException
content
- 消息体messageCategroy
- 消息所属应用分类
在com.seeyon.ctp.common.constants.ApplicationCategoryEnum中定义
如果是插件,需要在插件定义文件中配置applicationCategory属性senderId
- 发送在和IDreceivers
- 接收者messageFilterArgs
- 消息转移的参数,与对应的UserMessageFilter对应BusinessException
ApplicationCategoryEnum
void sendSystemMessage(MessageContent content, int messageCategroy, long senderId, Date creationDate, Collection<MessageReceiver> receivers, Object... messageFilterArgs) throws BusinessException
content
- 消息体messageCategroy
- 消息所属应用分类
在com.seeyon.ctp.common.constants.ApplicationCategoryEnum中定义
如果是插件,需要在插件定义文件中配置applicationCategory属性senderId
- 发送在和IDcreationDate
- 发送时间receivers
- 接收者messageFilterArgs
- 消息转移的参数,与对应的UserMessageFilter对应BusinessException
ApplicationCategoryEnum
void saveMessage(Ent_UserMessage msg) throws BusinessException
msg
- BusinessException
void sendPersonMessage(String content, long senderId, long... receiverId) throws BusinessException
content
- senderId
- receiverId
- BusinessException
void sendPersonMessage(Constants.UserMessage_TYPE messageType, Long referenceId, String content, long senderId, List<Long> receiverIds, String creationDate) throws BusinessException
content
- senderId
- receiverIds
- BusinessException
void sendIMMessage(int type, Constants.UserMessage_TYPE messageType, Long referenceId, String content, long senderId, List<Long> receiverIds, String creationDate) throws BusinessException
content
- senderId
- receiverIds
- BusinessException
void removeAllMessages(long userInternalID, int messageType) throws BusinessException
userInternalID
- BusinessException
Map countMessage() throws BusinessException
userInternalID
- BusinessException
void removeMessage(String startTime, String endTime) throws BusinessException
startTime
- endTime
- isRead
- BusinessException
void removeMessage(String condition, Long longfield) throws BusinessException
condition
- longfield
- BusinessException
List<String> getMessageAttachmentNames(long senderId, long recieverId, int size)
senderId
- recieverId
- size
- String getNewMessagesAndOnlineSize()
Integer[] countNewMessage(Long memberId) throws BusinessException
void setMessageReadedSate(Long memberId, int msgTypte)
memberId
- msgTypte
- void updateSystemMessageState(long id) throws BusinessException
id
- BusinessException
void updateSystemMessageStateByCategory(long userId, int messageCategory) throws BusinessException
category
- BusinessException
void updateSystemMessageStateByUser(long userInternalID) throws BusinessException
userInternalID
- BusinessException
void updateSystemMessageStateByUserAndReference(long userInternalID, long referenceId)
userInternalID
- 用户IdreferenceId
- 业务标识int getWaitingSaveQLength()
int getWaitingParseQLength()
int getCachedUserCount()
boolean isCachedUserMessage(long userInternalID)
userInternalID
- List<Ent_UserMessage> getUnresolvedMessagesForMB(long userInternalID) throws BusinessException
String getUserOnlineMessage() throws BusinessException
void updateMessageFlagByZhixin(List<Long> messageIdArray) throws Exception
messageIdArray
- Exception
void savePatchHistory(List<UserHistoryMessage> ms)
ms
- void processPcAndMobileOnlineAtSameTime(Long userId, String pLang, String userAgentFrom, Map<Constants.login_sign,OnlineUser.LoginInfo> loginInfoMapper, String loginType)
userId
- pLang
- userAgentFrom
- loginInfoMapper
- List<UserHistoryMessage> getSystemHistoryMessages(FlipInfo fi, Map<String,String> params) throws BusinessException
fi
- params(String
- condition;String field;String readType;String field1=null;)BusinessException
UserHistoryMessage getUserHistoryMsgById(Long id) throws BusinessException
id
- BusinessException
Copyright © 2016–2018. All rights reserved.