类 VisitLogFunction

java.lang.Object
com.sh.base.frame.common.util.VisitLogFunction

public class VisitLogFunction extends Object

Title: 首亨软件 - 访问日志处理对象。计算在线用户数,其中需要系统时间的地方

可选择取WEB系统时间或数据库服务器系统时间

Description: 首亨软件 - SHForce

Company:首亨软件(重庆)有限公司

Author:江兴春

  • 构造器详细资料

    • VisitLogFunction

      public VisitLogFunction()
  • 方法详细资料

    • isSystemLogEnable

      public static boolean isSystemLogEnable()
      是否记录日志
      返回:
      boolean
    • init

      public static void init(DataCenter dc)
      初始化
      参数:
      dc - DataCenter
    • isWriteLog

      public static boolean isWriteLog(String menuId)
      菜单是否记录日志
      参数:
      menuId - 菜单编号
      返回:
      true 记录日志,false 不记录日志 20110902添加此方法
    • refreshUsersStatus

      public static boolean refreshUsersStatus(DataCenter dc, int testInterval)
      刷新所有用户的状态 取消了离开状态
      参数:
      dc - 数据中心对象
      testInterval - 单位:分钟,系统测试的时间间隔,若超过此时间间隔则认为用户已离线,此值必须>= JSP页面的刷新时间间隔
      返回:
      boolean true成功、false失败
    • refreshUsersStatus

      public static void refreshUsersStatus(DataCenter dc, int accessInterval, int testInterval)
      刷新所有用户的状态 ,暂时没使用,取消离开状态
      参数:
      dc - 数据中心对象
      accessInterval - 单位:分钟,用户访问时的间间隔,若超过此时间间隔则认为用户已离开
      testInterval - 单位:分钟,系统测试的时间间隔,若超过此时间间隔则认为用户已离线,此值必须>= JSP页面的刷新时间间隔
    • updateLastAccess

      public static boolean updateLastAccess(UserInfo userInfo) throws Exception
      抛出:
      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 - HttpServletResponse
      forseInsert - boolean
      返回:
      boolean
      抛出:
      Exception - Exception