系统消息数量的增加及减少!

增加:

MsgInfo mi=new MsgInfo();
   mi.setTitle(title);
   mi.setContent(title);
   mi.setSendUserId(WebUtil.getCurrentUserId(request));

PersonnelSettingUtil.sendMessages(recvUserVOs, WebUtil.getBusiNetworkId(msg.getRequest()), msgInfo);

 

减少:

String msgKey = WebUtil.getBusiNetworkId(transMsg.getRequest())+"-"+WebUtil.getCurrentOrganizationId((transMsg.getRequest()))+"-"+WebUtil.getCurrentUserId(((transMsg.getRequest())));
    MemoryMessageServer msgServer = MemoryMessageServer.getInstance();
    Integer messageSize = msgServer.getMessageCount(msgKey);
    if ((messageSize!=null) && (messageSize.intValue()>0)){
     MemoryMessageServer.getInstance().subtractMessageCount(msgKey);
    }

你可能感兴趣的:(系统消息数量的增加及减少!)