|
@@ -463,32 +463,33 @@ namespace Hotline.Api.Controllers
|
|
|
{ "StatusName", StatusName },
|
|
|
{ "ApplyStatusName", ApplyStatusName }
|
|
|
};
|
|
|
+ }
|
|
|
|
|
|
- #endregion
|
|
|
+ #endregion
|
|
|
|
|
|
- #region 案例库检索
|
|
|
+ #region 案例库检索
|
|
|
|
|
|
- /// <summary>
|
|
|
- /// 案例库列表前10
|
|
|
- /// </summary>
|
|
|
- /// <returns></returns>
|
|
|
- [HttpGet("list/top10")]
|
|
|
- public async Task<List<CasePageViewDto>> QueryTop10CaseList()
|
|
|
- {
|
|
|
- return await _caseListRepository.Queryable()
|
|
|
- .Take(10)
|
|
|
- .Where(x => x.Status == ECaseStatus.OnShelf)
|
|
|
- .Select(x => new CasePageViewDto
|
|
|
- {
|
|
|
- Id = x.Id,
|
|
|
- Title = x.Title,
|
|
|
- PageView = x.PageView
|
|
|
- })
|
|
|
- .OrderBy(x => x.PageView, OrderByType.Desc)
|
|
|
- .ToListAsync();
|
|
|
- }
|
|
|
-
|
|
|
- #endregion
|
|
|
+ /// <summary>
|
|
|
+ /// 案例库列表前10
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpGet("list/top10")]
|
|
|
+ public async Task<List<CasePageViewDto>> QueryTop10CaseList()
|
|
|
+ {
|
|
|
+ return await _caseListRepository.Queryable()
|
|
|
+ .Take(10)
|
|
|
+ .Where(x => x.Status == ECaseStatus.OnShelf)
|
|
|
+ .Select(x => new CasePageViewDto
|
|
|
+ {
|
|
|
+ Id = x.Id,
|
|
|
+ Title = x.Title,
|
|
|
+ PageView = x.PageView
|
|
|
+ })
|
|
|
+ .OrderBy(x => x.PageView, OrderByType.Desc)
|
|
|
+ .ToListAsync();
|
|
|
}
|
|
|
+
|
|
|
+ #endregion
|
|
|
}
|
|
|
}
|
|
|
+
|