public IActionResult GetAskedDoctorLectureHallArticle([FromBody] GetAskedDoctorLectureHallArticleRequestDto requestDto) { var articleBiz = new ConsumerBiz(); var responseDtos = articleBiz.GetAskedDoctorLectureHallArticle(requestDto); if (responseDtos == null) { return(Failed(ErrorCode.Empty)); } return(Success(responseDtos)); }
/// <summary> /// 获取问医讲堂文章 /// </summary> /// <param name="requestDto"></param> /// <returns></returns> public GetAskedDoctorLectureHallArticleResponseDto GetAskedDoctorLectureHallArticle(GetAskedDoctorLectureHallArticleRequestDto requestDto) { var sql = @"SELECT article.article_guid AS ArticleGuid, article.title AS Title, article.last_updated_date AS LastUpdatedDate, CONCAT( acce.base_path, acce.relative_path ) AS Picture, articleType.config_name AS ArticleType, IFNULL(hot.like_count, 0) AS LikeTotal, IFNULL(hot.visit_count, 0) AS PageView FROM t_utility_article AS article 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` = TRUE and article.`actcle_release_status` = 'Release' ORDER BY article.last_updated_date DESC " ; var response = MySqlHelper.QueryByPage <GetAskedDoctorLectureHallArticleRequestDto, GetAskedDoctorLectureHallArticleResponseDto, GetAskedDoctorLectureHallArticleItemDto>(sql, requestDto); return(response); }