sql中模糊查询和在开始和结束时间之间

  <select id="getMeetingList" parameterType="org.springblade.desk.meeting.entity.MeetingEntity" resultType="org.springblade.desk.meeting.entity.MeetingEntity">
        select * from blade_meeting where tenant_id=#{tenantId}
        <if test="meetingLaunchPersonCode != null and meetingLaunchPersonCode !=‘‘ ">
            and  meeting_launch_person_code=#{meetingLaunchPersonCode}
        </if>
        <if test="meetingDate != null and meetingDate !=‘‘ ">
            and  meeting_date=#{meetingDate}
        </if>
        <if test="startTime != null and startTime !=‘‘ ">
            and  start_time &gt;= {startTime} &lt;= end_time
        </if>
        <if test="endTime != null and endTime !=‘‘ ">
            and  start_time &gt;= {endTime} &lt;= end_time
        </if>
        <if test="months != null and months !=‘‘ ">
            and (meeting_date like ‘%%${months}%%‘)
        </if>


    </select>
    <select id="getMyJoinMeetingPage"  resultType="org.springblade.desk.meeting.entity.MeetingEntity">
        select a.* from blade_meeting a left join blade_meeting_person b on a.meeting_code=b.meeting_code
        where b.join_person_code=#{joinPersonCode}
        <if test="meetingName != null">
            and (meeting_name like ‘%%${meetingName}%%‘)
        </if>
        <if test="meetingDate != null">
            and (meeting_date like ‘%%${meetingDate}%%‘)
        </if>
    </select>

 

sql中模糊查询和在开始和结束时间之间

上一篇:SQL中join操作后面的on 和 where 的区别


下一篇:ORACLE常用函数大全