|
@@ -13,6 +13,7 @@
|
|
|
<result property="accessTime" column="access_time" />
|
|
|
<result property="deptId" column="dept_id" />
|
|
|
<result property="tenantId" column="tenant_id" />
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
</resultMap>
|
|
|
|
|
|
<insert id="insertLogininfor" parameterType="com.usky.system.domain.SysLogininfor">
|
|
@@ -25,6 +26,7 @@
|
|
|
<if test="accessTime != null"> access_time, </if>
|
|
|
<if test="deptId != null"> dept_id, </if>
|
|
|
<if test="tenantId != null"> tenant_id, </if>
|
|
|
+ <if test="createBy != null"> create_by, </if>
|
|
|
</trim>
|
|
|
values
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
@@ -35,11 +37,12 @@
|
|
|
<if test="accessTime != null"> #{accessTime},</if>
|
|
|
<if test="deptId != null"> #{deptId},</if>
|
|
|
<if test="tenantId != null"> #{tenantId},</if>
|
|
|
+ <if test="createBy != null"> #{createBy},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
<select id="selectLogininforList" parameterType="com.usky.system.domain.SysLogininfor" resultMap="SysLogininforResult">
|
|
|
- select info_id, user_name, ipaddr, status, msg, access_time from sys_logininfor
|
|
|
+ select info_id, user_name, ipaddr, status, msg, access_time from sys_logininfor d
|
|
|
<where>
|
|
|
<if test="ipaddr != null and ipaddr != ''">
|
|
|
AND ipaddr like concat('%', #{ipaddr}, '%')
|
|
@@ -56,12 +59,14 @@
|
|
|
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
|
|
and date_format(access_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
|
|
</if>
|
|
|
+ <!-- 数据范围过滤 -->
|
|
|
+ ${params.dataScope}
|
|
|
</where>
|
|
|
order by info_id desc
|
|
|
</select>
|
|
|
|
|
|
<select id="selectLogininforListExport" parameterType="com.usky.system.domain.SysLogininfor" resultType="com.usky.system.service.vo.SysLoginExportVO">
|
|
|
- select info_id, ipaddr, user_name, (case status when '0' then '成功' else '失败' end) as status, msg, access_time from sys_logininfor
|
|
|
+ select info_id, ipaddr, user_name, (case status when '0' then '成功' else '失败' end) as status, msg, access_time from sys_logininfor d
|
|
|
<where>
|
|
|
<if test="ipaddr != null and ipaddr != ''">
|
|
|
AND ipaddr like concat('%', #{ipaddr}, '%')
|
|
@@ -78,6 +83,7 @@
|
|
|
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
|
|
and date_format(access_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
|
|
</if>
|
|
|
+ ${params.dataScope}
|
|
|
</where>
|
|
|
order by info_id desc
|
|
|
</select>
|