Cool
Cool
Published on 2021-08-28 / 22 Visits
0
0

mybatis 时间范围搜索

 <if test="startTime != null"><!-- 开始时间检索 -->
            AND date_format(c.subsidy_time,'%y%m') between date_format(#{startTime},'%y%m')
        </if>
        <if test="endTime != null"><!-- 结束时间检索 -->
            and  date_format(#{endTime},'%y%m')
        </if>

Comment