Commit fee10c2e authored by licc's avatar licc

update sql

parent 0ef65bf2
...@@ -444,11 +444,14 @@ ...@@ -444,11 +444,14 @@
from from
<include refid="table"/> <include refid="table"/>
<where> <where>
1=1
<if test="userId != null and userId != ''"> <if test="userId != null and userId != ''">
user_id = #{userId} and user_id = #{userId}
</if> </if>
<if test="queryTime != null and queryTime != ''"> <if test="queryTime != null and queryTime != ''">
and `create_time` = #{queryTime} and (YEAR(create_time) = YEAR(#{queryTime})
AND MONTH(create_time) =MONTH(#{queryTime})
AND DAY(create_time)=DAY(#{queryTime}))
</if> </if>
</where> </where>
order by create_time desc order by create_time desc
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment