|
|
@@ -0,0 +1,106 @@
|
|
|
+<?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.ruoyi.system.mapper.UserRecordMapper">
|
|
|
+
|
|
|
+ <resultMap id="BaseResultMap" type="com.ruoyi.system.domain.UserRecord">
|
|
|
+ <id property="id" column="id" jdbcType="BIGINT"/>
|
|
|
+ <result property="psrId" column="psr_id" jdbcType="BIGINT"/>
|
|
|
+ <result property="status" column="status" jdbcType="INTEGER"/>
|
|
|
+ <result property="content" column="content" jdbcType="VARCHAR"/>
|
|
|
+ <result property="recordTime" column="record_time" jdbcType="TIMESTAMP"/>
|
|
|
+ <result property="startTime" column="start_time" jdbcType="TIMESTAMP"/>
|
|
|
+ <result property="endTime" column="end_time" jdbcType="TIMESTAMP"/>
|
|
|
+ <result property="duration" column="duration" jdbcType="DOUBLE"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ id,psr_id,status,
|
|
|
+ content,record_time,start_time,
|
|
|
+ end_time,duration
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from user_record
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
|
+ delete from user_record
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.ruoyi.system.domain.UserRecord" useGeneratedKeys="true">
|
|
|
+ insert into user_record
|
|
|
+ ( id,psr_id,status
|
|
|
+ ,content,record_time,start_time
|
|
|
+ ,end_time,duration)
|
|
|
+ values (#{id,jdbcType=BIGINT},#{psrId,jdbcType=BIGINT},#{status,jdbcType=INTEGER}
|
|
|
+ ,#{content,jdbcType=VARCHAR},#{recordTime,jdbcType=TIMESTAMP},#{startTime,jdbcType=TIMESTAMP}
|
|
|
+ ,#{endTime,jdbcType=TIMESTAMP},#{duration,jdbcType=DOUBLE})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.ruoyi.system.domain.UserRecord" useGeneratedKeys="true">
|
|
|
+ insert into user_record
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">id,</if>
|
|
|
+ <if test="psrId != null">psr_id,</if>
|
|
|
+ <if test="status != null">status,</if>
|
|
|
+ <if test="content != null">content,</if>
|
|
|
+ <if test="recordTime != null">record_time,</if>
|
|
|
+ <if test="startTime != null">start_time,</if>
|
|
|
+ <if test="endTime != null">end_time,</if>
|
|
|
+ <if test="duration != null">duration,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">#{id,jdbcType=BIGINT},</if>
|
|
|
+ <if test="psrId != null">#{psrId,jdbcType=BIGINT},</if>
|
|
|
+ <if test="status != null">#{status,jdbcType=INTEGER},</if>
|
|
|
+ <if test="content != null">#{content,jdbcType=VARCHAR},</if>
|
|
|
+ <if test="recordTime != null">#{recordTime,jdbcType=TIMESTAMP},</if>
|
|
|
+ <if test="startTime != null">#{startTime,jdbcType=TIMESTAMP},</if>
|
|
|
+ <if test="endTime != null">#{endTime,jdbcType=TIMESTAMP},</if>
|
|
|
+ <if test="duration != null">#{duration,jdbcType=DOUBLE},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.ruoyi.system.domain.UserRecord">
|
|
|
+ update user_record
|
|
|
+ <set>
|
|
|
+ <if test="psrId != null">
|
|
|
+ psr_id = #{psrId,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ status = #{status,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="content != null">
|
|
|
+ content = #{content,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="recordTime != null">
|
|
|
+ record_time = #{recordTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="startTime != null">
|
|
|
+ start_time = #{startTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="endTime != null">
|
|
|
+ end_time = #{endTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="duration != null">
|
|
|
+ duration = #{duration,jdbcType=DOUBLE},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.ruoyi.system.domain.UserRecord">
|
|
|
+ update user_record
|
|
|
+ set
|
|
|
+ psr_id = #{psrId,jdbcType=BIGINT},
|
|
|
+ status = #{status,jdbcType=INTEGER},
|
|
|
+ content = #{content,jdbcType=VARCHAR},
|
|
|
+ record_time = #{recordTime,jdbcType=TIMESTAMP},
|
|
|
+ start_time = #{startTime,jdbcType=TIMESTAMP},
|
|
|
+ end_time = #{endTime,jdbcType=TIMESTAMP},
|
|
|
+ duration = #{duration,jdbcType=DOUBLE}
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
+ </update>
|
|
|
+</mapper>
|