oracle 时间段查询

时间:2022-04-13 07:56:28
<select id="selectByRzrq" resultMap="BaseResultMap" parameterType="java.util.HashMap" >
  select 
  <include refid="Base_Column_List" />
  from T_AUCHAN_VAT_MAIN
  where BUYTAXNO = #{buytaxno}  AND  INVSTATUS='3' AND  CANCELSIGN='0'
  <if test="starttime != null and starttime != '' and endtime != null and endtime != ''">
    <![CDATA[
      AND INVVERIDATE >= TO_DATE(#{starttime}, 'yyyy-mm-dd')
      AND INVVERIDATE <= TO_DATE(#{endtime}, 'yyyy-mm-dd')
 ]]>
  </if>

</select>