From 31ee5f69f4e8f3d2620be1f4440a593e97eea946 Mon Sep 17 00:00:00 2001
From: wl <173@qq.com>
Date: 星期三, 16 十一月 2022 17:57:01 +0800
Subject: [PATCH] 导出bug
---
ycl-common/src/main/resources/mapper/user/UmsAdminLoginLogMapper.xml | 41 ++++++++++++++++++++++++++++++++++-------
1 files changed, 34 insertions(+), 7 deletions(-)
diff --git a/ycl-common/src/main/resources/mapper/user/UmsAdminLoginLogMapper.xml b/ycl-common/src/main/resources/mapper/user/UmsAdminLoginLogMapper.xml
index 48e945f..1f5a1fd 100644
--- a/ycl-common/src/main/resources/mapper/user/UmsAdminLoginLogMapper.xml
+++ b/ycl-common/src/main/resources/mapper/user/UmsAdminLoginLogMapper.xml
@@ -4,12 +4,39 @@
<!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 -->
<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" />
+ <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