zhupei il y a 4 ans
Parent
commit
e1f8db2d48

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

18
         /// <returns></returns>
18
         /// <returns></returns>
19
         public ActionResult GetList()
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
             foreach (var item in list)
23
             foreach (var item in list)
24
             {
24
             {
25
                 if (item.F_Type == 2)
25
                 if (item.F_Type == 2)

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

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