<?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.system.mapper.TdMeetingMapper">

    <resultMap id="BaseResultMap" type="com.ruoyi.system.domain.TdMeeting">
            <id property="id" column="id" jdbcType="VARCHAR"/>
            <result property="meetingTitle" column="meeting_title" jdbcType="VARCHAR"/>
            <result property="meetingTime" column="meeting_time" jdbcType="DATE"/>
            <result property="meetingAddress" column="meeting_address" jdbcType="VARCHAR"/>
            <result property="meetingUsernum" column="meeting_usernum" jdbcType="INTEGER"/>
            <result property="meetingHost" column="meeting_host" jdbcType="VARCHAR"/>
            <result property="meetingType" column="meeting_type" jdbcType="VARCHAR"/>
            <result property="meetingState" column="meeting_state" jdbcType="VARCHAR"/>
            <result property="agenda" column="agenda" jdbcType="VARCHAR"/>
            <result property="summary" column="summary" jdbcType="VARCHAR"/>
            <result property="fileId" column="file_id" jdbcType="VARCHAR"/>
            <result property="fileName" column="file_name" jdbcType="VARCHAR"/>
            <result property="createBy"     column="create_by"      />
            <result property="createTime"   column="create_time"    />
            <result property="updateBy"     column="update_by"      />
            <result property="updateTime"   column="update_time"    />
            <result property="remark"       column="remark"         />
    </resultMap>

    <sql id="Base_Column_List">
        id,meeting_title,meeting_time,
        meeting_address,meeting_usernum,meeting_host,
        meeting_type,meeting_state,agenda,
        summary,file_id,
        file_name,create_by, create_time, update_by, update_time, remark
    </sql>
    <select id="selectTdMeetingList" resultType="com.ruoyi.system.domain.TdMeeting">
        select  <include refid="Base_Column_List"/> from  td_meeting
        <trim prefix="where" prefixOverrides="and|or">
            <if test="meetingType!=null">
                AND meeting_type = #{meetingType}
            </if>
            <if test="meetingState!=null">
                AND meeting_state = #{meetingState}
            </if>
            <if test="meetingTitle!=null and meetingTitle!=''">
                AND meeting_title LIKE concat('%',#{meetingTitle},'%')
            </if>
        </trim>
        ORDER BY create_time DESC
    </select>
</mapper>
