//会用到两个API public ActionResult QueryList() { AppGetProductInfoListArgs args = RequestArgs <AppGetProductInfoListArgs>(); args.status = 1; args.OrderBy = "create_date_time ASC"; GetListDataArgs contractArgs = TransferAppGetListJsonArgsToGetListArgs.ToGetListDataArgs(args); contractArgs.Parameters.Add("stock", true); //只查有库存的 GetListDataResult <Product_Info> productList = _productManager.GetProductList(contractArgs); AppGetListDataResult <ProductInfoAppDto> result = new AppGetListDataResult <ProductInfoAppDto>(); result.pageNo = productList.PagingInfo.CurrentPage; result.pageCount = productList.PagingInfo.PageSize; result.totalPage = productList.PagingInfo.TotalPage; result.totalRecord = productList.PagingInfo.TotalCount; result.objectList = Mapper.Map <List <Product_Info>, List <ProductInfoAppDto> >(productList.Data); TranscationAppNeedProductInfo(result, args); return(DataResult(result)); }
// GET: AppApi/Rebate public ActionResult QueryPoint() { AppGetOrderRebateListArgs args = RequestArgs <AppGetOrderRebateListArgs>(); if (args == null) { return(FailedResult("参数无效。")); } args.OrderBy = " rebate_time DESC"; args.distributeId = this.UserContext.UserId; GetListDataArgs contractArgs = TransferAppGetListJsonArgsToGetListArgs.ToGetListDataArgs(args); GetListDataResult <Order_Rebate_New> rebateList = _orderManager.GetOrderRebateList(contractArgs); AppGetListDataResult <OrderRebateAppDto> result = new AppGetListDataResult <OrderRebateAppDto>(); result.pageNo = rebateList.PagingInfo.CurrentPage; result.pageCount = rebateList.PagingInfo.PageSize; result.totalPage = rebateList.PagingInfo.TotalPage; result.totalRecord = rebateList.PagingInfo.TotalCount; result.objectList = Mapper.Map <List <Order_Rebate_New>, List <OrderRebateAppDto> >(rebateList.Data); return(DataResult(result)); }
// GET: AppApi/Order public ActionResult QueryPage() { AppGetProductOrderMasterListArgs args = RequestArgs <AppGetProductOrderMasterListArgs>(); if (args == null) { return(FailedResult("参数无效。")); } args.OrderBy = "order_date_time DESC"; args.PersonIdNo = UserContext.UserId; GetListDataArgs contractArgs = TransferAppGetListJsonArgsToGetListArgs.ToGetListDataArgs(args); GetListDataResult <Product_Order_Master> productList = _orderManager.GetOrderList(contractArgs); AppGetListDataResult <ProductOrderMasterAppDto> result = new AppGetListDataResult <ProductOrderMasterAppDto>(); result.pageNo = productList.PagingInfo.CurrentPage; result.pageCount = productList.PagingInfo.PageSize; result.totalPage = productList.PagingInfo.TotalPage; result.totalRecord = productList.PagingInfo.TotalCount; result.objectList = Mapper.Map <List <Product_Order_Master>, List <ProductOrderMasterAppDto> >(productList.Data); return(DataResult(result)); }
// GET: AppApi/MicroClassGroup public ActionResult QueryMicroGroup() { AppGetMicroClassGroupListArgs args = RequestArgs <AppGetMicroClassGroupListArgs>(); if (args == null) { return(FailedResult("参数无效。")); } if (string.IsNullOrEmpty(args.OrderBy)) { args.OrderBy = "Create_Time DESC"; } GetListDataArgs contractArgs = TransferAppGetListJsonArgsToGetListArgs.ToGetListDataArgs(args); GetListDataResult <Micro_Class_Group> microClassGroupList = _microClassManager.GetMicroClassGroupList(contractArgs); AppGetListDataResult <MicroClassGroupAppDto> result = new AppGetListDataResult <MicroClassGroupAppDto>(); result.pageNo = microClassGroupList.PagingInfo.CurrentPage; result.pageCount = microClassGroupList.PagingInfo.PageSize; result.totalPage = microClassGroupList.PagingInfo.TotalPage; result.totalRecord = microClassGroupList.PagingInfo.TotalCount; result.objectList = Mapper.Map <List <Micro_Class_Group>, List <MicroClassGroupAppDto> >(microClassGroupList.Data); return(DataResult(result)); }
//获取我的优惠券 public ActionResult queryPage() { AppGetMemberCouponAccountListArgs args = RequestArgs <AppGetMemberCouponAccountListArgs>(); if (args == null) { return(FailedResult("参数无效。")); } args.MemberId = this.UserContext.Member.id; args.IsUse = 0; args.OrderBy = "create_time DESC"; if (args.OrderByType == 1) { args.OrderBy = "create_time ASC"; } GetListDataArgs contractArgs = TransferAppGetListJsonArgsToGetListArgs.ToGetListDataArgs(args); //查询符合条件的优惠券集合 GetListDataResult <Member_Coupon_Account> memberCouponList = _couponManager.GetMemberCouponList(contractArgs); AppGetListDataResult <MemberCouponAccountAppDto> result = new AppGetListDataResult <MemberCouponAccountAppDto>(); result.pageNo = memberCouponList.PagingInfo.CurrentPage; result.pageCount = memberCouponList.PagingInfo.PageSize; result.totalPage = memberCouponList.PagingInfo.TotalPage; result.totalRecord = memberCouponList.PagingInfo.TotalCount; result.objectList = Mapper.Map <List <Member_Coupon_Account>, List <MemberCouponAccountAppDto> >(memberCouponList.Data); return(DataResult(result)); }
// GET: AppApi/ProductInfo public ActionResult QueryPage() { AppGetProductInfoListArgs args = RequestArgs <AppGetProductInfoListArgs>(); if (args == null) { return(FailedResult("参数无效。")); } args.OrderBy = "serial_no ASC"; if (args.orderByType == 1) { args.OrderBy = "cost_price ASC"; } if (args.orderByType == 2) { args.OrderBy = "cost_price DESC"; } if (args.orderByType == 3) { args.OrderBy = "sales_num ASC"; } if (args.orderByType == 4) { args.OrderBy = "sales_num DESC"; } if (args.orderByType == 5) { args.OrderBy = "create_date_time DESC"; } args.status = 1; args.memberType = UserContext.Member.type; GetListDataArgs contractArgs = TransferAppGetListJsonArgsToGetListArgs.ToGetListDataArgs(args); contractArgs.Parameters.Add("stock", true); //只查有库存的 GetListDataResult <Product_Info> productList = _productManager.GetProductList(contractArgs); AppGetListDataResult <ProductInfoAppDto> result = new AppGetListDataResult <ProductInfoAppDto>(); result.pageNo = productList.PagingInfo.CurrentPage; result.pageCount = productList.PagingInfo.PageSize; result.totalPage = productList.PagingInfo.TotalPage; result.totalRecord = productList.PagingInfo.TotalCount; result.objectList = Mapper.Map <List <Product_Info>, List <ProductInfoAppDto> >(productList.Data); TranscationAppNeedProductInfo(result, args); return(DataResult(result)); }