/// <summary>
        /// 根据用户账号和模块名称获取权限
        /// </summary>
        /// <param name="userEmail"></param>
        /// <param name="type"></param>
        /// <returns></returns>
        public ActivityBoardPermissionConfig GetPowerConfigByUserEmail(string userEmail, ActivityBoardModuleType type)
        {
            ActivityBoardPermissionConfig result = null;

            try
            {
                result = dbScopeReadManager.Execute(conn => DALActivityBoardPower.SelectPowerConfigByUserEmail(conn, userEmail, type));
            }
            catch (Exception ex)
            {
                logger.Log(Level.Error, ex, "GetPowerConfigByUserEmail");
            }

            return(result);
        }
        /// <summary>
        /// 添加权限信息
        /// </summary>
        /// <param name="conn"></param>
        /// <param name="data"></param>
        /// <returns></returns>
        public static int InsertActivityBoardPowerConfig(SqlConnection conn, ActivityBoardPermissionConfig data)
        {
            const string sql = @"INSERT  INTO Configuration..ActivityBoardPermissionConfig
                    ( UserEmail ,
                      IsVisible ,
                      VisibleActivityDays ,
                      InsertActivity ,
                      UpdateActivity ,
                      DeleteActivity ,
                      ViewActivity ,
                      ActivityEffect ,
                      ModuleType ,
                      CreatedTime
                    )           
            VALUES  ( @UserEmail ,
                      @IsVisible ,
                      @VisibleActivityDays ,
                      @InsertActivity ,
                      @UpdateActivity ,
                      @DeleteActivity ,
                      @ViewActivity ,
                      @ActivityEffect ,
                      @ModuleType ,
                      GETDATE()
                    )";

            return(conn.Execute(sql, new
            {
                UserEmail = data.UserEmail.Trim(),
                IsVisible = data.IsVisible,
                VisibleActivityDays = data.VisibleActivityDays,
                InsertActivity = data.InsertActivity,
                UpdateActivity = data.UpdateActivity,
                DeleteActivity = data.DeleteActivity,
                ViewActivity = data.ViewActivity,
                ActivityEffect = data.ActivityEffect,
                ModuleType = data.ModuleType.ToString()
            }, commandType: CommandType.Text));
        }