From 93312a2ec05d15d46ad8f24f723b55e8ac599888 Mon Sep 17 00:00:00 2001 From: duhe <226547893@qq.com> Date: 星期一, 28 七月 2025 10:20:35 +0800 Subject: [PATCH] 自定义菜单:当用户自定义与角色自定义不存在时,增加admin自定义 --- WebAPI/Controllers/WebAPIController.cs | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs index 46da9e7..59c4246 100644 --- a/WebAPI/Controllers/WebAPIController.cs +++ b/WebAPI/Controllers/WebAPIController.cs @@ -21126,8 +21126,14 @@ ds = oCn.RunProcReturn(sql1, "Gy_MenuDefineSet"); //鏌ヨ鐢ㄦ埛缁戝畾鐨勮鑹� 鏄惁璁剧疆鑿滃崟淇℃伅 鍙栬鑹插悕绉版渶鐭殑涓�涓� if ((ds.Tables[0] == null || ds.Tables[0].Rows.Count == 0)) { - sql = "Select HitemID,HNumber,HName,HPartentID,HLevel,Hurl,HShowMode,isnull(HTranslationText_English,HName) HTranslationText_English,isnull(HTranslationText_Spain,HName) HTranslationText_Spain,HPicNum from Gy_Menu_1 where HType = '" + HType + "' Order by HPosition,len(HitemID),HitemID "; - ds = oCn.RunProcReturn(sql, "Gy_Menu_1"); + sql1 = "select HItemID,HPartentID,HNumber,HName,HLevel,Hurl,HType,HPicNum,HShowMode,isnull(HTranslationText_English,HName) HTranslationText_English,isnull(HTranslationText_Spain,HName) HTranslationText_Spain from Gy_MenuDefineSet where HMakeName = 'admin' and HType = '" + HType + "' order by HPosition"; + ds = oCn.RunProcReturn(sql1, "Gy_MenuDefineSet"); //鏌ヨadmin 鏄惁璁剧疆鑿滃崟淇℃伅 + if ((ds.Tables[0] == null || ds.Tables[0].Rows.Count == 0)) + { + sql = "Select HitemID,HNumber,HName,HPartentID,HLevel,Hurl,HShowMode,isnull(HTranslationText_English,HName) HTranslationText_English,isnull(HTranslationText_Spain,HName) HTranslationText_Spain,HPicNum from Gy_Menu_1 where HType = '" + HType + "' Order by HPosition,len(HitemID),HitemID "; + ds = oCn.RunProcReturn(sql, "Gy_Menu_1"); + } + } } -- Gitblit v1.9.1