|
@@ -3,8 +3,10 @@ using System.Threading.Tasks;
|
|
using AutoMapper;
|
|
using AutoMapper;
|
|
using Datory;
|
|
using Datory;
|
|
using GxPress.Common.AppOptions;
|
|
using GxPress.Common.AppOptions;
|
|
|
|
+using GxPress.Common.Page;
|
|
using GxPress.Common.Tools;
|
|
using GxPress.Common.Tools;
|
|
using GxPress.Repository.Interface.SpecialLabel;
|
|
using GxPress.Repository.Interface.SpecialLabel;
|
|
|
|
+using GxPress.Request.SpecialLabel;
|
|
using Microsoft.Extensions.Options;
|
|
using Microsoft.Extensions.Options;
|
|
|
|
|
|
namespace GxPress.Repository.Implement.SpecialLabel
|
|
namespace GxPress.Repository.Implement.SpecialLabel
|
|
@@ -87,5 +89,23 @@ namespace GxPress.Repository.Implement.SpecialLabel
|
|
query.OrderByDesc(nameof(Entity.SystemLabel.SpecialLabel.Sort)).Take(8);
|
|
query.OrderByDesc(nameof(Entity.SystemLabel.SpecialLabel.Sort)).Take(8);
|
|
return await _repository.GetAllAsync(query);
|
|
return await _repository.GetAllAsync(query);
|
|
}
|
|
}
|
|
|
|
+ /// <summary>
|
|
|
|
+ ///特使标签数据
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="typeValue"></param>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ public async Task<PagedList<Entity.SystemLabel.SpecialLabel>> GetAllAsync(SpecialLabelSearchRequest request)
|
|
|
|
+ {
|
|
|
|
+ var result = new PagedList<Entity.SystemLabel.SpecialLabel>();
|
|
|
|
+ var query = Q.NewQuery();
|
|
|
|
+ if (request.TypeValue > 0)
|
|
|
|
+ query.Where(nameof(Entity.SystemLabel.SpecialLabel.TypeValue), request.TypeValue);
|
|
|
|
+ if (!string.IsNullOrEmpty(request.KeyWord))
|
|
|
|
+ query.WhereLike(nameof(Entity.SystemLabel.SpecialLabel.Title), $"%{request.KeyWord}%");
|
|
|
|
+ result.Total = await _repository.CountAsync(query);
|
|
|
|
+ query.OrderByDesc(nameof(Entity.SystemLabel.SpecialLabel.Sort));
|
|
|
|
+ result.Items = await _repository.GetAllAsync(query);
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|