李昊 лет назад: 4
Родитель
Сommit
ca49897792

+ 1 - 1
gx_api/GxPress/Model/GxPress.Entity/Admin.cs

@@ -70,7 +70,7 @@ namespace GxPress.Entity
         /// </summary>
         /// <value></value>
         [DataColumn]
-        public int Ip { get; set; }
+        public string Ip { get; set; }
         /// <summary>
         /// 登陆时间
         /// </summary>

+ 1 - 1
gx_api/GxPress/Model/GxPress.Request/Admin/AdminSignInRequest.cs

@@ -31,7 +31,7 @@ namespace GxPress.Request.Admin
         /// 登陆ID
         /// </summary>
         /// <value></value>
-        public int Ip { get; set; }
+        public string Ip { get; set; }
         /// <summary>
         /// 登陆时间
         /// </summary>

+ 1 - 1
gx_api/GxPress/Model/GxPress.Result/Admin/AdminPageResult.cs

@@ -60,7 +60,7 @@ namespace GxPress.Result.Admin
         /// 登陆ID
         /// </summary>
         /// <value></value>
-        public int Ip { get; set; }
+        public string Ip { get; set; }
         /// <summary>
         /// 登陆时间
         /// </summary>

+ 3 - 6
gx_api/GxPress/Service/GxPress.Service.Implement/Role/RoleService.cs

@@ -207,13 +207,10 @@ namespace GxPress.Service.Implement.Role
         {
             //获取
             var models = await systemRoleMenusRepository.GetAllAsync(roleId);
-            var item = await menusRepository.GetAllAsync(models.Select(n => n.Id).ToList());
+            var item = await menusRepository.GetAllAsync(models.Select(n => n.MenuId).ToList());
             var result = new List<MenuInResult>();
-            result = item.Where(n => n.ParentId == 0).Select(n => _mapper.Map<MenuInResult>(n)).ToList();
-            foreach (var request in result)
-            {
-                request.Children = item.Where(n => n.ParentId == request.Id).Select(n => _mapper.Map<MenuInResult>(n)).ToList();
-            }
+            result = item.Select(n=>_mapper.Map<MenuInResult>(n)).ToList();
+           
             return result;
         }