/// <summary> /// 优惠劵显示列表 /// </summary> /// <returns></returns> public ActionResult OtherCoupons() { var conConditon = new OtherCouponCategorySearchCondition { // ClassId = classId, OrderBy = EnumOtherCouponCategorySearchOrderBy.OrderById }; var list = _otherCouponCategoryService.GetCouponCategoriesByCondition(conConditon).Select(p => new { p.Id, p.BrandId, p.Name, p.ReMark, p.Price, p.Count }).ToList().Select(pp => new CouponCategoryModel { Id = pp.Id, Name = pp.Name, Price = pp.Price, Count = pp.Count, ReMark = pp.ReMark, BrandId = pp.BrandId, BrandImg = _productBrandService.GetProductBrandById(pp.BrandId).Bimg, SubTitle = _productBrandService.GetProductBrandById(pp.BrandId).SubTitle, ProductParamater = _productBrandService.GetProductBrandById(pp.BrandId).ParameterEntities.ToDictionary(k => k.Parametername, v => v.Parametervaule) }); return(View(list)); }
public HttpResponseMessage Index(int page, int pageSize, string name = null) { var condition = new OtherCouponCategorySearchCondition { Name = name, Page = page, PageSize = pageSize, OrderBy = EnumOtherCouponCategorySearchOrderBy.OrderById }; var couponCategory = _otherCouponCategoryService.GetCouponCategoriesByCondition(condition).Select(p => new { p.Id, p.Name, p.Count, p.Price, p.ReMark }).ToList(); var count = _otherCouponCategoryService.GetCouponCategoriesCountByCondition(condition); return(PageHelper.toJson(new { List = couponCategory, TotalCount = count, Condition = condition })); }