李昊 4 gadi atpakaļ
vecāks
revīzija
2223070b34

+ 2 - 2
gx_api/GxPress/Repository/GxPress.Repository.Implement/SpecialLabel/SpecialLabelRepository.cs

@@ -84,11 +84,11 @@ namespace GxPress.Repository.Implement.SpecialLabel
         /// </summary>
         /// <param name="typeValue"></param>
         /// <returns></returns>
-        public async Task<IEnumerable<Entity.SystemLabel.SpecialLabel>> GetAllAsync(int typeValue)
+        public async Task<IEnumerable<Entity.SystemLabel.SpecialLabel>> GetAllAsync(int typeValue,int pageSize=10)
         {
             var query = Q.NewQuery();
             query.Where(nameof(Entity.SystemLabel.SpecialLabel.TypeValue), typeValue);
-            query.OrderByDesc(nameof(Entity.SystemLabel.SpecialLabel.Sort)).Take(8);
+            query.OrderByDesc(nameof(Entity.SystemLabel.SpecialLabel.Sort)).Take(pageSize);
             return await _repository.GetAllAsync(query);
         }
         /// <summary>

+ 1 - 1
gx_api/GxPress/Repository/GxPress.Repository.Interface/SpecialLabel/ISpecialLabelRepository.cs

@@ -37,7 +37,7 @@ namespace GxPress.Repository.Interface.SpecialLabel
         /// </summary>
         /// <param name="typeValue"></param>
         /// <returns></returns>
-        Task<IEnumerable<Entity.SystemLabel.SpecialLabel>> GetAllAsync(int typeValue);
+        Task<IEnumerable<Entity.SystemLabel.SpecialLabel>> GetAllAsync(int typeValue,int pageSize=10);
         /// <summary>
         ///特使标签数据
         /// </summary>

+ 1 - 1
gx_api/GxPress/Service/GxPress.Service.Implement/Navigation/NavigationService.cs

@@ -172,7 +172,7 @@ namespace GxPress.Service.Implement.Navigation
                 {
                     //获取特殊
                     navigationLabelMediaResult.IsSpecial = true;
-                    navigationLabelMediaResult.SpecialLabelResults = await specialLabelRepository.GetAllAsync(item.ResourceType);
+                    navigationLabelMediaResult.SpecialLabelResults = await specialLabelRepository.GetAllAsync(item.ResourceType,item.PageSize);
                     foreach (var specialLabelResult in navigationLabelMediaResult.SpecialLabelResults)
                         specialLabelResult.ImageUrls = StringUtils.AddDomain(specialLabelResult.ImageUrls);
                     result.NavigationLabelMediaResults.Add(navigationLabelMediaResult);