private void InitialBonusModel(BonusAjaxModel model, string name = "", int pageNo = 1)
        {
            var brandList = _iBonusService.Get(1, 1, name, pageNo, 10);
            int pageCount = TemplatePageHelper.GetPageCount(brandList.Total, 10);

            if (brandList != null)
            {
                model.status = 1;
                model.page   = TemplatePageHelper.GetPageHtml(pageCount, pageNo);
                InitialBonusContentModel(brandList.Models, model);
            }
        }
        private void InitialPhotoSpaceModel(PhotoSpaceAjaxModel model, ObsoletePageModel <PhotoSpaceInfo> photo, int pageNo = 1)
        {
            var list      = new List <photoContent>();
            int pageCount = TemplatePageHelper.GetPageCount(photo.Total, 24);

            model.page = TemplatePageHelper.GetPageHtml(pageCount, pageNo);
            foreach (var item in photo.Models)
            {
                list.Add(new photoContent
                {
                    file = Core.HimallIO.GetImagePath(item.PhotoPath),
                    id   = item.Id.ToString(),
                    name = item.PhotoName
                });
            }
            model.data = list;
        }
        private void InitialCateModel(TopicAjaxModel model, string name, int pageNo, long shopId)
        {
            var topicList = _iTopicService.GetTopics(new IServices.QueryModel.TopicQuery
            {
                PageNo       = pageNo,
                PageSize     = 10,
                ShopId       = shopId,
                PlatformType = Core.PlatformType.Mobile,
                Name         = name,
            });
            int pageCount = TemplatePageHelper.GetPageCount(topicList.Total, 10);

            if (topicList != null)
            {
                model.status = 1;
                model.page   = TemplatePageHelper.GetPageHtml(pageCount, pageNo);
                InitialCateContentModel(topicList.Models, model);
            }
        }
        private void InitialCateModel(TopicAjaxModel model, string name, int pageNo, long shopId)
        {
            TopicQuery topicQuery = new TopicQuery
            {
                PageNo       = pageNo,
                PageSize     = 10,
                ShopId       = shopId,
                PlatformType = PlatformType.Mobile,
                Name         = name
            };
            QueryPageModel <TopicInfo> topics = this._iTopicService.GetTopics(topicQuery);
            int pageCount = TemplatePageHelper.GetPageCount(topics.Total, 10);

            if (topics != null)
            {
                model.status = 1;
                model.page   = TemplatePageHelper.GetPageHtml(pageCount, pageNo);
                this.InitialCateContentModel(topics.Models, model);
            }
        }
        private void InitialLimitBuyModel(LimitBuyAjaxModel model, long shopId, string name = "", int pageNo = 1)
        {
            var limitBuyList = _iLimitTimeBuyService.GetAll(
                new IServices.QueryModel.FlashSaleQuery
            {
                ItemName           = name,
                ShopId             = shopId,
                PageNo             = pageNo,
                PageSize           = 10,
                AuditStatus        = Himall.Model.FlashSaleInfo.FlashSaleStatus.Ongoing,
                CheckProductStatus = true
            });
            int pageCount = TemplatePageHelper.GetPageCount(limitBuyList.Total, 10);

            if (limitBuyList != null)
            {
                model.status = 1;
                model.page   = TemplatePageHelper.GetPageHtml(pageCount, pageNo);
                InitialLimitBuyContentModel(limitBuyList.Models, model);
            }
        }
        private void InitialProductModel(ProductAjaxModel model, int status, string name, int pageNo, long shopId)
        {
            var productList = _iProductService.GetProducts(new IServices.QueryModel.ProductQuery
            {
                AuditStatus = new ProductInfo.ProductAuditStatus[] { (ProductInfo.ProductAuditStatus)status },
                KeyWords    = name,
                PageNo      = pageNo,
                PageSize    = 10,
                Sort        = "Id",
                IsAsc       = true,
                ShopId      = shopId
            });
            int pageCount = TemplatePageHelper.GetPageCount(productList.Total, 10);

            if (productList != null)
            {
                model.status = 1;
                model.page   = TemplatePageHelper.GetPageHtml(pageCount, pageNo);
                InitialProductContentModel(productList.Models, model);
            }
        }
        private void InitialCouponsModel(CouponsAjaxModel model, long shopId, string name = "", int pageNo = 1)
        {
            var couponsList = _iCouponService.GetCouponList(new
                                                            Himall.IServices.QueryModel.CouponQuery
            {
                CouponName       = name,
                ShopId           = shopId,
                IsOnlyShowNormal = true,
                IsShowAll        = false,
                ShowPlatform     = Himall.Core.PlatformType.Wap,
                PageNo           = pageNo,
                PageSize         = 10
            });
            int pageCount = TemplatePageHelper.GetPageCount(couponsList.Total, 10);

            if (couponsList != null)
            {
                model.status = 1;
                model.page   = TemplatePageHelper.GetPageHtml(pageCount, pageNo);
                InitialCouponsContentModel(couponsList.Models, model);
            }
        }