From c775c6953d9759e70f08acbfa8f6d7490aaae3d1 Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期四, 26 九月 2024 21:13:53 +0800
Subject: [PATCH] 1

---
 ycl-common/src/main/resources/mapper/user/UmsAdminLoginLogMapper.xml |   42 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 42 insertions(+), 0 deletions(-)

diff --git a/ycl-common/src/main/resources/mapper/user/UmsAdminLoginLogMapper.xml b/ycl-common/src/main/resources/mapper/user/UmsAdminLoginLogMapper.xml
new file mode 100644
index 0000000..1f5a1fd
--- /dev/null
+++ b/ycl-common/src/main/resources/mapper/user/UmsAdminLoginLogMapper.xml
@@ -0,0 +1,42 @@
+<?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.ycl.mapper.user.UmsAdminLoginLogMapper">
+
+    <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 -->
+    <resultMap id="BaseResultMap" type="com.ycl.entity.user.UmsAdminLoginLog">
+        <id column="id" property="id"/>
+        <result column="admin_id" property="adminId"/>
+        <result column="create_time" property="createTime"/>
+        <result column="ip" property="ip"/>
+        <result column="address" property="address"/>
+        <result column="user_agent" property="userAgent"/>
+    </resultMap>
+    <select id="selectByCondition" parameterType="com.ycl.dto.log.LogQueryParams"
+            resultType="com.ycl.entity.user.vo.UmsAdminLogVO">
+        SELECT t1.*,t2.username as adminId FROM ums_admin_login_log t1
+        left join ums_admin t2 on t1.admin_id=t2.id
+        <where>
+            <if test="logQueryParams.content!='' and logQueryParams.content!=null">
+                contain LIKE CONCAT('%',#{logQueryParams.content},'%')
+            </if>
+            <if test="logQueryParams.operationType!='' and logQueryParams.operationType!=null">
+                and operation_type=#{logQueryParams.operationType}
+            </if>
+            <if test="logQueryParams.portEquipment!='' and logQueryParams.portEquipment!=null">
+                and user_agent=#{logQueryParams.portEquipment}
+            </if>
+            <if test="logQueryParams.id != null">
+                and admin_id=#{logQueryParams.id}
+            </if>
+            <if test="logQueryParams.startTime != '' and logQueryParams.endTime !='' and logQueryParams.startTime !=null and logQueryParams.endTime!=null ">
+                and create_time BETWEEN #{logQueryParams.startTime} AND #{logQueryParams.endTime}
+            </if>
+        </where>
+        <if test="logQueryParams.sort != null and logQueryParams.sort == 1">
+            ORDER BY create_time desc
+        </if>
+        <if test="logQueryParams.sort != null and logQueryParams.sort == 0">
+            ORDER BY create_time asc
+        </if>
+    </select>
+</mapper>

--
Gitblit v1.8.0