refactor: 用户分页接口优化,添加创建时间范围查询参数

This commit is contained in:
haoxr
2023-10-17 21:50:55 +08:00
parent b6ee9d913a
commit 652bc18fd2
5 changed files with 58 additions and 7 deletions

View File

@@ -37,6 +37,17 @@
<if test='queryParams.deptId!=null'>
AND concat(',',concat(d.tree_path,',',d.id),',') like concat('%,',#{queryParams.deptId},',%')
</if>
<if test="queryParams.createTimeRange != null and queryParams.createTimeRange.size() == 2 ">
<if test="queryParams.createTimeRange[0] != null and queryParams.createTimeRange[0].trim() neq ''">
AND u.create_time &gt;= #{queryParams.createTimeRange[0]}
</if>
<if test="queryParams.createTimeRange[1] != null and queryParams.createTimeRange[1].trim() neq ''">
AND u.create_time &lt;= #{queryParams.createTimeRange[1]}
</if>
</if>
</where>
GROUP BY u.id
</select>