标签相关

master
zhangxiaofeng 6 months ago
parent d23ae35015
commit 5b77ee33a2

@ -94,6 +94,20 @@ namespace Myshipping.Application
: cacheList.Where(x => x.Scope == scope).ToList();
return result;
}
/// <summary>
/// 分页获取全部或指定范围类型的标签列表
/// </summary>
[HttpPost("/BookingLabel/PageList")]
public async Task<SqlSugarPagedList<BookingLabelBaseDto>> 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<SqlSugarPagedList<BookingLabelBaseDto>>();
return result;
}
/// <summary>
/// 新增或修改标签信息

@ -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 @@
/// </summary>
public long[] BusinessIdArray { get; set; }
}
public class BookingLabelPageListInput : PageInputBase
{
/// <summary>
/// 标签名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 标签使用范围 1-舱位
/// </summary>
public int? Scope { get; set; }
}
}

Loading…
Cancel
Save