mybatis日期查询
来源:互联网 发布:人工智能技术 知乎 编辑:程序博客网 时间:2024/05/22 10:25
默认查询7天的数据
<if test="startDate != null and startDate !='' "> <![CDATA[AND a.use_date >= #{startDate}]]> </if> <if test="endDate != null and endDate !='' "> <![CDATA[AND a.use_date < #{endDate}]]> </if> <if test='startDate == null and endDate == null' > AND DATE_SUB(CURDATE(),INTERVAL 7 DAY) <= a.use_date </if>
默认查询昨天的数据
<if test='startDate == null and endDate == null' > AND TO_DAYS( NOW( ) ) - TO_DAYS( a.dept_kpi_date) = 1 </if>
参考:
http://www.cnblogs.com/qinweizhi/p/5918048.html
if判断参数等于某个值
<if test=' type == "1"'>....</if>
阅读全文
0 0
- mybatis 日期查询
- mybatis日期查询
- mybatis日期查询
- mybatis,mysql根据日期查询
- mybatis查询日期范围的记录数
- mysql 和 mybatis 关于日期的查询
- mybatis的日期查询与字段的模糊查询例子
- Mybatis——oracle 的模糊查询 和 日期处理
- mybatis 在mysql查询条件日期在某两个日期之间
- 日期查询
- myBatis查询
- mybatis查询
- Mybatis查询
- mybatis 查询
- Mybatis--查询
- Mybatis查询
- 解决Mybatis查询时间日期得到的是long型时间问题
- 解决mybatis查询日期时间数据得到long类型数据的问题
- ViewTreeObserver源码学习
- Ubuntu下ns2中生成补丁和打补丁方法
- android https请求的使用
- 打印出漂亮的json use python command python -m json.tool
- Glide的使用,加载图片只要一句话
- mybatis日期查询
- SGI特殊空间配置器std::alloc
- Android 系统默认参数的修改
- [Codeforces]Hamburgers
- Java基础之--内存划分
- kubernetes free data blocks which is less than minimum required
- Linux学习笔记
- 【Jquery学习】第五部分
- Html去掉隐藏字符解决办法