<?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="io.renren.modules.sys.dao.algs.FileTestMapper">
  <resultMap id="BaseResultMap" type="io.renren.modules.sys.entity.algs.FileTest">
    <id column="fileid" jdbcType="BIGINT" property="fileid" />
    <result column="filename" jdbcType="VARCHAR" property="filename" />
    <result column="filesize" jdbcType="VARCHAR" property="filesize" />
    <result column="userid" jdbcType="BIGINT" property="userid" />
  </resultMap>
  <sql id="Base_Column_List">
    fileid, filename, filesize, userid
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from file_test
    where fileid = #{fileid,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from file_test
    where fileid = #{fileid,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="io.renren.modules.sys.entity.algs.FileTest">
    insert into file_test (fileid, filename, filesize, 
      userid)
    values (#{fileid,jdbcType=BIGINT}, #{filename,jdbcType=VARCHAR}, #{filesize,jdbcType=VARCHAR},
      #{userid,jdbcType=BIGINT})
  </insert>
  <insert id="insertSelective" parameterType="io.renren.modules.sys.entity.algs.FileTest">
    insert into file_test
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="fileid != null">
        fileid,
      </if>
      <if test="filename != null">
        filename,
      </if>
      <if test="filesize != null">
        filesize,
      </if>
      <if test="userid != null">
        userid,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="fileid != null">
        #{fileid,jdbcType=BIGINT},
      </if>
      <if test="filename != null">
        #{filename,jdbcType=VARCHAR},
      </if>
      <if test="filesize != null">
        #{filesize,jdbcType=VARCHAR},
      </if>
      <if test="userid != null">
        #{userid,jdbcType=BIGINT},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="io.renren.modules.sys.entity.algs.FileTest">
    update file_test
    <set>
      <if test="filename != null">
        filename = #{filename,jdbcType=VARCHAR},
      </if>
      <if test="filesize != null">
        filesize = #{filesize,jdbcType=VARCHAR},
      </if>
      <if test="userid != null">
        userid = #{userid,jdbcType=BIGINT},
      </if>
    </set>
    where fileid = #{fileid,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="io.renren.modules.sys.entity.algs.FileTest">
    update file_test
    set filename = #{filename,jdbcType=VARCHAR},
      filesize = #{filesize,jdbcType=VARCHAR},
      userid = #{userid,jdbcType=BIGINT}
    where fileid = #{fileid,jdbcType=BIGINT}
  </update>
</mapper>