/// <summary>
        /// 添加角色信息
        /// </summary>
        /// <param name="role"></param>
        public void AddRole(Role role)
        {
            role.ID = 0;
            //权限判断
            loginService.HaveAdminRightForRole(role);

            //只有超级管理员才能添加系统角色
            if (role.RoleType != RoleTypeOptions.General &&
                loginService.LoginUser.AccountType != UserTypeOptions.SuperAdmin)
            {
                throw new NotRightException();
            }

            DABasicInfoHelper.AddRole(role);

            //记录登录日志
            loginService.AddLog(
                "AddRole",
                string.Format("添加角色(Name={0})", role.Name));
        }
        /// <summary>
        /// 授予角色操作权限
        /// </summary>
        /// <param name="roleId"></param>
        /// <param name="rightIds"></param>
        public void AddRoleRights(int roleId, List <int> rightIds)
        {
            //权限判断
            Role role = loginService.HaveAdminRightForRole(roleId);

            List <int> rangeRightIds = loginService.LoginUser.AccountType == UserTypeOptions.ProductAdmin
                                          ? DARightsHelper.GetUserRights(role.SystemID, loginService.LoginUser.ID, loginService.LoginUser.AccountType).Select(a => a.RightID).ToList()
                                          : null;

            DARightsHelper.AddRoleRights(roleId, rightIds, rangeRightIds);

            //记录登录日志
            string rights = string.Empty;

            rightIds.ForEach((i) => { rights += i.ToString() + ","; });
            rights = rights.TrimEnd(',');
            loginService.AddLog(
                "AddRoleRights",
                string.Format("添加角色权限(RoleID={0},Rights={1})", roleId, rights));
        }