username@email.com
2024-06-27 3fc58aef2f6f47c4a356df23479e3becca630177
CoreCms.Net.Web.Admin/Controllers/Stock/CoreCmsStockController.cs
@@ -56,13 +56,15 @@
        private readonly ICoreCmsDistributionServices _coreCmsDistributionServices;
        private readonly ICoreCmsAreaServices _coreCmsAreaServices;
        private readonly ICoreCmsGoodsCategoryServices _coreCmsGoodsCategoryServices;
        /// <summary>
        /// 构造函数
        ///</summary>
        public CoreCmsStockController(IWebHostEnvironment webHostEnvironment
            , ICoreCmsStockServices stockServices, ICoreCmsProductsServices productsServices, IHttpContextUser user, ICoreCmsStockLogServices stockLogServices, ISysUserServices sysUserServices
            , ICoreCmsDistributionServices coreCmsDistributionServices
            , ICoreCmsAreaServices coreCmsAreaServices)
            , ICoreCmsAreaServices coreCmsAreaServices
            , ICoreCmsGoodsCategoryServices coreCmsGoodsCategoryServices)
        {
            _webHostEnvironment = webHostEnvironment;
            _stockServices = stockServices;
@@ -72,6 +74,7 @@
            _sysUserServices = sysUserServices;
            _coreCmsDistributionServices = coreCmsDistributionServices;
            _coreCmsAreaServices = coreCmsAreaServices;
            _coreCmsGoodsCategoryServices = coreCmsGoodsCategoryServices;
        }
        #region 获取列表============================================================
@@ -176,16 +179,20 @@
        /// <returns></returns>
        [HttpPost]
        [Description("首页数据")]
        public AdminUiCallBack GetIndex()
        public async Task<AdminUiCallBack> GetIndex()
        {
            //返回数据
            var jm = new AdminUiCallBack { code = 0 };
            var stockType = EnumHelper.EnumToList<GlobalEnumVars.StockType>();
            stockType = stockType.Where(p => p.value < 3).ToList();
            var categories = await _coreCmsGoodsCategoryServices.QueryListByClauseAsync(p => p.isShow, p => p.sort, OrderByType.Asc, true, true);
            var categoriesTree = GoodsHelper.GetTree(categories, false);
            jm.data = new
            {
                stockType,
                stockType
            };
            return jm;
        }
@@ -208,7 +215,7 @@
            var products = await _productsServices.GetProducts();
            var distributions = await _coreCmsDistributionServices.QueryListByClauseAsync(p => p.isDelete == false && p.verifyStatus == 1, p => p.createTime, OrderByType.Desc, true, true);
            var distributions = await _coreCmsDistributionServices.QueryListByClauseAsync(p => p.isDelete == false && p.verifyStatus == 1 && p.profession == "校园代理", p => p.createTime, OrderByType.Desc, true, true);
            jm.data = new
            {