feat: Enhance SQL queries with additional filtering options for department and login information
This commit is contained in:
@@ -39,6 +39,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="deptName != null and deptName != ''">
|
<if test="deptName != null and deptName != ''">
|
||||||
AND dept_name like concat('%', cast(#{deptName, jdbcType=VARCHAR} as varchar), '%')
|
AND dept_name like concat('%', cast(#{deptName, jdbcType=VARCHAR} as varchar), '%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="orderNum != null">
|
||||||
|
AND d.order_num = #{orderNum}
|
||||||
|
</if>
|
||||||
<if test="status != null and status != ''">
|
<if test="status != null and status != ''">
|
||||||
AND status = #{status}
|
AND status = #{status}
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@@ -25,13 +25,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
select info_id, user_name, ipaddr, login_location, browser, os, status, msg, login_time from sys_logininfor
|
select info_id, user_name, ipaddr, login_location, browser, os, status, msg, login_time from sys_logininfor
|
||||||
<where>
|
<where>
|
||||||
<if test="ipaddr != null and ipaddr != ''">
|
<if test="ipaddr != null and ipaddr != ''">
|
||||||
AND ipaddr like concat('%', #{ipaddr}, '%')
|
AND ipaddr like concat('%', CAST(#{ipaddr} AS VARCHAR), '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="status != null and status != ''">
|
<if test="status != null and status != ''">
|
||||||
AND status = #{status}
|
AND status = #{status}
|
||||||
</if>
|
</if>
|
||||||
<if test="userName != null and userName != ''">
|
<if test="userName != null and userName != ''">
|
||||||
AND user_name like concat('%', #{userName}, '%')
|
AND user_name like concat('%', CAST(#{userName} AS VARCHAR), '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||||
AND login_time >= #{params.beginTime}
|
AND login_time >= #{params.beginTime}
|
||||||
@@ -54,4 +54,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
truncate table sys_logininfor
|
truncate table sys_logininfor
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Reference in New Issue
Block a user