Example #1
0
        /// <summary>
        /// 创建前台页面访问日志
        /// </summary>
        /// <param name="accessLogEntity"></param>
        private void InsertAccessLog(AccessLogEntity entity)
        {
            entity = InitAccessLog(entity, true);
            AccessLogApp accessLogApp = new AccessLogApp();

            accessLogApp.Createlog(entity);
        }
Example #2
0
        //[ValidateAntiForgeryToken]
        public ActionResult GetAccessDayDates()
        {
            DateTime EndDate   = DateTime.Now.Date;
            DateTime StartDate = DateTime.Now.AddMonths(-1).Date;
            //日期坐标集合
            List <string> days = GetDayList(StartDate, EndDate);

            AccessLogApp           accessLogApp = new AccessLogApp();
            List <AccessLogEntity> models       = accessLogApp.GetListByDate(Base_WebSiteId, StartDate, EndDate);
            //总访问量集合
            List <string> allDatas = GetAllDatas(models, StartDate, EndDate);
            //老客户访问量集合
            List <string> oldDatas = GetOldDatas(models, StartDate, EndDate);
            //新客户访问量集合
            List <string> newDatas = GetNewDatas(allDatas, oldDatas);

            var jsons = new { xAxisdata = days, allDatas = allDatas, newDatas = newDatas, oldDatas = oldDatas };

            return(Json(jsons));
        }