`
xinggang121314
  • 浏览: 1566 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

java更新用户在线代码

阅读更多
            java更新用户在线代码



/**
* 更新在线用户的时间
*/
public ModelAndView updateOnlineHandler(HttpServletRequest request,
HttpServletResponse response) throws ServletException {
String userId = Utils.trim(request.getParameter("userId"));
String value = Utils.trim(request.getParameter("value"));
//解密
//String userId=EncryptDecryptUtil.decryptData(userIdcs, 100);

if ("ht".equals(userId.substring(0, 2).toLowerCase())) {
userId = userId.substring(2, userId.length());
}

// 更新在线用户时间
BackOnlineUserInfo backOnlineUserInfo = new BackOnlineUserInfo();
backOnlineUserInfo.setAcctno(userId);
backOnlineUserInfo.setSessionId(value);
backOnlineUserInfo.setUpdateTime(new Date());

CallOnlineCache callCache = new CallOnlineCache();
try {
callCache.addCache(
cn.com.inxite.cache.common.Constants.CACHE_USER_ONLINE,
userId, backOnlineUserInfo);
// reportDaily = ()
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

return new ModelAndView("updateonlineuser");
}
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics