| <?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.dy.pmsGlobal.daoOth.OthFileMapper"> | 
|   <resultMap id="BaseResultMap" type="com.dy.pmsGlobal.pojoOth.OthFile"> | 
|     <!--@mbg.generated--> | 
|     <!--@Table oth_file--> | 
|     <id column="id" property="id" /> | 
|     <result column="org_name" property="orgName" /> | 
|     <result column="ext_name" property="extName" /> | 
|     <result column="new_name" property="newName" /> | 
|     <result column="hash" property="hash" /> | 
|     <result column="file_path" property="filePath" /> | 
|     <result column="dt" property="dt" /> | 
|   </resultMap> | 
|   <sql id="Base_Column_List"> | 
|     <!--@mbg.generated--> | 
|     id, org_name, ext_name, new_name, hash, file_path, dt | 
|   </sql> | 
|   <sql id="Join_Column_List"> | 
|     ${alias}.id, ${alias}.org_name, ${alias}.ext_name, ${alias}.new_name, ${alias}.hash, ${alias}.file_path, ${alias}.dt | 
|   </sql> | 
|   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> | 
|     <!--@mbg.generated--> | 
|     select  | 
|     <include refid="Base_Column_List" /> | 
|     from oth_file | 
|     where id = #{id} | 
|   </select> | 
|   <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> | 
|     <!--@mbg.generated--> | 
|     delete from oth_file | 
|     where id = #{id} | 
|   </delete> | 
|   <insert id="insert" parameterType="com.dy.pmsGlobal.pojoOth.OthFile"> | 
|     <!--@mbg.generated--> | 
|     insert into oth_file (id, org_name, ext_name, new_name, hash, file_path, | 
|       dt) | 
|     values (#{id}, #{orgName}, #{extName}, #{newName}, #{hash}, #{filePath}, | 
|       #{dt}) | 
|   </insert> | 
|   <insert id="insertSelective" parameterType="com.dy.pmsGlobal.pojoOth.OthFile"> | 
|     <!--@mbg.generated--> | 
|     insert into oth_file | 
|     <trim prefix="(" suffix=")" suffixOverrides=","> | 
|       <if test="id != null"> | 
|         id, | 
|       </if> | 
|       <if test="orgName != null"> | 
|         org_name, | 
|       </if> | 
|       <if test="extName != null"> | 
|         ext_name, | 
|       </if> | 
|       <if test="newName != null"> | 
|         new_name, | 
|       </if> | 
|       <if test="hash != null"> | 
|         hash, | 
|       </if> | 
|       <if test="filePath != null"> | 
|         file_path, | 
|       </if> | 
|       <if test="dt != null"> | 
|         dt, | 
|       </if> | 
|     </trim> | 
|     <trim prefix="values (" suffix=")" suffixOverrides=","> | 
|       <if test="id != null"> | 
|         #{id}, | 
|       </if> | 
|       <if test="orgName != null"> | 
|         #{orgName}, | 
|       </if> | 
|       <if test="extName != null"> | 
|         #{extName}, | 
|       </if> | 
|       <if test="newName != null"> | 
|         #{newName}, | 
|       </if> | 
|       <if test="hash != null"> | 
|         #{hash}, | 
|       </if> | 
|       <if test="filePath != null"> | 
|         #{filePath}, | 
|       </if> | 
|       <if test="dt != null"> | 
|         #{dt}, | 
|       </if> | 
|     </trim> | 
|   </insert> | 
|   <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoOth.OthFile"> | 
|     <!--@mbg.generated--> | 
|     update oth_file | 
|     <set> | 
|       <if test="orgName != null"> | 
|         org_name = #{orgName}, | 
|       </if> | 
|       <if test="extName != null"> | 
|         ext_name = #{extName}, | 
|       </if> | 
|       <if test="newName != null"> | 
|         new_name = #{newName}, | 
|       </if> | 
|       <if test="hash != null"> | 
|         hash = #{hash}, | 
|       </if> | 
|       <if test="filePath != null"> | 
|         file_path = #{filePath}, | 
|       </if> | 
|       <if test="dt != null"> | 
|         dt = #{dt}, | 
|       </if> | 
|     </set> | 
|     where id = #{id} | 
|   </update> | 
|   <update id="updateByPrimaryKey" parameterType="com.dy.pmsGlobal.pojoOth.OthFile"> | 
|     <!--@mbg.generated--> | 
|     update oth_file | 
|     set org_name = #{orgName}, | 
|       ext_name = #{extName}, | 
|       new_name = #{newName}, | 
|       hash = #{hash}, | 
|       file_path = #{filePath}, | 
|       dt = #{dt} | 
|     where id = #{id} | 
|   </update> | 
|   | 
|   <select id="selectByProId" resultMap="BaseResultMap"> | 
|     select | 
|     <include refid="Join_Column_List"> | 
|         <property name="alias" value="f"/> | 
|     </include> | 
|     from oth_file f | 
|     inner join plt_product_file pf on f.id = pf.file_id | 
|     where pf.pro_id = #{proId} | 
|   </select> | 
| </mapper> |