|
|
@ -29,9 +29,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="saveOnline" parameterType="SysUserOnline">
|
|
|
|
<insert id="saveOnline" parameterType="SysUserOnline">
|
|
|
|
replace into sys_user_online(sessionId, login_name, dept_name, ipaddr, login_location, browser, os, status, start_timestamp, last_access_time, expire_time)
|
|
|
|
insert into sys_user_online(sessionId, login_name, dept_name, ipaddr, login_location, browser, os, status, start_timestamp, last_access_time, expire_time)
|
|
|
|
values (#{sessionId}, #{loginName}, #{deptName}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{status}, #{startTimestamp}, #{lastAccessTime}, #{expireTime})
|
|
|
|
values (#{sessionId}, #{loginName}, #{deptName}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{status}, #{startTimestamp}, #{lastAccessTime}, #{expireTime})
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<update id="updateOnline" parameterType="SysUserOnline">
|
|
|
|
|
|
|
|
update sys_user_online
|
|
|
|
|
|
|
|
<set>
|
|
|
|
|
|
|
|
<if test="loginName != null ">login_name = #{loginName},</if>
|
|
|
|
|
|
|
|
<if test="deptName != null and deptName != ''">dept_name = #{deptName},</if>
|
|
|
|
|
|
|
|
<if test="ipaddr != null and ipaddr != ''">ipaddr = #{ipaddr},</if>
|
|
|
|
|
|
|
|
<if test="loginLocation != null and loginLocation != ''">login_location = #{loginLocation},</if>
|
|
|
|
|
|
|
|
<if test="browser != null and browser != ''">browser = #{browser},</if>
|
|
|
|
|
|
|
|
<if test="os != null and os != ''">os = #{os},</if>
|
|
|
|
|
|
|
|
<if test="status != null">status = #{status},</if>
|
|
|
|
|
|
|
|
<if test="startTimestamp != null ">start_timestamp = #{startTimestamp},</if>
|
|
|
|
|
|
|
|
<if test="lastAccessTime != null ">last_access_time = #{lastAccessTime},</if>
|
|
|
|
|
|
|
|
<if test="expireTime != null ">expire_time = #{expireTime},</if>
|
|
|
|
|
|
|
|
</set>
|
|
|
|
|
|
|
|
where sessionId = #{sessionId}
|
|
|
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
|
|
<delete id="deleteOnlineById" parameterType="String">
|
|
|
|
<delete id="deleteOnlineById" parameterType="String">
|
|
|
|
delete from sys_user_online where sessionId = #{sessionId}
|
|
|
|
delete from sys_user_online where sessionId = #{sessionId}
|
|
|
|