工作第一周。多条件以及时间语句的查询
来源:互联网 发布:屏幕闪光灯软件 编辑:程序博客网 时间:2024/06/03 18:40
<where> <if test="null !=city and '' !=city "> AND s.city = #{city} </if> <if test="null !=status and '' !=status"> AND sr.status = #{status} </if> <if test="null !=beandName and '' !=beandName"> AND db.beandName = #{beandName} </if> <!--查询某个时间段 --> <if test="null !=startTime and null!= endTime"> AND sr.createTime >= #{startDate} and sr.createTime <= #{endDate} </if> <!-- 近七天的 --> <if test="null != sevDays and sevDays != '' "> AND DATE_SUB(NOW(), INTERVAL 7 DAY) <= sr.createTime </if> <!-- 今天 --> <if test="null != today and today != '' "> AND DATE_FORMAT(sr.createTime,'%Y-%m-%d')= DATE_FORMAT(NOW(),'%Y-%m-%d') </if></where>
阅读全文
0 0
- 工作第一周。多条件以及时间语句的查询
- Sql 时间条件查询语句
- 多条件查询语句
- 关于多条件查询的SQL语句
- SQL的多条件查询语句
- 查询语句之带条件查询以及模糊查询
- 多条件查询使用的SQL查询语句
- mysql查询当前时间,一天内,一周,一个月内的sql语句
- mysql查询当前时间,一天内,一周,一个月内的sql语句
- 查询条件解析类,生成查询语句的查询条件
- 多条件查询SQL语句
- SQL多条件查询语句
- 多条件查询SQL语句
- sql多条件查询语句
- XPath 多条件查询语句
- MySQL多条件查询语句
- sql语句多条件查询
- mybatis多条件语句查询
- go异常处理
- 字符游戏-智能蛇
- 判断点与多边形的关系(3):角度和法
- 在eclipse上安装python插件,PyDev的过程-python简易教程(二)
- redis 3.2.6 on ubuntu 14.04
- 工作第一周。多条件以及时间语句的查询
- JDK、JRE、JVM三者间的关系
- Jenkins 安装 结合 Tomcat
- docker
- 如何给数字文件盖上时间戳——How to Time-Stamp a Digital Document
- 系统性能定位和优化方法
- Android--------AS打包
- celery 报错处理
- 大话设计模式-组合模式学习总结