From 80563aa6ff88d3ea140b069af087ef8d4dbfcd0b Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期二, 02 四月 2024 13:26:35 +0800 Subject: [PATCH] 审批 --- CoreCms.Net.Services/Shop/CoreCmsPagesServices.cs | 27 ++++++++++++++++++++------- 1 files changed, 20 insertions(+), 7 deletions(-) diff --git a/CoreCms.Net.Services/Shop/CoreCmsPagesServices.cs b/CoreCms.Net.Services/Shop/CoreCmsPagesServices.cs index ac11b32..c7a4a3d 100644 --- a/CoreCms.Net.Services/Shop/CoreCmsPagesServices.cs +++ b/CoreCms.Net.Services/Shop/CoreCmsPagesServices.cs @@ -1,10 +1,10 @@ /*********************************************************************** - * Project: CoreCms - * ProjectName: 鏍稿績鍐呭绠$悊绯荤粺 - * Web: https://www.corecms.net - * Author: 澶х伆鐏� - * Email: jianweie@163.com - * CreateTime: 2021/1/31 21:45:10 + * Project: baifenBinfa + * ProjectName: 鐧惧垎鍏垫硶绠$悊绯荤粺 + * Web: http://chuanyin.com + * Author: + * Email: + * CreateTime: 202403/02 * Description: 鏆傛棤 ***********************************************************************/ @@ -370,7 +370,11 @@ } case "goods": { + var parameters = (JObject)JsonConvert.DeserializeObject(item.parameters); + + + var where = PredicateBuilder.True<GoodListDTO>(); if (parameters != null && parameters.ContainsKey("type") && parameters["type"].ToString() == "auto") { @@ -380,6 +384,15 @@ var classifyId = parameters["classifyId"].ObjectToInt(0); var gc = await _goodsCategoryServices.GetCaChe(); var childCats = gc.Where(p => p.parentId == classifyId).ToList(); + //鑾峰彇褰撳墠閰嶇疆鐨勫晢鍝佸垎绫� + var tgc = gc.Where(x => x.id == classifyId).FirstOrDefault(); + + //缁欒繑鍥炲弬鏁板鍔爇ey + if(!string.IsNullOrEmpty(tgc?.key)) + + //澧炲姞鍟嗗搧鍒嗙被鐨刱ey + parameters.Add("key",tgc?.key??"" ); + var catIds = childCats != null && childCats.Any() ? childCats.Select(p => p.id).ToList() : new List<int>(); @@ -417,7 +430,7 @@ } limit = limit > 0 ? limit : 10; - var goods = await _goodsServices.QueryListByComponentsAsync(where, limit, " sort desc,id desc ", true, true, 60); + var goods = await _goodsServices.QueryListByComponentsAsync(where, limit, " sort asc,id asc ", true, true, 60); if (goods != null && goods.Any()) { var result = JArray.FromObject(goods); -- Gitblit v1.9.1