提交 | 用户 | 时间
|
1ac2bc
|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
懒 |
2 |
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
3 |
<mapper namespace="cn.stylefeng.guns.sys.modular.rest.mapper.RestLoginLogMapper"> |
|
4 |
|
|
5 |
<!-- 通用查询映射结果 --> |
|
6 |
<resultMap id="BaseResultMap" type="cn.stylefeng.guns.sys.modular.rest.entity.RestLoginLog"> |
|
7 |
<id column="login_log_id" property="loginLogId"/> |
|
8 |
<result column="log_name" property="logName"/> |
|
9 |
<result column="user_id" property="userId"/> |
|
10 |
<result column="create_time" property="createTime"/> |
|
11 |
<result column="succeed" property="succeed"/> |
|
12 |
<result column="message" property="message"/> |
|
13 |
<result column="ip_address" property="ipAddress"/> |
|
14 |
</resultMap> |
|
15 |
|
|
16 |
<!-- 通用查询结果列 --> |
|
17 |
<sql id="Base_Column_List"> |
|
18 |
login_log_id AS "loginLogId", log_name AS "logName", user_id AS "userId", create_time AS "createTime", succeed AS "succeed", message AS "message", ip_address AS "ipAddress" |
|
19 |
</sql> |
|
20 |
|
|
21 |
<select id="getLoginLogs" resultType="map" parameterType="com.baomidou.mybatisplus.extension.plugins.pagination.Page"> |
|
22 |
select |
|
23 |
<include refid="Base_Column_List"/> |
|
24 |
from sys_login_log |
|
25 |
where 1 = 1 |
|
26 |
<if test="beginTime != null and beginTime !='' and endTime != null and endTime != ''"> |
|
27 |
and (create_time between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59')) |
|
28 |
</if> |
|
29 |
<if test="logName != null and logName !=''"> |
|
30 |
and log_name like CONCAT('%',#{logName},'%') |
|
31 |
</if> |
|
32 |
</select> |
|
33 |
|
|
34 |
<select id="getLoginLogs" resultType="map" parameterType="com.baomidou.mybatisplus.extension.plugins.pagination.Page" databaseId="oracle"> |
|
35 |
select |
|
36 |
<include refid="Base_Column_List"/> |
|
37 |
from sys_login_log |
|
38 |
where 1 = 1 |
|
39 |
<if test="beginTime != null and beginTime !='' and endTime != null and endTime != ''"> |
|
40 |
and create_time >= to_date(#{beginTime}||'00:00:00','yyyy-mm-dd hh24:mi:ss') |
|
41 |
and create_time <= to_date(#{endTime}||'23:59:59','yyyy-mm-dd hh24:mi:ss') |
|
42 |
</if> |
|
43 |
<if test="logName != null and logName !=''"> |
|
44 |
and log_name like '%' || #{logName} || '%' |
|
45 |
</if> |
|
46 |
</select> |
|
47 |
|
|
48 |
</mapper> |