<?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.gysl.mapper.ProjectHandBookMapper">

    <select id="page" resultType="com.ruoyi.gysl.entity.GyslProjectHandbook">
        select * from gysl_project_handbook
        <where>
            <if test="req.name != null and req.name != '' ">
                AND name like concat('%',#{req.name},'%')
            </if>
            <if test="req.startTime != null">
                AND create_time &gt;= #{req.startTime}  <!-- 大于等于 -->
            </if>
            <if test="req.endTime != null">
                AND create_time &lt;= #{req.endTime}     <!-- 小于等于 -->
            </if>
        </where>
    </select>
    <select id="getProjectName" resultType="com.ruoyi.gysl.entity.BasicInformation">
        SELECT a.*
        FROM gysl_basic_information a
        <where>
            <if test="id != null">
                and a.id in
                <foreach collection="id" item="item" separator="," open="(" close=")">
                    #{item}
                </foreach>
            </if>
        </where>
    </select>

</mapper>

