Esempio n. 1
0
        internal static AllFesLogin GetFestivalLogin(FestivalBaseData fbd)
        {
            using (var cn = new MySqlConnection(sqlconnectionString))
            {
                cn.Open();

                AllFesLogin i;
                using (var multi = cn.QueryMultiple("" + database3 + @".sys_get_515", new { }, null, null, CommandType.StoredProcedure))
                {
                    var thirdDay = multi.Read <FestivalLogin>().ToList();

                    var second = multi.Read <FestivalLogin>().ToList();

                    var one = multi.Read <FestivalLogin>().ToList();

                    i = new AllFesLogin();

                    i.OneDay   = one;
                    i.SecDay   = second;
                    i.thirdDay = thirdDay;
                }


                cn.Close();
                return(i);
            }
        }
Esempio n. 2
0
        public ActionResult ChessFestival(Dictionary <string, string> queryvalues)
        {
            int    _ClientType     = queryvalues.ContainsKey("ClientType") ? Convert.ToInt32(queryvalues["ClientType"]) : 0;
            string _StartDate      = queryvalues.ContainsKey("StartTime") ? queryvalues["StartTime"] : DateTime.Now.ToString("yyyy-MM-dd 00:00:00");
            string _ExpirationDate = queryvalues.ContainsKey("ExpirationDate") ? queryvalues["ExpirationDate"] : DateTime.Now.AddDays(1).ToString("yyyy-MM-dd 00:00:00");

            FestivalBaseData fbd = new FestivalBaseData()
            {
                StartTime      = _StartDate,
                ExpirationDate = _ExpirationDate,
                ClientType     = _ClientType
            };

            IEnumerable <Festival515> fes515 = QQZoneRechargeBLL.GetFestival515(fbd);

            AllFesLogin login515 = QQZoneRechargeBLL.GetFestivalLogin(fbd);

            FestivalVIP vip515 = QQZoneRechargeBLL.GetFestivalVIP(fbd);

            List <object> objList = new List <object>();

            objList.Add(fes515);
            objList.Add(login515);
            objList.Add(vip515);

            fbd.objects = objList;

            return(View(fbd));
        }
Esempio n. 3
0
        internal static IEnumerable <Festival515> GetFestival515(FestivalBaseData fbd)
        {
            using (var cn = new MySqlConnection(sqlconnectionString))
            {
                cn.Open();

                StringBuilder str = new StringBuilder();

                //str.Append("SELECT DATE_FORMAT(curdate(), '%Y-%m-%d') as date, a.count as count, b.count as activeuser FROM (SELECT count(0) as count FROM Role where Gold > 10) as a, (SELECT count(0) as count FROM Role where Gold <= 10) as b;");
                str.AppendFormat(@" 

SELECT (select COUNT(DISTINCT UserID) from " + database1 + @".BG_LoginRecord
where LoginTime >= t1.CreateTime and LoginTime<DATE_ADD(t1.CreateTime,INTERVAL 1 DAY)
and LoginAgent!=10010) as DAU,
t1.CreateTime as DateTime,
COUNT(t1.UserID) as IconPCount,
SUM(t1.clickcount) as IconPNum,
SUM(t1.dtcount) as DIconPCount,
SUM(t1.dtnum) as DIconPNum,
SUM(t1.fjcount) as FIconPCount,
SUM(t1.fjnum) as FIconPNum
from (
select t.CreateTime,t.UserID,sum(t.ClickCount) as clickcount,SUM( DISTINCT t.dtcount) as dtcount,SUM(t.dtnum) as dtnum,
SUM( DISTINCT t.fjcount ) as fjcount,SUM(t.fjnum) as fjnum from (
select  DATE_FORMAT(CreateTime,'%Y-%m-%d') as CreateTime,UserID,ClickCount,
case SiteID
when 1 then 1
else  0
end as dtcount,
case SiteID
when 1 then ClickCount
else  0
end as dtnum,
case SiteID
when 2 then 1
else  0
end as fjcount,
case SiteID
when 2 then ClickCount
else  0
end as fjnum
from " + database3 + @".BG_ClickRcord
where CreateTime BETWEEN @StartTime and @ExpirationDate  {0}
) as t
GROUP BY t.CreateTime,t.UserID
) as t1
GROUP BY t1.CreateTime;
", fbd.ClientType > 0 ? " and PlatType=@ClientType" : "");

                IEnumerable <Festival515> i = cn.Query <Festival515>(str.ToString(), fbd);


                cn.Close();
                return(i);
            }
        }
Esempio n. 4
0
        internal static FestivalVIP GetFestivalVIP(FestivalBaseData fbd)
        {
            using (var cn = new MySqlConnection(sqlconnectionString))
            {
                cn.Open();

                StringBuilder str = new StringBuilder();

                IEnumerable <FestivalVIP> i = cn.Query <FestivalVIP>(@"" + database3 + @".sys_get_active_vip
", new { }, null, true, null, CommandType.StoredProcedure);


                cn.Close();
                return(i.FirstOrDefault());
            }
        }
Esempio n. 5
0
 public static FestivalVIP GetFestivalVIP(FestivalBaseData fbd)
 {
     return(DAL.QQZoneRechargeDAL.GetFestivalVIP(fbd));
 }
Esempio n. 6
0
 public static AllFesLogin GetFestivalLogin(FestivalBaseData fbd)
 {
     return(DAL.QQZoneRechargeDAL.GetFestivalLogin(fbd));
 }
Esempio n. 7
0
 public static IEnumerable <Festival515> GetFestival515(FestivalBaseData fbd)
 {
     return(DAL.QQZoneRechargeDAL.GetFestival515(fbd));
 }