<?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.MlMapper">
    <select id="page" resultType="com.ruoyi.gysl.entity.Ml">
        select * from gysl_ml
        <where>
            <if test="req.slmllb != null">
                AND slmllb = #{req.slmllb}
            </if>
            <if test="req.gydl != null and req.gydl != '' ">
                AND gydl like concat('%',#{req.gydl},'%')
            </if>
            <if test="req.cy != null and req.cy != '' ">
                AND cy like concat('%',#{req.cy},'%')
            </if>
            <if test="req.startTime != null">
                AND update_time &gt;= #{req.startTime}  <!-- 大于等于 -->
            </if>
            <if test="req.endTime != null">
                AND update_time &lt;= #{req.endTime}     <!-- 小于等于 -->
            </if>
        </where>
    </select>

</mapper>

