示例#1
0
        /// <summary>
        /// 查看短信配置
        /// </summary>
        /// <param name="model"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        public Tuple <List <VipPaintPackageSmsConfig>, int> SelectPackageSmsConfig
            (VipPaintPackageSmsConfig model, int pageIndex, int pageSize)
        {
            var result     = null as List <VipPaintPackageSmsConfig>;
            var totalCount = 0;

            try
            {
                result = dbScopeManagerConfigurationRead.Execute(conn =>
                                                                 DalVipPaintPackage.SelectPackageSmsConfig(conn, model, pageIndex, pageSize, out totalCount));
                var vipUsers = new VipBaoYangPackageManager().GetAllBaoYangPackageUser();
                if (result != null && result.Any() && vipUsers != null && vipUsers.Any())
                {
                    result.ForEach(s =>
                    {
                        s.VipUserName = vipUsers.FirstOrDefault(v => string.Equals(v.VipUserId, s.VipUserId.ToString()))?.VipUserName;
                    });
                }
            }
            catch (Exception ex)
            {
                Logger.Error("SelectVipPaintPackageSmsConfig", ex);
            }
            return(Tuple.Create(result, totalCount));
        }
示例#2
0
        /// <summary>
        /// 查询塞券记录
        /// </summary>
        /// <param name="batchCode"></param>
        /// <param name="moileNumber"></param>
        /// <param name="packagePid"></param>
        /// <param name="vipUserId"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        public Tuple <List <VipPaintPromotionRecordViewModel>, int> SelectPromotionRecord
            (string batchCode, string moileNumber, string packagePid, Guid vipUserId, int pageIndex, int pageSize)
        {
            var result     = null as List <VipPaintPromotionRecordViewModel>;
            var totalCount = 0;

            try
            {
                result = dbScopeManagerConfigurationRead.Execute(conn => DalVipPaintPackage.SelectPromotionRecord
                                                                     (conn, batchCode, moileNumber, packagePid, vipUserId, pageIndex, pageSize, out totalCount));
                if (result != null && result.Any())
                {
                    var vipUsers = new VipBaoYangPackageManager().GetAllBaoYangPackageUser();
                    if (vipUsers != null && vipUsers.Any())
                    {
                        result.ForEach(s =>
                        {
                            s.VipUserName = vipUsers.FirstOrDefault(v =>
                                                                    string.Equals(v.VipUserId, s.VipUserId.ToString()))?.VipUserName;
                        });
                    }
                }
            }
            catch (Exception ex)
            {
                Logger.Error("SelectPromotionRecord", ex);
            }
            return(Tuple.Create(result, totalCount));
        }