55 lines
1.8 KiB
XML
55 lines
1.8 KiB
XML
|
|
<?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="UnivConnectLog">
|
||
|
|
|
||
|
|
<insert id="insertUnivConnectLog" parameterType="UnivConnectLog">
|
||
|
|
INSERT INTO UnivConnectLog ( connectLogId, uid, created, endTime, timeLength ,areaid ) Values ( #{connectLogId}, #{uid}, #{created}, #{endTime}, #{timeLength} , #{areaId} )
|
||
|
|
|
||
|
|
</insert>
|
||
|
|
|
||
|
|
<update id="updateUnivConnectLog" parameterType="UnivConnectLog">
|
||
|
|
|
||
|
|
|
||
|
|
UPDATE UnivConnectLog SET
|
||
|
|
|
||
|
|
connectLogId = #{connectLogId}, uid = #{uid}, created = #{created}, endTime = #{endTime}, timeLength = #{timeLength} , areaid= #{areaId}
|
||
|
|
where connectLogId=#{connectLogId}
|
||
|
|
|
||
|
|
</update>
|
||
|
|
|
||
|
|
<select id="getUnivConnectLogByKey" parameterType="java.lang.Integer" resultType="UnivConnectLog">
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
SELECT connectLogId , uid , created , endTime , timeLength , areaid
|
||
|
|
FROM ConnectLog WHERE connectLogId=#{connectLogId}
|
||
|
|
|
||
|
|
</select>
|
||
|
|
|
||
|
|
|
||
|
|
<select id="getSeqUnivConnectLog" resultType="Integer" useCache="false" flushCache="true">
|
||
|
|
|
||
|
|
SELECT nextval('seq_univconnectLogId') ;
|
||
|
|
|
||
|
|
</select>
|
||
|
|
|
||
|
|
|
||
|
|
<select id="getUnivConnectLogsCountByUid" parameterType="java.util.Map" resultType="Integer">
|
||
|
|
|
||
|
|
SELECT count(*) as howmuch from ConnectLog
|
||
|
|
WHERE uid=#{uid} and areaid = #{areaid}
|
||
|
|
|
||
|
|
</select>
|
||
|
|
<select id="getUnivConnectLogsByUid" parameterType="java.util.Map" resultType="UnivConnectLog">
|
||
|
|
|
||
|
|
|
||
|
|
SELECT connectLogId , uid , created , endTime , timeLength
|
||
|
|
FROM ConnectLog
|
||
|
|
WHERE uid=#{uid} and areaid = #{areaid}
|
||
|
|
ORDER BY connectLogId desc
|
||
|
|
LIMIT #{pageSize} OFFSET #{offset}
|
||
|
|
|
||
|
|
</select>
|
||
|
|
|
||
|
|
</mapper>
|