Skip to content

Commit

Permalink
feat: 优化SQL
Browse files Browse the repository at this point in the history
  • Loading branch information
KouShenhai committed Jan 23, 2025
1 parent b4a90db commit dc6e4bb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@
and status = #{pageQuery.status}
</if>
<if test="pageQuery.params.startTime != null and pageQuery.params.startTime != ''">
and create_time <![CDATA[ >= ]]> to_timestamp(#{pageQuery.params.startTime}, 'YYYY-MM-DD HH24:MI:SS')
and create_time <![CDATA[ >= ]]> #{pageQuery.params.startTime}
</if>
<if test="pageQuery.params.endTime != null and pageQuery.params.endTime != ''">
and create_time <![CDATA[ <= ]]> to_timestamp(#{pageQuery.params.endTime}, 'YYYY-MM-DD HH24:MI:SS')
and create_time <![CDATA[ <= ]]> #{pageQuery.params.endTime}
</if>
</sql>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@
and status = #{pageQuery.status}
</if>
<if test="pageQuery.params.startTime != null and pageQuery.params.startTime != ''">
and create_time <![CDATA[ >= ]]> to_timestamp(#{pageQuery.params.startTime}, 'YYYY-MM-DD HH24:MI:SS')
and create_time <![CDATA[ >= ]]> #{pageQuery.params.startTime}
</if>
<if test="pageQuery.params.endTime != null and pageQuery.params.endTime != ''">
and create_time <![CDATA[ <= ]]> to_timestamp(#{pageQuery.params.endTime}, 'YYYY-MM-DD HH24:MI:SS')
and create_time <![CDATA[ <= ]]> #{pageQuery.params.endTime}
</if>
</sql>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@
and status = #{pageQuery.status}
</if>
<if test="pageQuery.params.startTime != null and pageQuery.params.startTime != ''">
and create_time <![CDATA[ >= ]]> to_timestamp(#{pageQuery.params.startTime}, 'YYYY-MM-DD HH24:MI:SS')
and create_time <![CDATA[ >= ]]> #{pageQuery.params.startTime}
</if>
<if test="pageQuery.params.endTime != null and pageQuery.params.endTime != ''">
and create_time <![CDATA[ <= ]]> to_timestamp(#{pageQuery.params.endTime}, 'YYYY-MM-DD HH24:MI:SS')
and create_time <![CDATA[ <= ]]> #{pageQuery.params.endTime}
</if>
</sql>

Expand Down

0 comments on commit dc6e4bb

Please sign in to comment.