| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206 |
- <?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.ydtech.modules.ins.dao.InsFileMapper">
- <resultMap id="BaseResultMap" type="com.ydtech.modules.ins.model.InsFileDto">
- <id column="fileid" jdbcType="VARCHAR" property="fileid"/>
- <result column="dirid" jdbcType="VARCHAR" property="dirid"/>
- <result column="oldfilename" jdbcType="VARCHAR" property="oldfilename"/>
- <result column="newfilename" jdbcType="VARCHAR" property="newfilename"/>
- <result column="filepath" jdbcType="VARCHAR" property="filepath"/>
- <result column="url" jdbcType="VARCHAR" property="url"/>
- <result column="ctratetime" jdbcType="DATE" property="ctratetime"/>
- <result column="updatetime" jdbcType="DATE" property="updatetime"/>
- </resultMap>
- <sql id="Base_Column_List">
- fileid, dirid, oldfilename, newfilename, filepath, url, ctratetime, updatetime
- </sql>
- <select id="selectByExample" parameterType="com.ydtech.modules.ins.model.InsFileDto" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List"/>
- from ins_file
- WHERE 1=1
- <if test="fileid != null">
- AND fileid = #{fileidjdbcType=VARCHAR}
- </if>
- <if test="dirid != null">
- AND dirid = #{diridjdbcType=VARCHAR}
- </if>
- <if test="oldfilename != null">
- AND oldfilename = #{oldfilenamejdbcType=VARCHAR}
- </if>
- <if test="newfilename != null">
- AND newfilename = #{newfilenamejdbcType=VARCHAR}
- </if>
- <if test="filepath != null">
- AND filepath = #{filepathjdbcType=VARCHAR}
- </if>
- <if test="url != null">
- AND url = #{urljdbcType=VARCHAR}
- </if>
- <if test="ctratetime != null">
- AND ctratetime = #{ctratetimejdbcType=DATE}
- </if>
- <if test="updatetime != null">
- AND updatetime = #{updatetimejdbcType=DATE}
- </if>
- ORDER BY updatetime DESC
- </select>
- <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List"/>
- from ins_file
- where fileid = #{fileid,jdbcType=VARCHAR}
- </select>
- <select id="selectByDirId" resultType="com.ydtech.modules.ins.model.InsFileDto">
- select
- <include refid="Base_Column_List"/>
- from ins_file
- where dirid = #{dirid,jdbcType=VARCHAR}
- </select>
- <select id="selectByOldfilename" parameterType="java.lang.String" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List"/>
- from ins_file
- where oldfilename = #{fileName,jdbcType=VARCHAR}
- </select>
- <select id="selectByFileid" resultType="com.ydtech.modules.ins.model.InsFileDto">
- select
- <include refid="Base_Column_List"/>
- from ins_file
- where fileid = #{fileid,jdbcType=VARCHAR}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
- delete
- from ins_file
- where fileid = #{fileid,jdbcType=VARCHAR}
- </delete>
- <delete id="deleteByExample" parameterType="com.ydtech.modules.ins.model.InsFileDto">
- delete from ins_file WHERE 1=1
- <if test="fileid != null">
- AND fileid = #{fileid, jdbcType=VARCHAR}
- </if>
- <if test="dirid != null">
- AND dirid = #{dirid, jdbcType=VARCHAR}
- </if>
- <if test="oldfilename != null">
- AND oldfilename = #{oldfilename, jdbcType=VARCHAR}
- </if>
- <if test="newfilename != null">
- AND newfilename = #{newfilename, jdbcType=VARCHAR}
- </if>
- <if test="filepath != null">
- AND filepath = #{filepath, jdbcType=VARCHAR}
- </if>
- <if test="url != null">
- AND url = #{url, jdbcType=VARCHAR}
- </if>
- <if test="ctratetime != null">
- AND ctratetime = #{ctratetime, jdbcType=DATE}
- </if>
- <if test="updatetime != null">
- AND updatetime = #{updatetime, jdbcType=DATE}
- </if>
- </delete>
- <insert id="insert" parameterType="com.ydtech.modules.ins.model.InsFileDto">
- insert into ins_file (fileid, dirid,
- oldfilename, newfilename, filepath,
- url, ctratetime, updatetime)
- values (#{fileid,jdbcType=VARCHAR}, #{dirid,jdbcType=VARCHAR},
- #{oldfilename,jdbcType=VARCHAR}, #{newfilename,jdbcType=VARCHAR}, #{filepath,jdbcType=VARCHAR},
- #{url,jdbcType=VARCHAR}, #{ctratetime,jdbcType=DATE}, #{updatetime,jdbcType=DATE})
- </insert>
- <insert id="insertSelective" parameterType="com.ydtech.modules.ins.model.InsFileDto">
- insert into ins_file
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="fileid != null">
- fileid,
- </if>
- <if test="dirid != null">
- dirid,
- </if>
- <if test="oldfilename != null">
- oldfilename,
- </if>
- <if test="newfilename != null">
- newfilename,
- </if>
- <if test="filepath != null">
- filepath,
- </if>
- <if test="url != null">
- url,
- </if>
- <if test="ctratetime != null">
- ctratetime,
- </if>
- <if test="updatetime != null">
- updatetime,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="fileid != null">
- #{fileid,jdbcType=VARCHAR},
- </if>
- <if test="dirid != null">
- #{dirid,jdbcType=VARCHAR},
- </if>
- <if test="oldfilename != null">
- #{oldfilename,jdbcType=VARCHAR},
- </if>
- <if test="newfilename != null">
- #{newfilename,jdbcType=VARCHAR},
- </if>
- <if test="filepath != null">
- #{filepath,jdbcType=VARCHAR},
- </if>
- <if test="url != null">
- #{url,jdbcType=VARCHAR},
- </if>
- <if test="ctratetime != null">
- #{ctratetime,jdbcType=DATE},
- </if>
- <if test="updatetime != null">
- #{updatetime,jdbcType=DATE},
- </if>
- </trim>
- </insert>
- <update id="updateByExample" parameterType="com.ydtech.modules.ins.model.InsFileDto">
- update ins_file
- <set>
- <if test="dirid != null">
- dirid = #{dirid,jdbcType=VARCHAR},
- </if>
- <if test="oldfilename != null">
- oldfilename = #{oldfilename,jdbcType=VARCHAR},
- </if>
- <if test="newfilename != null">
- newfilename = #{newfilename,jdbcType=VARCHAR},
- </if>
- <if test="filepath != null">
- filepath = #{filepath,jdbcType=VARCHAR},
- </if>
- <if test="url != null">
- url = #{url,jdbcType=VARCHAR},
- </if>
- <if test="ctratetime != null">
- ctratetime = #{ctratetime,jdbcType=DATE},
- </if>
- <if test="updatetime != null">
- updatetime = #{updatetime,jdbcType=DATE},
- </if>
- </set>
- where fileid = #{fileid,jdbcType=VARCHAR}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.ydtech.modules.ins.model.InsFileDto">
- update ins_file
- set dirid = #{dirid,jdbcType=VARCHAR},
- oldfilename = #{oldfilename,jdbcType=VARCHAR},
- newfilename = #{newfilename,jdbcType=VARCHAR},
- filepath = #{filepath,jdbcType=VARCHAR},
- url = #{url,jdbcType=VARCHAR},
- ctratetime = #{ctratetime,jdbcType=DATE},
- updatetime = #{updatetime,jdbcType=DATE}
- where fileid = #{fileid,jdbcType=VARCHAR}
- </update>
- </mapper>
|