模糊搜索和时间区间搜索

    <!-- 账单编号 -->
            <if test="billListForm.code != null and billListForm.code != ''">
                AND a.code LIKE CONCAT('%',#{billListForm.code},'%')
            </if>
            <!-- 账单状态 -->
            <if test="billListForm.status != null and billListForm.status != ''">
                AND a.status = #{billListForm.status}
            </if>
            <!-- 起止时间 -->
            <if test="billListForm.beginDate  != null and billListForm.beginDate != ''">
                AND a.create_time  <![CDATA[   >=  #{billListForm.beginDate } ]]>
            </if>
            <if test="billListForm.endDate  != null and billListForm.endDate != ''">
                AND  a.create_time <![CDATA[   <= #{billListForm.endDate } ]]>
            </if>
        </where>   

posted @ 2017-12-19 15:24  噶波豆儿  阅读(447)  评论(0编辑  收藏  举报