예제 #1
0
        /// <summary>
        /// 分页获取医院列表
        /// </summary>
        /// <param name="requestDto"></param>
        /// <returns></returns>
        public async Task <HospitalPageListResponseDto> GetHospitalPageListAsync(HospitalPageListRequestDto requestDto)
        {
            string sqlWhere = string.Empty;

            if (!string.IsNullOrWhiteSpace(requestDto.KeyWord))
            {
                sqlWhere           = $"{sqlWhere} and a.hos_name like @KeyWord";
                requestDto.KeyWord = $"{requestDto.KeyWord}%";
            }
            var sql    = $@"SELECT
	                        a.hospital_guid,
	                        a.hos_name,
	                        a.location,
                            a.contact_number,
                            a.latitude,
                            a.longitude,
	                        a.hos_tag,
                            a.is_hospital,
                            a.external_link,
	                        CONCAT(b.base_path,b.relative_path) as logo_url
                        FROM
	                        t_doctor_hospital a
	                        LEFT JOIN t_utility_accessory b ON a.logo_guid = b.accessory_guid
                        where a.`enable`=1 {sqlWhere} order by a.sort desc";
            var result = await MySqlHelper.QueryByPageAsync <HospitalPageListRequestDto, HospitalPageListResponseDto, HospitalItemDto>(sql, requestDto);

            return(result);
        }
예제 #2
0
        public async Task <IActionResult> QueryHospitalPageListAsync([FromQuery] HospitalPageListRequestDto requestDto)
        {
            var response = await new DoctorAppointmentBiz().GetHospitalPageListAsync(requestDto);

            return(Success(response));
        }