李昊 4 years ago
parent
commit
7475419408

+ 18 - 0
gx_api/GxPress/Model/GxPress.Request/Navigation/MiddleLableRequest.cs

@@ -38,5 +38,23 @@ namespace GxPress.Request.Navigation
         /// <value></value>
 
         public int IsDisable { get; set; }
+        /// <summary>
+        /// 是否开启搜索
+        /// </summary>
+        /// <value></value>
+        
+        public int IsSearch { get; set; }
+        /// <summary>
+        /// 是否开启轮播
+        /// </summary>
+        /// <value></value>
+        
+        public int IsSlide { get; set; }
+        /// <summary>
+        /// 1 APP 2 首页频道  3首页精选
+        /// </summary>
+        /// <value></value>
+        
+        public int TypeId { get; set; }
     }
 }

+ 8 - 0
gx_api/GxPress/Repository/GxPress.Repository.Implement/Navigation/MiddleLableRepository.cs

@@ -58,8 +58,16 @@ namespace GxPress.Repository.Implement.Navigation
                     model.LabelId = request.LabelId;
                 if (!string.IsNullOrEmpty(request.Name))
                     model.Name = request.Name;
+                if (!string.IsNullOrEmpty(request.LabelId))
+                    model.LabelId = request.LabelId;
                 if (request.Sort > 0)
                     model.Sort = request.Sort;
+                if (request.IsSearch > 0)
+                    model.IsSearch = request.IsSearch == 1;
+                if (request.IsSlide > 0)
+                    model.IsSlide = request.IsSlide == 1;
+                if (request.TypeId > 0)
+                    model.TypeId = request.TypeId;
                 return await _repository.UpdateAsync(model);
             }
             return false;