public JsonResult GetWXSmallProducts(int page, int rows, string keyWords, long?categoryId = null)
        {
            Himall.Model.ObsoletePageModel <Himall.Model.ProductInfo> datasql = _iWXSmallProgramService.GetWXSmallProducts(page, rows);

            IEnumerable <ProductModel> products = datasql.Models.ToArray().Select(item => new ProductModel()
            {
                name        = item.ProductName,
                brandName   = item.BrandName,
                id          = item.Id,
                imgUrl      = item.GetImage(ImageSize.Size_50),
                price       = item.MinSalePrice,
                state       = item.ShowProductState,
                productCode = item.ProductCode
            });
            DataGridModel <ProductModel> dataGrid = new DataGridModel <ProductModel>()
            {
                rows = products, total = datasql.Total
            };

            return(Json(dataGrid));
        }
        public JsonResult ProductLists(long?categoryId, string brandName, string productCode, int?auditStatus, string ids, int page, int rows, string keyWords, string shopName, int?saleStatus)
        {
            ProductBrokerageQuery query = new ProductBrokerageQuery()
            {
                CategoryId            = categoryId,
                PageNo                = page,
                PageSize              = rows,
                skey                  = keyWords,
                ProductIds            = ids,
                ProductBrokerageState = ProductBrokerageInfo.ProductBrokerageStatus.Normal,
                OnlyShowNormal        = true
            };

            Himall.Model.ObsoletePageModel <Himall.Model.ProductBrokerageInfo> datasql = _iDistributionService.GetDistributionProducts(query);

            IEnumerable <ProductModel> products = datasql.Models.ToArray().Select(item => new ProductModel()
            {
                name         = item.Product.ProductName,
                brandName    = item.Product.BrandName,
                categoryName = item.Product.CategoryNames,
                id           = item.Product.Id,
                imgUrl       = item.Product.GetImage(ImageSize.Size_50),
                price        = item.Product.MinSalePrice,
                state        = item.Product.ShowProductState,
                auditStatus  = (int)item.Product.AuditStatus,
                url          = "",
                auditReason  = item.Product.ProductDescriptionInfo != null ? item.Product.ProductDescriptionInfo.AuditReason : "",
                shopName     = "",
                saleStatus   = (int)item.Product.SaleStatus,
                productCode  = item.Product.ProductCode
            });
            DataGridModel <ProductModel> dataGrid = new DataGridModel <ProductModel>()
            {
                rows = products, total = datasql.Total
            };

            return(Json(dataGrid));
        }