Esempio n. 1
0
        /// <summary>
        /// 设置SKU库存
        /// </summary>
        /// <param name="shopBranchId"></param>
        /// <param name="skuIds"></param>
        /// <param name="stock"></param>
        /// <param name="opType"></param>
        public static void SetSkuStock(IEnumerable <string> skuIds, IEnumerable <int> stock, CommonModel.StockOpType opType)
        {
            switch (opType)
            {
            case StockOpType.Normal:
                _productService.SetSkusStock(skuIds, stock);
                break;

            case StockOpType.Add:
                _productService.AddSkuStock(skuIds, stock);
                break;

            case StockOpType.Reduce:
                _productService.ReduceSkuStock(skuIds, stock);
                break;
            }
        }