Ejemplo n.º 1
0
        /// <summary>
        /// 分页获取销售商品信息
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public async Task <ResponsePagingBase> ProcessAction(GetSaleGoodsPageRequest request)
        {
            var shop = await _shopBll.GetShop(request.ShopId);

            if (shop == null)
            {
                return(new ResponsePagingBase().GetResponseError(StatusCode.Shop50001, "门店不存在"));
            }
            request.OrgId   = shop.OrgId;
            request.StockId = shop.StockId;
            var result = await _goodsBll.GetSaleGoodsPage(request);

            return(ResponsePagingBase.Success(await HandleQty(result.Item1.ToList(), shop.StockId), result.Item2));
        }