diff --git a/Myshipping.Application/Service/BookingLabel/BookingLabelService.cs b/Myshipping.Application/Service/BookingLabel/BookingLabelService.cs
index 011c24de..3f35b6cd 100644
--- a/Myshipping.Application/Service/BookingLabel/BookingLabelService.cs
+++ b/Myshipping.Application/Service/BookingLabel/BookingLabelService.cs
@@ -94,6 +94,20 @@ namespace Myshipping.Application
: cacheList.Where(x => x.Scope == scope).ToList();
return result;
}
+ ///
+ /// 分页获取全部或指定范围类型的标签列表
+ ///
+ [HttpPost("/BookingLabel/PageList")]
+ public async Task> PageList(BookingLabelPageListInput input)
+ {
+ var list = await _rep.AsQueryable()
+ .WhereIF(!string.IsNullOrEmpty(input.Name), x => x.Name.Contains(input.Name))
+ .WhereIF(input.Scope != null, x => x.Scope == input.Scope)
+ .ToPagedListAsync(input.PageNo, input.PageSize);
+
+ var result = list.Adapt>();
+ return result;
+ }
///
/// 新增或修改标签信息
diff --git a/Myshipping.Application/Service/BookingLabel/Dto/BookingLabelBaseDto.cs b/Myshipping.Application/Service/BookingLabel/Dto/BookingLabelBaseDto.cs
index 88af57a9..875c0291 100644
--- a/Myshipping.Application/Service/BookingLabel/Dto/BookingLabelBaseDto.cs
+++ b/Myshipping.Application/Service/BookingLabel/Dto/BookingLabelBaseDto.cs
@@ -1,4 +1,5 @@
-namespace Myshipping.Application.Service.BookingLabel.Dto
+using Myshipping.Core;
+namespace Myshipping.Application.Service.BookingLabel.Dto
{
public class BookingLabelBaseDto
{
@@ -28,4 +29,17 @@
///
public long[] BusinessIdArray { get; set; }
}
+ public class BookingLabelPageListInput : PageInputBase
+ {
+ ///
+ /// 标签名称
+ ///
+ public string Name { get; set; }
+
+ ///
+ /// 标签使用范围 1-舱位
+ ///
+ public int? Scope { get; set; }
+
+ }
}