美文网首页
Mybatis时间段查询xml写法

Mybatis时间段查询xml写法

作者: c_gentle | 来源:发表于2021-02-25 17:36 被阅读0次

    一、涉及时间段筛选

    <select id="queryTeacherList" parameterType="com.caiweiwei.eduservice.vo.QueryTeacher" resultType="EduTeacher">
        select * from edu_teacher
        <where>
        <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
        <if test="level!=null and level!='' "> and level = #{level}</if>
        <if test="begin!=null and begin!=''"> and gmt_create <![CDATA[>=]]>  #{begin} </if>
        <if test="end!=null and end!=''"> and gmt_create <![CDATA[<=]]>  #{end} </if>
            and is_deleted=0
    </where>
    </select>
    

    相关文章

      网友评论

          本文标题:Mybatis时间段查询xml写法

          本文链接:https://www.haomeiwen.com/subject/yhpufltx.html