liujie
2 天以前 67d06a785d5fc4524639ace27651c01ff05a4b58
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.SysLoginLogMapper">
    
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.ruoyi.system.api.domain.SysLoginLog">
        <id column="id" property="id" />
        <result column="user_id" property="userId" />
        <result column="user_name" property="username" />
        <result column="ip_address" property="ipAddress"/>
        <result column="address" property="address"/>
        <result column="browser_type" property="browserType"/>
        <result column="operating_system" property="operatingSystem"/>
        <result column="login_time" property="loginTime"/>
        <result column="login_status" property="loginStatus"/>
        <result column="message" property="message"/>
        <result column="create_time" property="createTime"/>
        <result column="del_flag" property="delFlag"/>
    </resultMap>
    
    
    
    <select id="pageList" resultMap="BaseResultMap">
        select
        a.*,
        b.user_name
        from sys_login_log a
        left join sys_user b on (a.user_id = b.user_id)
        where a.del_flag = 0
        <if test="null != name and '' != name">
            and b.user_name like CONCAT('%', #{name}, '%')
        </if>
        order by a.create_time desc
    </select>
</mapper>