|
@@ -74,8 +74,6 @@ namespace Hotline.Api.Controllers
|
|
[HttpGet("children-hasname")]
|
|
[HttpGet("children-hasname")]
|
|
public async Task<IReadOnlyList<Hotspot>> GetChildrenHasName([FromQuery]string name)
|
|
public async Task<IReadOnlyList<Hotspot>> GetChildrenHasName([FromQuery]string name)
|
|
{
|
|
{
|
|
-
|
|
|
|
-
|
|
|
|
var arr = _hotspotTypeRepository.Queryable()
|
|
var arr = _hotspotTypeRepository.Queryable()
|
|
.WhereIF(!string.IsNullOrEmpty(name), x => x.HotSpotName.Contains(name)).Select(x=>x.Id).ToList().Cast<object>().ToArray();
|
|
.WhereIF(!string.IsNullOrEmpty(name), x => x.HotSpotName.Contains(name)).Select(x=>x.Id).ToList().Cast<object>().ToArray();
|
|
//.ToTreeAsync(x => x.Children, it => it.ParentId, null);
|
|
//.ToTreeAsync(x => x.Children, it => it.ParentId, null);
|
|
@@ -117,6 +115,17 @@ namespace Hotline.Api.Controllers
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
#region 事件分类管理
|
|
#region 事件分类管理
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 事件全部树形
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ [HttpGet("event/tree")]
|
|
|
|
+ public async Task<IReadOnlyList<EventCategory>> GetEventAllTree()
|
|
|
|
+ {
|
|
|
|
+ return await _eventCategoryRepository.Queryable()
|
|
|
|
+ .OrderBy(d => d.OrderBy)
|
|
|
|
+ .ToTreeAsync(x => x.Children, it => it.ParentId,null);
|
|
|
|
+ }
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
/// 查询子项
|
|
/// 查询子项
|