zoukankan      html  css  js  c++  java
  • mybati内sql查询语句在两个日期内

    装载自:

      http://blog.csdn.net/u010442302/article/details/72902441?locationNum=9&fps=1

     
    <select id="selectByParamCount" resultType="java.lang.Integer"
    parameterType="com.sss.fin.cif.vo.admin.BankCardAuditQuery">
    select count(1) from tablename
    <where>
    <if test="operatorDateStart != null and operatorDateStart !='' " >
    operator_date >= #{operatorDateStart,jdbcType=VARCHAR}
    </if>
    <if test="operatorDateEnd != null and operatorDateEnd !='' " >
    <![CDATA[
    and operator_date <= concat(#{operatorDateEnd,jdbcType=VARCHAR},'235959')
    ]]>
    </if>
    </where>
    </select>

    <![CDATA[ ]]> 转义< (小于号)
    sql语句中,默认把yyyyMMdd定位成该日期的零点整
     
    1
  • 相关阅读:
    mysql--主从复制
    Linux--部署Vue项目
    Linux--安装node.js
    Linux--防火墙和vim
    go.js
    服务端和客户端通信的三种方式
    mysql-排序过程
    数据分析-Numpy
    shell
    Linux-crontab
  • 原文地址:https://www.cnblogs.com/rzqz/p/7306542.html
Copyright © 2011-2022 走看看