public async Task <IActionResult> GetFollowupRecordPageListAsync(GetFllowupRecordPageListRequestDto requestDto) { var result = await new FollowupRecordBiz().GetFllowupRecordPageListAsync(requestDto); return(Success(result)); }
/// <summary> /// 获取随访记录分页列表 /// </summary> /// <param name="requestDto"></param> /// <returns></returns> public async Task <GetFollowupRecordPageListResponseDto> GetFllowupRecordPageListAsync(GetFllowupRecordPageListRequestDto requestDto) { var sqlWhere = string.Empty; if (!string.IsNullOrWhiteSpace(requestDto.OperatorId)) { sqlWhere = "and a.created_by=@OperatorId"; } var sql = $@"SELECT a.followup_guid, a.followup_time, b.user_name AS operator, a.content, a.suggestion FROM t_health_manager_followup_record a INNER JOIN t_health_manager b ON a.health_manager_guid = b.manager_guid WHERE a.consumer_guid = @ConsumerGuid AND a.`enable` = 1 {sqlWhere} ORDER BY a.followup_time DESC" ; return(await MySqlHelper.QueryByPageAsync <GetFllowupRecordPageListRequestDto, GetFollowupRecordPageListResponseDto, GetFollowupRecordPageListItemDto>(sql, requestDto)); }