类 VisitLogFunction
java.lang.Object
com.sh.base.frame.common.util.VisitLogFunction
Title: 首亨软件 - 访问日志处理对象。计算在线用户数,其中需要系统时间的地方
可选择取WEB系统时间或数据库服务器系统时间Description: 首亨软件 - SHForce
Company:首亨软件(重庆)有限公司
Author:江兴春
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static voidinit(DataCenter dc) 初始化static boolean是否记录日志static booleanisWriteLog(String menuId) 菜单是否记录日志static booleanrefreshUsersStatus(DataCenter dc, int testInterval) 刷新所有用户的状态 取消了离开状态static voidrefreshUsersStatus(DataCenter dc, int accessInterval, int testInterval) 刷新所有用户的状态 ,暂时没使用,取消离开状态static booleanupdateLastAccess(UserInfo userInfo) static booleanupdateLastAccess(DataCenter dc, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) static booleanupdateLastAccess(DataCenter dc, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, boolean forseInsert) 更新当前登录用户的最后访问时间(在sys_log表中),如果没有访问记录,则插入一条新的记录
-
构造器详细资料
-
VisitLogFunction
public VisitLogFunction()
-
-
方法详细资料
-
isSystemLogEnable
public static boolean isSystemLogEnable()是否记录日志- 返回:
- boolean
-
init
初始化- 参数:
dc- DataCenter
-
isWriteLog
菜单是否记录日志- 参数:
menuId- 菜单编号- 返回:
- true 记录日志,false 不记录日志 20110902添加此方法
-
refreshUsersStatus
刷新所有用户的状态 取消了离开状态- 参数:
dc- 数据中心对象testInterval- 单位:分钟,系统测试的时间间隔,若超过此时间间隔则认为用户已离线,此值必须>= JSP页面的刷新时间间隔- 返回:
- boolean true成功、false失败
-
refreshUsersStatus
刷新所有用户的状态 ,暂时没使用,取消离开状态- 参数:
dc- 数据中心对象accessInterval- 单位:分钟,用户访问时的间间隔,若超过此时间间隔则认为用户已离开testInterval- 单位:分钟,系统测试的时间间隔,若超过此时间间隔则认为用户已离线,此值必须>= JSP页面的刷新时间间隔
-
updateLastAccess
- 抛出:
Exception
-
updateLastAccess
public static boolean updateLastAccess(DataCenter dc, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws Exception - 抛出:
Exception
-
updateLastAccess
public static boolean updateLastAccess(DataCenter dc, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, boolean forseInsert) throws Exception 更新当前登录用户的最后访问时间(在sys_log表中),如果没有访问记录,则插入一条新的记录- 参数:
dc- DataCenter数据中心对象request- HttpServletRequest http请求response- HttpServletResponseforseInsert- boolean- 返回:
- boolean
- 抛出:
Exception- Exception
-