<?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="org.springblade.desk.meeting.mapper.MeetingMapper">

    <delete >
        delete from blade_meeting where meeting_code=#{meetingCode}
    </delete>
    <select >
        select * from blade_meeting where tenant_id=#{tenantId}
        <if test="meetingDate != null and meetingDate !=''">
            and  meeting_date=#{meetingDate}
        </if>
        <if test="startTime != null and startTime !='' or endTime != null and endTime !=''">
            and ( (#{startTime} between start_time and end_time)  or
                (#{endTime} between start_time and end_time)
            )
        </if>
        <if test="months != null and months !='' ">
            and (meeting_date like '%%${months}%%')
        </if>
        <if test="meetingAddress != null and meetingAddress !=''">
            and meeting_address =#{meetingAddress}
        </if>


    </select>
    <select >
        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>
</mapper>

 

  <select >
        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 >
        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>

 

相关文章:

  • 2022-03-05
  • 2021-10-05
  • 2022-02-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-21
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-06-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-11
  • 2022-01-31
相关资源
相似解决方案