From a5851a4e906725b868bcfdaa8c59249523137586 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期二, 29 十月 2024 14:03:47 +0800
Subject: [PATCH] Merge branch 'master' of http://47.108.235.38:8080/r/baifenbaishop

---
 CoreCms.Net.Web.Admin/Controllers/Stock/CoreCmsStockController.cs |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/CoreCms.Net.Web.Admin/Controllers/Stock/CoreCmsStockController.cs b/CoreCms.Net.Web.Admin/Controllers/Stock/CoreCmsStockController.cs
index fb528b9..f641727 100644
--- a/CoreCms.Net.Web.Admin/Controllers/Stock/CoreCmsStockController.cs
+++ b/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 == "鏍″洯浠g悊", p => p.createTime, OrderByType.Desc, true, true);
 
             jm.data = new
             {

--
Gitblit v1.9.1