当前位置:网站首页>Notes and bugs generated during the use of h:i:s and y-m-d
Notes and bugs generated during the use of h:i:s and y-m-d
2022-07-03 08:46:00 【The luckier~】


When the selected dates are 2022-02-09 Make screening conditions when , There's no data , The parameters passed to the backend here are “2022-02-09 00:00:00”,“2022-02-09 00:00:00”, In this way, the screening range is very narrow . Because the back-end code is accurate to seconds
Here are some Wrong writing .
The back-end code is accurate to seconds
// The back-end code is accurate to seconds --- Wrong writing
<if test="applyStartTime != null and applyEndTime != null">
<![CDATA[
and DATE_FORMAT(t.apply_time
, '%Y-%m-%d %H:%i:%s') >= DATE_FORMAT(#{
applyStartTime}
, '%Y-%m-%d %H:%i:%s')
and DATE_FORMAT(t.apply_time
, '%Y-%m-%d %H:%i:%s') <= DATE_FORMAT(#{
applyEndTime}
, '%Y-%m-%d %H:%i:%s')
]]>
</if>
Here are some Correct code slice .
It can only be accurate to the number of days
<if test="applyStartTime != null and applyEndTime != null">
<![CDATA[
and DATE_FORMAT(t.apply_time
, '%Y-%m-%d') >= DATE_FORMAT(#{
applyStartTime}
, '%Y-%m-%d')
and DATE_FORMAT(t.apply_time
, '%Y-%m-%d') <= DATE_FORMAT(#{
applyEndTime}
, '%Y-%m-%d')
]]>
</if>
边栏推荐
- Unity Editor Extension - Outline
- [concurrent programming] concurrent security
- Allocation exception Servlet
- Graphics_ Learnopongl learning notes
- 基于SSM的校园失物招领平台,源码,数据库脚本,项目导入运行视频教程,论文撰写教程
- [K & R] Chinese Second Edition personal questions Chapter1
- 22-06-27 西安 redis(01) 安装redis、redis5种常见数据类型的命令
- 【Rust 笔记】11-实用特型
- Unity editor expansion - controls, layouts
- Analysis of Alibaba canal principle
猜你喜欢

【Rust笔记】02-所有权

Gradle's method of dynamically modifying APK package name

MySQL 8

Drawing maze EasyX library with recursive backtracking method

Graphics_ Learnopongl learning notes

OpenGL learning notes

Data analysis exercises

Graphics_ Games101/202 learning notes

GIS实战应用案例100篇(七十八)-多规合一数据库设计及数据入库

Final review of Database Principles
随机推荐
Life cycle of Servlet
MySQL three logs
Animation_ IK overview
[rust notes] 12 closure
OpenGL learning notes
Unity editor expansion - window, sub window, menu, right-click menu (context menu)
Advanced OSG collision detection
Location of package cache downloaded by unity packagemanager
Cesium service deployment, and import and display local 3dfiles data
UE4 source code reading_ Bone model and animation system_ Animation process
How to deal with the core task delay caused by insufficient data warehouse resources
Monotonic stack -503 Next bigger Element II
Deeply understand the underlying data structure of MySQL index
Unity editor expansion - scrolling list
Installation of PHP FPM software +openresty cache construction
Concurrent programming (VI) ABA problems and solutions under CAS
【Rust 笔记】08-枚举与模式
【Rust 笔记】13-迭代器(上)
[concurrent programming] consistency hash
UE4 source code reading_ Bone model and animation system_ Animation node