<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.web.modules.diagnosis.mapper.AppOnlineConsultMapper">

    <resultMap type="com.ruoyi.web.modules.diagnosis.domain.vo.AppOnlineConsultVetListVo" id="AppOnlineConsultVetListVoResult">
        <id     property="id"               column="id"/>
        <result property="resourceName"     column="resource_name"/>
        <result property="introduction"     column="introduction"/>
        <result property="contactPhone"     column="contact_phone"/>
        <result property="affiliatedUnit"   column="affiliated_unit"/>
        <result property="detailAddress"    column="detail_address"/>
        <result property="serviceStartTime" column="service_start_time"/>
        <result property="serviceEndTime"   column="service_end_time"/>
        <result property="photoFileUrl"     column="photo_file_url"/>
    </resultMap>

    <select id="selectOnlineConsultVetList"
            parameterType="com.ruoyi.web.modules.diagnosis.domain.AppOnlineConsultVetQuery"
            resultMap="AppOnlineConsultVetListVoResult">
        select id, resource_name, introduction, contact_phone, affiliated_unit, detail_address,
               service_start_time, service_end_time, photo_file_url
        from biz_medical_resource
        where del_flag = '0'
          and resource_type = '004001'
          and publish_status = 1
          and FIND_IN_SET('3', consult_modes) &gt; 0
          and account_assigned = 1
          and sys_user_id is not null
        <if test="resourceName != null and resourceName != ''">
            and resource_name like concat('%', #{resourceName}, '%')
        </if>
        order by publish_time desc, id desc
    </select>

</mapper>
