/// <summary> /// 统计商品信息 /// </summary> /// <param name="info"></param> /// <returns></returns> //public ActionResult CountGoodsInfo(CountGoodsRefer refer) //{ // refer.SearchDetail.GroupActivitySysNo = int.Parse(Request.QueryString["GroupActivitySysNo"]); // if ((refer.SearchDetail.GoodsId ?? 0) == 0) // { // refer.SearchDetail.GoodsId = int.Parse(Request.QueryString["GoodsId"]); // } // var result = BargainGroupConfigClient.Instance.CountGroupGoodsInfo(refer); // return View(result); //} public ActionResult CountGoodsInfo(GroupStructureListRefer refer) { ViewBag.ActivitySysNo = refer.SearchDetail.ActivitySysNo = int.Parse(Request.QueryString["GroupActivitySysNo"]); if ((refer.SearchDetail.GoodsSysNo ?? 0) == 0) { ViewBag.GoodsSysNo = refer.SearchDetail.GoodsSysNo = int.Parse(Request.QueryString["GoodsSysNo"]); } var result = BargainGroupConfigClient.Instance.GroupStructureList(refer); return(View(result)); }
/// <summary> /// 查询所有商品团列表 /// </summary> /// <param name="refer"></param> /// <returns></returns> public GroupStructureListRefer GroupStructureList(GroupStructureListRefer refer) { var where = ""; if (refer.SearchDetail.SysNo.HasValue) { where += (" and a.SysNo=" + refer.SearchDetail.SysNo); } if (refer.SearchDetail.GrouState >= 1) { where += (" and (CASE WHEN a.IsDelete='1' THEN 3 WHEN a.IsDelete='0' THEN CASE WHEN cangroupcount=b.SetCanGroupCount THEN 2 ELSE 1 end END) =" + refer.SearchDetail.GrouState); } if ((refer.SearchDetail.UserId ?? 0) > 0) { where += (" and a.UserId=" + refer.SearchDetail.UserId); } var result = new GroupStructureListRefer(); var search = refer.SearchDetail; var reqeust = new QueryGroupStructureList { ActivitySysNo = search.ActivitySysNo, GoodsSysNo = search.GoodsSysNo, Where = where, Order = " order by a.CreateTime desc", PageIndex = refer.PageIndex ?? 1, PageSize = 20 }; var response = MKMSClient.Send <QueryGroupStructureListResponse>(reqeust); if (response.DoFlag) { result.Total = response.Total; result.PageIndex = response.PageIndex; result.PageSize = response.PageSize; result.List = Mapper.MappGereric <QueryGroupStructureListDto, GroupStructureListSearchResult>(response.QueryGroupStructureListDtos); } return(result); }