0
点赞
收藏
分享

微信扫一扫

Mybatis时间段查询xml写法

天际孤狼 2021-09-26 阅读 69

一、涉及时间段筛选

<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>
举报

相关推荐

0 条评论