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 != ''">
|
||||
AND dept_name like concat('%', cast(#{deptName, jdbcType=VARCHAR} as varchar), '%')
|
||||
</if>
|
||||
<if test="orderNum != null">
|
||||
AND d.order_num = #{orderNum}
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND status = #{status}
|
||||
</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
|
||||
<where>
|
||||
<if test="ipaddr != null and ipaddr != ''">
|
||||
AND ipaddr like concat('%', #{ipaddr}, '%')
|
||||
AND ipaddr like concat('%', CAST(#{ipaddr} AS VARCHAR), '%')
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
<if test="userName != null and userName != ''">
|
||||
AND user_name like concat('%', #{userName}, '%')
|
||||
AND user_name like concat('%', CAST(#{userName} AS VARCHAR), '%')
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
AND login_time >= #{params.beginTime}
|
||||
@@ -54,4 +54,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
truncate table sys_logininfor
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user