/// <summary>
        /// 清除用户权限
        ///
        /// 1.清除用户的角色归属。
        /// 2.清除用户的模块权限。
        /// 3.清除用户的操作权限。
        /// </summary>
        /// <param name="userInfo">用户</param>
        /// <param name="userId">用户主键</param>
        /// <returns>数据表</returns>
        public int ClearUserPermission(BaseUserInfo userInfo, string userId)
        {
            var result = 0;

            var parameter = ServiceInfo.Create(userInfo, MethodBase.GetCurrentMethod());

            ServiceUtil.ProcessUserCenterWriteDb(userInfo, parameter, (ServiceUtil.ProcessFun)((dbHelper) =>
            {
                var systemCode = userInfo.SystemCode;

                var userManager = new BaseUserManager(dbHelper, userInfo);
                result         += userManager.ClearRole(systemCode, userId);

                var userPermissionManager = new BasePermissionManager((IDbHelper)dbHelper, (BaseUserInfo)userInfo);
                result += userPermissionManager.RevokeUserAll(systemCode, userId);

                var userPermissionScopeManager = new BaseUserScopeManager(dbHelper, userInfo);
                result += userPermissionScopeManager.RevokeAll(systemCode, userId);
            }));

            return(result);
        }