Przeglądaj źródła

Merge branch 'master' of http://192.168.1.222:3000/zhengbingbing/ZLJ_API_V6.0

zhangkun 5 lat temu
rodzic
commit
4812dfc008

+ 12 - 7
代码/System.Common/Web/TreeQuery.cs

@@ -15,19 +15,24 @@ namespace System.Common
15 15
             foreach (T entity in locateList)
16 16
             {
17 17
                 treeList.Add(entity);
18
-                string pId = entity.GetType().GetProperty(parentId).GetValue(entity, null).ToString();
18
+                int pid = int.Parse(entity.GetType().GetProperty(parentId).GetValue(entity, null).ToString());
19
+                //string pId = entity.GetType().GetProperty(parentId).GetValue(entity, null).ToString();
19 20
                 while (true)
20 21
                 {
21
-                    if (string.IsNullOrEmpty(pId) && pId == "0")
22
-                    {
23
-                        break;
24
-                    }
25
-                    Predicate<T> upLambda = (Expression.Equal(parameter.Property(keyValue), Expression.Constant(pId))).ToLambda<Predicate<T>>(parameter).Compile();
22
+                    if(pid<=0)
23
+                    { break; }
24
+                    //if (string.IsNullOrEmpty(pId) && pId == "0")
25
+                    //{
26
+                    //    break;
27
+                    //}
28
+                    //Predicate<T> upLambda = (Expression.Equal(parameter.Property(keyValue), Expression.Constant(pId))).ToLambda<Predicate<T>>(parameter).Compile();
29
+                    Predicate<T> upLambda = (Expression.Equal(parameter.Property(keyValue), Expression.Constant(pid))).ToLambda<Predicate<T>>(parameter).Compile();
26 30
                     T upRecord = entityList.Find(upLambda);
27 31
                     if (upRecord != null)
28 32
                     {
29 33
                         treeList.Add(upRecord);
30
-                        pId = upRecord.GetType().GetProperty(parentId).GetValue(upRecord, null).ToString();
34
+                        //pId = upRecord.GetType().GetProperty(parentId).GetValue(upRecord, null).ToString();
35
+                        pid = int.Parse(upRecord.GetType().GetProperty(parentId).GetValue(upRecord, null).ToString());
31 36
                     }
32 37
                     else
33 38
                     {

+ 1 - 1
代码/System.Model/T_Sys_ModuleInfo.cs

@@ -48,7 +48,7 @@ namespace System.Model
48 48
         /// <summary>
49 49
         /// 是否菜单
50 50
         /// </summary>
51
-        public int? F_IsMenu { get; set; }
51
+        public int? F_IsMenu { get; set; } = 1;
52 52
         /// <summary>
53 53
         /// 目标
54 54
         /// </summary>

+ 6 - 6
代码/TVShoppingCallCenter_ZLJ/Controllers/System/ModuleInfoController.cs

@@ -28,7 +28,7 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.System
28 28
         /// 返回树形下拉框 菜单数据 
29 29
         /// </summary>
30 30
         /// <returns></returns>
31
-        [HttpGet]
31
+        [HttpGet("getall")]
32 32
         public async Task<IActionResult> GetALL()
33 33
         {
34 34
             var list_ModuleInfo = await _sys_moduleinfoRepository.GetListALL(x => x.F_State == (int)EnumDelState.Enabled, o => o.F_Sort, SqlSugar.OrderByType.Asc);
@@ -80,7 +80,7 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.System
80 80
         /// </summary>
81 81
         /// <param name="mid"></param>
82 82
         /// <returns></returns>
83
-        [HttpGet]
83
+        [HttpGet("getmodule")]
84 84
         public async Task<IActionResult> GetModule(int mid)
85 85
         {
86 86
             var entity_ModuleInfo = await _sys_moduleinfoRepository.GetSingle(x=>x.F_Id==mid);
@@ -105,11 +105,11 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.System
105 105
         }
106 106
 
107 107
         /// <summary>
108
-        /// 添加按钮
108
+        /// 添加菜单
109 109
         /// </summary>
110 110
         /// <param name="input"></param>
111 111
         /// <returns></returns>
112
-        [HttpPost]
112
+        [HttpPost("addmodule")]
113 113
         public async Task<IActionResult> AddModule(ModuleInfoInput input)
114 114
         {
115 115
             if (string.IsNullOrEmpty(input.name))
@@ -146,7 +146,7 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.System
146 146
         /// </summary>
147 147
         /// <param name="ids"></param>
148 148
         /// <returns></returns>
149
-        [HttpPost]
149
+        [HttpPost("delmodule")]
150 150
         public async Task<IActionResult> DelModule(int[] ids)
151 151
         {
152 152
             if (ids != null && ids.Length > 0)
@@ -181,7 +181,7 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.System
181 181
         /// </summary>
182 182
         /// <param name="input"></param>
183 183
         /// <returns></returns>
184
-        [HttpPost]
184
+        [HttpPost("editmodule")]
185 185
         public async Task<IActionResult> EditModule(ModuleInfoInput input)
186 186
         {
187 187
             if (string.IsNullOrEmpty(input.name))

+ 1 - 1
代码/TVShoppingCallCenter_ZLJ/Controllers/System/RoleFunctionController.cs

@@ -96,7 +96,7 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.System
96 96
                         continue;
97 97
                     }
98 98
                 }
99
-
99
+                var count= roleFunctionlist.Count(t => t.F_FunctionId == item.F_Id && t.F_FunctionType == (int)EnumRoleControlType.Moudle);
100 100
 
101 101
 
102 102
                 Models.Dtos.RoleFDto tree = new Models.Dtos.RoleFDto();