<?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.zcxk.rmcp.core.dao.FileLogMapper">
  <resultMap id="BaseResultMap" type="com.zcxk.rmcp.core.entity.FileLog">
    <!--@mbg.generated-->
    <!--@Table rmcp_file_log-->
    <id column="id" property="id" />
    <result column="file_type" property="fileType" />
    <result column="size" property="size" />
    <result column="name" property="name" />
    <result column="path" property="path" />
    <result column="url" property="url" />
    <result column="type" property="type" />
    <result column="status" property="status" />
    <result column="create_date" property="createDate" />
    <result column="create_by" property="createBy" />
    <result column="update_date" property="updateDate" />
    <result column="update_by" property="updateBy" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--@mbg.generated-->
    id, file_type, `size`, `name`, `path`, url, `type`, `status`, create_date, create_by, 
    update_date, update_by
  </sql>
  <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.zcxk.rmcp.core.entity.FileLog" useGeneratedKeys="true">
    <!--@mbg.generated-->
    insert into rmcp_file_log
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="fileType != null">
        file_type,
      </if>
      <if test="size != null">
        `size`,
      </if>
      <if test="name != null">
        `name`,
      </if>
      <if test="path != null">
        `path`,
      </if>
      <if test="url != null">
        url,
      </if>
      <if test="type != null">
        `type`,
      </if>
      <if test="status != null">
        `status`,
      </if>
      <if test="createDate != null">
        create_date,
      </if>
      <if test="createBy != null">
        create_by,
      </if>
      <if test="updateDate != null">
        update_date,
      </if>
      <if test="updateBy != null">
        update_by,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id},
      </if>
      <if test="fileType != null">
        #{fileType},
      </if>
      <if test="size != null">
        #{size},
      </if>
      <if test="name != null">
        #{name},
      </if>
      <if test="path != null">
        #{path},
      </if>
      <if test="url != null">
        #{url},
      </if>
      <if test="type != null">
        #{type},
      </if>
      <if test="status != null">
        #{status},
      </if>
      <if test="createDate != null">
        #{createDate},
      </if>
      <if test="createBy != null">
        #{createBy},
      </if>
      <if test="updateDate != null">
        #{updateDate},
      </if>
      <if test="updateBy != null">
        #{updateBy},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.zcxk.rmcp.core.entity.FileLog">
    <!--@mbg.generated-->
    update rmcp_file_log
    <set>
      <if test="fileType != null">
        file_type = #{fileType},
      </if>
      <if test="size != null">
        `size` = #{size},
      </if>
      <if test="name != null">
        `name` = #{name},
      </if>
      <if test="path != null">
        `path` = #{path},
      </if>
      <if test="url != null">
        url = #{url},
      </if>
      <if test="type != null">
        `type` = #{type},
      </if>
      <if test="status != null">
        `status` = #{status},
      </if>
      <if test="createDate != null">
        create_date = #{createDate},
      </if>
      <if test="createBy != null">
        create_by = #{createBy},
      </if>
      <if test="updateDate != null">
        update_date = #{updateDate},
      </if>
      <if test="updateBy != null">
        update_by = #{updateBy},
      </if>
    </set>
    where id = #{id}
  </update>

  <select id="getById" resultMap="BaseResultMap">
    select <include refid="Base_Column_List"/> from rmcp_file_log where  id = #{id}
  </select>
</mapper>