zhupei 4 years ago
parent
commit
e1f8db2d48

+ 2 - 2
RMYY_CallCenter_Api/Controllers/System/MenuController.cs

@@ -18,8 +18,8 @@ namespace RMYY_CallCenter_Api.Controllers.System
18 18
         /// <returns></returns>
19 19
         public ActionResult GetList()
20 20
         {
21
-            List<Model.T_Sys_Menu> list =menuBLL.GetModelList(" F_State=1 and (F_Type=1 or F_Type=2) ");
22
-            List<Model.T_Sys_Menu> listitem = menuBLL.GetModelList(" F_ParentId in (select F_MenuId from T_Sys_Menu where F_Type=2 group by F_MenuId ) and F_State=1 ");
21
+            List<Model.T_Sys_Menu> list =menuBLL.GetModelList("(F_Type=1 or F_Type=2) ");
22
+            List<Model.T_Sys_Menu> listitem = menuBLL.GetModelList(" F_ParentId in (select F_MenuId from T_Sys_Menu where F_Type=2 group by F_MenuId )");
23 23
             foreach (var item in list)
24 24
             {
25 25
                 if (item.F_Type == 2)

+ 5 - 2
RMYY_CallCenter_Api/Controllers/System/RoleController.cs

@@ -18,7 +18,6 @@ namespace RMYY_CallCenter_Api.Controllers.System
18 18
         /// 获取分页列表
19 19
         /// </summary>
20 20
         /// <returns></returns>
21
-        [HttpPost]
22 21
         public ActionResult GetList()
23 22
         {
24 23
             DataTable dt = new DataTable();
@@ -215,9 +214,13 @@ namespace RMYY_CallCenter_Api.Controllers.System
215 214
         /// </summary>
216 215
         /// <param name="roleid"></param>
217 216
         /// <returns></returns>
218
-        public ActionResult GetRoleFunction(int roleid)
217
+        public ActionResult GetRoleFunction(int roleid=0)
219 218
         {
220 219
             var moduleFList = new Bll.T_Sys_Menu().GetModelList(" F_State=1 ");
220
+            if (roleid == 0)
221
+            {
222
+                return Error("参数错误!");
223
+            }
221 224
             var list = DB.DbHelperSQL.Query("select F_MenuId from T_Sys_RoleMenu with(nolock) where F_RoleId=" + roleid).Tables[0];
222 225
 
223 226
             return Success("加载成功", moduleFList.Select(x => new