Commit 5d3b4a3c by 周添尉

修改登出日志

parent 9464e257
...@@ -4,8 +4,13 @@ package com.gaowj.system.login; ...@@ -4,8 +4,13 @@ package com.gaowj.system.login;
//import java.util.Map; //import java.util.Map;
import java.io.IOException; import java.io.IOException;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import com.gaowj.business.SystemOpeBusiness;
import com.gaowj.business.action.BasicAction; import com.gaowj.business.action.BasicAction;
import com.gaowj.business.comp.BusinessManager;
import com.gaowj.business.exception.BusinessException; import com.gaowj.business.exception.BusinessException;
//import com.gaowj.business.listener.myHttpSessionAttributeListener; //import com.gaowj.business.listener.myHttpSessionAttributeListener;
import com.gaowj.business.util.SessionUtil; import com.gaowj.business.util.SessionUtil;
...@@ -19,10 +24,14 @@ public class LogoutAction extends BasicAction { ...@@ -19,10 +24,14 @@ public class LogoutAction extends BasicAction {
private static final long serialVersionUID = -6074460857486096013L; private static final long serialVersionUID = -6074460857486096013L;
public String execute() throws BusinessException { public String execute() throws BusinessException {
// request.getSession().removeAttribute("userInfo"); //增加登陆日志
// List<Map<String,Object>> user = myHttpSessionAttributeListener.getSessionUser(request); SystemOpeBusiness systemOpeBusiness = BusinessManager.getBusiness(SystemOpeBusiness.class);
// System.out.println("在线用户"); Map<String,Object> log = new HashMap<String,Object>();
// System.out.println(user); log.put("CODE", SessionUtil.getEmid());log.put("EMNAME",SessionUtil.getEmname());log.put("EMIP",SessionUtil.getClientIp());
log.put("OPENAME", "退出");log.put("OPETIME", new Date());log.put("TYPE",SessionUtil.getSessionUser().get("TYPE"));
log.put("OPETYPE", "B/S退出");
systemOpeBusiness.insert_log(log);
SessionUtil.removeSession(request); SessionUtil.removeSession(request);
request.getSession().invalidate(); request.getSession().invalidate();
try { try {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment