/// <summary> /// 获取首页推荐综合文章分页列表 /// </summary> /// <param name="requestDto"></param> /// <returns></returns> public async Task <GetClientRecommandArticleListResponseDto> GetClientRecommandArticleListAsync(GetClientRecommandArticleListRequestDto requestDto) { var sql = $@"SELECT article.article_guid AS ArticleGuid, article.title AS Title, article.external_link as ExternalLink, article.last_updated_date AS LastUpdatedDate, article.author_guid AS AuthorGuid, u.user_name AS AuthorName, CONCAT( acce.base_path, acce.relative_path ) AS Picture, article.article_type_dic AS ArticleTypeDic, articleType.config_name AS ArticleType, article.source_type AS ArticleSource, IFNULL(hot.like_count, 0) AS LikeTotal, IFNULL(hot.visit_count, 0) AS PageView FROM t_utility_article AS article LEFT JOIN t_utility_user u ON u.user_guid = article.author_guid LEFT JOIN t_utility_accessory AS acce ON acce.accessory_guid = article.picture_guid AND acce.`enable` = 1 LEFT JOIN t_manager_dictionary AS articleType ON articleType.dic_guid = article.article_type_dic AND articleType.`enable` = 1 LEFT JOIN t_utility_hot hot ON hot.owner_guid = article.article_guid AND hot.`enable` = 1 WHERE article.`enable` = 1 AND article.`actcle_release_status` = 'Release' AND article.visible = 1 ORDER BY PageView DESC " ; return(await MySqlHelper.QueryByPageAsync <GetClientRecommandArticleListRequestDto, GetClientRecommandArticleListResponseDto, GetClientRecommandArticleListItemDto>(sql, requestDto)); }
public async Task <IActionResult> GetClientRecommandArticleListAsync([FromBody] GetClientRecommandArticleListRequestDto requestDto) { var response = await new UnionArticleBiz().GetClientRecommandArticleListAsync(requestDto); return(Success(response)); }