/// <summary> /// 撤消用户操作权限 /// </summary> /// <param name="userInfo">用户</param> /// <param name="userId">用户主键</param> /// <param name="revokePermissionId">撤消权限数组</param> /// <returns>影响的行数</returns> public int RevokeUserPermissionById(BaseUserInfo userInfo, string userId, string revokePermissionId) { var result = 0; var parameter = ServiceInfo.Create(userInfo, MethodBase.GetCurrentMethod()); ServiceUtil.ProcessUserCenterWriteDb(userInfo, parameter, (ServiceUtil.ProcessFun)((dbHelper) => { var manager = new BasePermissionManager((IDbHelper)dbHelper, (BaseUserInfo)userInfo); // 小心异常,检查一下参数的有效性 if (revokePermissionId != null) { result += manager.RevokeUser(userInfo.SystemCode, userId, revokePermissionId); } })); return(result); }