<?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.interfaces.mapper.PtMapFileMapper">
    <resultMap id="BaseResultMap" type="com.ruoyi.interfaces.domain.PtMapFile">
        <id column="FILE_ID" jdbcType="VARCHAR" property="fileId"/>
        <result column="MAP_ID" jdbcType="VARCHAR" property="mapId"/>
        <result column="REL_ID" jdbcType="VARCHAR" property="relId"/>
        <result column="FILE_TYPE" jdbcType="VARCHAR" property="fileType"/>
        <result column="FILE_PATH" jdbcType="VARCHAR" property="filePath"/>
        <result column="FILE_SAVENAME" jdbcType="VARCHAR" property="fileSavename"/>
        <result column="FILE_VIEWNAME" jdbcType="VARCHAR" property="fileViewname"/>
        <result column="FILE_TIME" jdbcType="TIMESTAMP" property="fileTime"/>
    </resultMap>

    <sql id="Base_Column_List">
        FILE_ID
        , MAP_ID, REL_ID, FILE_TYPE, FILE_PATH, FILE_SAVENAME, FILE_VIEWNAME, FILE_TIME
    </sql>

    <insert id="insert" parameterType="com.ruoyi.interfaces.domain.PtMapFile">
        insert into PT_MAP_FILE (FILE_ID, MAP_ID, REL_ID,
                                 FILE_TYPE, FILE_PATH, FILE_SAVENAME,
                                 FILE_VIEWNAME, FILE_TIME)
        values (#{fileId,jdbcType=VARCHAR}, #{mapId,jdbcType=VARCHAR}, #{relId,jdbcType=VARCHAR},
                #{fileType,jdbcType=VARCHAR}, #{filePath,jdbcType=VARCHAR}, #{fileSavename,jdbcType=VARCHAR},
                #{fileViewname,jdbcType=VARCHAR}, #{fileTime,jdbcType=TIMESTAMP})
    </insert>

    <select id="selectByMapId" parameterType="java.lang.String" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List"/>
        from PT_MAP_FILE
        where MAP_ID = #{mapId,jdbcType=VARCHAR}
    </select>

    <update id="updateByPrimaryKeySelective" parameterType="com.ruoyi.interfaces.domain.PtMapFile">
        update PT_MAP_FILE
        <set>
            <if test="mapId != null">
                MAP_ID = #{mapId,jdbcType=VARCHAR},
            </if>
            <if test="relId != null">
                REL_ID = #{relId,jdbcType=VARCHAR},
            </if>
            <if test="fileType != null">
                FILE_TYPE = #{fileType,jdbcType=VARCHAR},
            </if>
            <if test="filePath != null">
                FILE_PATH = #{filePath,jdbcType=VARCHAR},
            </if>
            <if test="fileSavename != null">
                FILE_SAVENAME = #{fileSavename,jdbcType=VARCHAR},
            </if>
            <if test="fileViewname != null">
                FILE_VIEWNAME = #{fileViewname,jdbcType=VARCHAR},
            </if>
            <if test="fileTime != null">
                FILE_TIME = #{fileTime,jdbcType=TIMESTAMP},
            </if>
        </set>
        where FILE_ID = #{fileId,jdbcType=VARCHAR}
    </update>

    <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
        delete
        from PT_MAP_FILE
        where MAP_ID = #{mapId,jdbcType=VARCHAR}
    </delete>

    <!--  <select id="selectByMAP_ID" parameterType="java.lang.String" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from PT_MAP_FILE
        where MAP_ID = #{MAP_ID,jdbcType=VARCHAR}
      </select>

      <select id="selectByExample" parameterType="com.ruoyi.interfaces.domain.PtMapFileCriteria" resultMap="BaseResultMap">
        select
        <if test="distinct">
          distinct
        </if>
        'false' as QUERYID,
        <include refid="Base_Column_List" />
        from PT_MAP_FILE
        <if test="_parameter != null">
          <include refid="Example_Where_Clause" />
        </if>
        <if test="orderByClause != null">
          order by ${orderByClause}
        </if>
      </select>
      <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from PT_MAP_FILE
        where FILE_ID = #{fileId,jdbcType=VARCHAR}
      </select>

      <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
        delete from PT_MAP_FILE
        where FILE_ID = #{fileId,jdbcType=VARCHAR}
      </delete>

      <delete id="deleteByMAP_ID" parameterType="java.lang.String">
        delete from PT_MAP_FILE
        where MAP_ID = #{MAP_ID,jdbcType=VARCHAR}
      </delete>

      <insert id="insert" parameterType="com.ruoyi.interfaces.domain.PtMapFile">
        insert into PT_MAP_FILE (FILE_ID, MAP_ID, REL_ID,
          FILE_TYPE, FILE_PATH, FILE_SAVENAME,
          FILE_VIEWNAME, FILE_TIME)
        values (#{fileId,jdbcType=VARCHAR}, #{MAP_ID,jdbcType=VARCHAR}, #{relId,jdbcType=VARCHAR},
          #{fileType,jdbcType=VARCHAR}, #{filePath,jdbcType=VARCHAR}, #{fileSavename,jdbcType=VARCHAR},
          #{fileViewname,jdbcType=VARCHAR}, #{fileTime,jdbcType=TIMESTAMP})
      </insert>
      <insert id="insertSelective" parameterType="com.ruoyi.interfaces.domain.PtMapFile">
        insert into PT_MAP_FILE
        <trim prefix="(" suffix=")" suffixOverrides=",">
          <if test="fileId != null">
            FILE_ID,
          </if>
          <if test="MAP_ID != null">
            MAP_ID,
          </if>
          <if test="relId != null">
            REL_ID,
          </if>
          <if test="fileType != null">
            FILE_TYPE,
          </if>
          <if test="filePath != null">
            FILE_PATH,
          </if>
          <if test="fileSavename != null">
            FILE_SAVENAME,
          </if>
          <if test="fileViewname != null">
            FILE_VIEWNAME,
          </if>
          <if test="fileTime != null">
            FILE_TIME,
          </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
          <if test="fileId != null">
            #{fileId,jdbcType=VARCHAR},
          </if>
          <if test="MAP_ID != null">
            #{MAP_ID,jdbcType=VARCHAR},
          </if>
          <if test="relId != null">
            #{relId,jdbcType=VARCHAR},
          </if>
          <if test="fileType != null">
            #{fileType,jdbcType=VARCHAR},
          </if>
          <if test="filePath != null">
            #{filePath,jdbcType=VARCHAR},
          </if>
          <if test="fileSavename != null">
            #{fileSavename,jdbcType=VARCHAR},
          </if>
          <if test="fileViewname != null">
            #{fileViewname,jdbcType=VARCHAR},
          </if>
          <if test="fileTime != null">
            #{fileTime,jdbcType=TIMESTAMP},
          </if>
        </trim>
      </insert>



      <update id="updateByMAP_ID" parameterType="com.ruoyi.interfaces.domain.PtMapFile">
        update PT_MAP_FILE
        <set>
          <if test="MAP_ID != null">
            MAP_ID = #{MAP_ID,jdbcType=VARCHAR},
          </if>
          <if test="relId != null">
            REL_ID = #{relId,jdbcType=VARCHAR},
          </if>
          <if test="fileType != null">
            FILE_TYPE = #{fileType,jdbcType=VARCHAR},
          </if>
          <if test="filePath != null">
            FILE_PATH = #{filePath,jdbcType=VARCHAR},
          </if>
          <if test="fileSavename != null">
            FILE_SAVENAME = #{fileSavename,jdbcType=VARCHAR},
          </if>
          <if test="fileViewname != null">
            FILE_VIEWNAME = #{fileViewname,jdbcType=VARCHAR},
          </if>
          <if test="fileTime != null">
            FILE_TIME = #{fileTime,jdbcType=TIMESTAMP},
          </if>
        </set>
        where MAP_ID = #{MAP_ID,jdbcType=VARCHAR}
      </update>

      <update id="updateByPrimaryKey" parameterType="com.ruoyi.interfaces.domain.PtMapFile">
        update PT_MAP_FILE
        set MAP_ID = #{MAP_ID,jdbcType=VARCHAR},
          REL_ID = #{relId,jdbcType=VARCHAR},
          FILE_TYPE = #{fileType,jdbcType=VARCHAR},
          FILE_PATH = #{filePath,jdbcType=VARCHAR},
          FILE_SAVENAME = #{fileSavename,jdbcType=VARCHAR},
          FILE_VIEWNAME = #{fileViewname,jdbcType=VARCHAR},
          FILE_TIME = #{fileTime,jdbcType=TIMESTAMP}
        where FILE_ID = #{fileId,jdbcType=VARCHAR}
      </update>
      <select id="selectByExampleWithRowbounds" parameterType="com.ruoyi.interfaces.domain.PtMapFileCriteria" resultMap="BaseResultMap">
        select
        <if test="distinct">
          distinct
        </if>
        'false' as QUERYID,
        <include refid="Base_Column_List" />
        from PT_MAP_FILE
        <if test="_parameter != null">
          <include refid="Example_Where_Clause" />
        </if>
        <if test="orderByClause != null">
          order by ${orderByClause}
        </if>
      </select>-->


    <cache/>
</mapper>
