/// <summary> /// 重置用户访问情况 /// </summary> /// <param name="userInfo">用户</param> /// <param name="ids">日志主键</param> /// <returns>数据表</returns> public DataTable ResetVisitInfo(BaseUserInfo userInfo, string[] ids) { // 写入调试信息 #if (DEBUG) int milliStart = BaseBusinessLogic.StartDebug(userInfo, MethodBase.GetCurrentMethod()); #endif // 加强安全验证防止未授权匿名调用 #if (!DEBUG) LogOnService.UserIsLogOn(userInfo); #endif DataTable dataTable = new DataTable(BaseLogEntity.TableName); using (IDbHelper dbHelper = DbHelperFactory.GetHelper(BaseSystemInfo.UserCenterDbType)) { try { dbHelper.Open(UserCenterDbConnection); dbHelper.BeginTransaction(); BaseUserManager userManager = new BaseUserManager(dbHelper, userInfo); // 重置访问情况 userManager.ResetVisitInfo(ids); // 获取列表 dataTable = userManager.GetDataTable(); dataTable.TableName = BaseLogEntity.TableName; BaseLogManager.Instance.Add(dbHelper, userInfo, this.serviceName, AppMessage.LogService_ResetVisitInfo, MethodBase.GetCurrentMethod()); dbHelper.CommitTransaction(); } catch (Exception ex) { dbHelper.RollbackTransaction(); BaseExceptionManager.LogException(dbHelper, userInfo, ex); throw ex; } finally { dbHelper.Close(); } } // 写入调试信息 #if (DEBUG) BaseBusinessLogic.EndDebug(MethodBase.GetCurrentMethod(), milliStart); #endif return dataTable; }