t1.appointment_people_count, t1.create_by, t1.create_time, t1.update_by, t1.update_time, t1.organ_code,t2.resource_name as scenicName
from appointment_team_data t1
left join b_tour_info t2 on t1.scenic_code = t2.resource_code
<where>
<iftest="scenicCode != null and scenicCode != ''"> and scenic_code = #{scenicCode}</if>
<iftest="appointmentDate != null "> and appointment_date = #{appointmentDate}</if>
<iftest="appointmentSlot != null and appointmentSlot != ''"> and appointment_slot like concat('%', #{appointmentSlot}, '%') </if>
<iftest="appointmentPeopleName != null and appointmentPeopleName != ''"> and appointment_people_name like concat('%', #{appointmentPeopleName}, '%') </if>
<iftest="appointmentPeoplePhone != null and appointmentPeoplePhone != ''"> and appointment_people_phone like concat('%', #{appointmentPeoplePhone}, '%') </if>
<iftest="appointmentPeopleCount != null and appointmentPeopleCount != ''"> and appointment_people_count = #{appointmentPeopleCount}</if>
<iftest="organCode != null "> and organ_code = #{organCode}</if>
<iftest="createBy != null "> and create_by = #{createBy}</if>
and del_flag!=2
<iftest="scenicCode != null and scenicCode != ''"> and t1.scenic_code = #{scenicCode}</if>
<iftest="appointmentDate != null "> and t1.appointment_date = #{appointmentDate}</if>
<iftest="appointmentSlot != null and appointmentSlot != ''"> and t1.appointment_slot like concat('%', #{appointmentSlot}, '%') </if>
<iftest="appointmentPeopleName != null and appointmentPeopleName != ''"> and t1.appointment_people_name like concat('%', #{appointmentPeopleName}, '%') </if>
<iftest="appointmentPeoplePhone != null and appointmentPeoplePhone != ''"> and t1.appointment_people_phone like concat('%', #{appointmentPeoplePhone}, '%') </if>
<iftest="appointmentPeopleCount != null and appointmentPeopleCount != ''"> and t1.appointment_people_count = #{appointmentPeopleCount}</if>
<iftest="organCode != null "> and t1.organ_code = #{organCode}</if>
<iftest="createBy != null "> and t1.create_by = #{createBy}</if>