|
@@ -0,0 +1,342 @@
|
|
|
|
+<?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.steerinfo.ems.tfileoperate.mapper.TFileOperateMapper">
|
|
|
|
+ <resultMap id="BaseResultMap" type="com.steerinfo.ems.tfileoperate.model.TFileOperate">
|
|
|
|
+ <id column="FILE_ID" jdbcType="VARCHAR" property="fileId" />
|
|
|
|
+ <result column="NODE_ID" jdbcType="VARCHAR" property="nodeId" />
|
|
|
|
+ <result column="FILE_NAME" jdbcType="VARCHAR" property="fileName" />
|
|
|
|
+ <result column="FILE_PATH" jdbcType="VARCHAR" property="filePath" />
|
|
|
|
+ <result column="FILE_TYPE" jdbcType="VARCHAR" property="fileType" />
|
|
|
|
+ <result column="CREATETIME" jdbcType="VARCHAR" property="createtime" />
|
|
|
|
+ <result column="UPDATETIME" jdbcType="VARCHAR" property="updatetime" />
|
|
|
|
+ <result column="CREATEMAN" jdbcType="VARCHAR" property="createman" />
|
|
|
|
+ <result column="UPDATEMAN" jdbcType="VARCHAR" property="updateman" />
|
|
|
|
+ <result column="BZ" jdbcType="VARCHAR" property="bz" />
|
|
|
|
+ </resultMap>
|
|
|
|
+ <sql id="columns">
|
|
|
|
+ FILE_ID, NODE_ID, FILE_NAME, FILE_PATH, FILE_TYPE, CREATETIME, UPDATETIME, CREATEMAN,
|
|
|
|
+ UPDATEMAN, BZ
|
|
|
|
+ </sql>
|
|
|
|
+ <sql id="columns_alias">
|
|
|
|
+ t.FILE_ID, t.NODE_ID, t.FILE_NAME, t.FILE_PATH, t.FILE_TYPE, t.CREATETIME, t.UPDATETIME,
|
|
|
|
+ t.CREATEMAN, t.UPDATEMAN, t.BZ
|
|
|
|
+ </sql>
|
|
|
|
+ <sql id="select">
|
|
|
|
+ SELECT <include refid="columns" /> FROM T_FILE_OPERATE
|
|
|
|
+ </sql>
|
|
|
|
+ <sql id="select_alias">
|
|
|
|
+ SELECT <include refid="columns_alias" /> FROM T_FILE_OPERATE t
|
|
|
|
+ </sql>
|
|
|
|
+ <sql id="where">
|
|
|
|
+ <where>
|
|
|
|
+ <if test="fileId != null and fileId != ''">
|
|
|
|
+ and FILE_ID = #{fileId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="nodeId != null and nodeId != ''">
|
|
|
|
+ and NODE_ID = #{nodeId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="fileName != null and fileName != ''">
|
|
|
|
+ and FILE_NAME = #{fileName}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="filePath != null and filePath != ''">
|
|
|
|
+ and FILE_PATH = #{filePath}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="fileType != null and fileType != ''">
|
|
|
|
+ and FILE_TYPE = #{fileType}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createtime != null and createtime != ''">
|
|
|
|
+ and CREATETIME = #{createtime}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updatetime != null and updatetime != ''">
|
|
|
|
+ and UPDATETIME = #{updatetime}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createman != null and createman != ''">
|
|
|
|
+ and CREATEMAN = #{createman}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updateman != null and updateman != ''">
|
|
|
|
+ and UPDATEMAN = #{updateman}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="bz != null and bz != ''">
|
|
|
|
+ and BZ = #{bz}
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
|
|
+ </sql>
|
|
|
|
+ <sql id="whereLike">
|
|
|
|
+ <where>
|
|
|
|
+ <if test="fileId != null and fileId != ''">
|
|
|
|
+ and FILE_ID LIKE '%${fileId}%'
|
|
|
|
+ </if>
|
|
|
|
+ <if test="nodeId != null and nodeId != ''">
|
|
|
|
+ and NODE_ID LIKE '%${nodeId}%'
|
|
|
|
+ </if>
|
|
|
|
+ <if test="fileName != null and fileName != ''">
|
|
|
|
+ and FILE_NAME LIKE '%${fileName}%'
|
|
|
|
+ </if>
|
|
|
|
+ <if test="filePath != null and filePath != ''">
|
|
|
|
+ and FILE_PATH LIKE '%${filePath}%'
|
|
|
|
+ </if>
|
|
|
|
+ <if test="fileType != null and fileType != ''">
|
|
|
|
+ and FILE_TYPE LIKE '%${fileType}%'
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createtime != null and createtime != ''">
|
|
|
|
+ and CREATETIME LIKE '%${createtime}%'
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updatetime != null and updatetime != ''">
|
|
|
|
+ and UPDATETIME LIKE '%${updatetime}%'
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createman != null and createman != ''">
|
|
|
|
+ and CREATEMAN LIKE '%${createman}%'
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updateman != null and updateman != ''">
|
|
|
|
+ and UPDATEMAN LIKE '%${updateman}%'
|
|
|
|
+ </if>
|
|
|
|
+ <if test="bz != null and bz != ''">
|
|
|
|
+ and BZ LIKE '%${bz}%'
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
|
|
+ </sql>
|
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
|
+ delete from T_FILE_OPERATE
|
|
|
|
+ where FILE_ID = #{fileId,jdbcType=VARCHAR}
|
|
|
|
+ </delete>
|
|
|
|
+ <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
|
|
+ delete from T_FILE_OPERATE
|
|
|
|
+ where 1!=1
|
|
|
|
+ <if test="nodeId != null and nodeId != ''">
|
|
|
|
+ or NODE_ID = #{nodeId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="fileName != null and fileName != ''">
|
|
|
|
+ or FILE_NAME = #{fileName}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="filePath != null and filePath != ''">
|
|
|
|
+ or FILE_PATH = #{filePath}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="fileType != null and fileType != ''">
|
|
|
|
+ or FILE_TYPE = #{fileType}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createtime != null and createtime != ''">
|
|
|
|
+ or CREATETIME = #{createtime}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updatetime != null and updatetime != ''">
|
|
|
|
+ or UPDATETIME = #{updatetime}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createman != null and createman != ''">
|
|
|
|
+ or CREATEMAN = #{createman}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updateman != null and updateman != ''">
|
|
|
|
+ or UPDATEMAN = #{updateman}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="bz != null and bz != ''">
|
|
|
|
+ or BZ = #{bz}
|
|
|
|
+ </if>
|
|
|
|
+ </delete>
|
|
|
|
+ <insert id="insert" parameterType="com.steerinfo.ems.tfileoperate.model.TFileOperate">
|
|
|
|
+ insert into T_FILE_OPERATE (FILE_ID, NODE_ID, FILE_NAME,
|
|
|
|
+ FILE_PATH, FILE_TYPE, CREATETIME,
|
|
|
|
+ UPDATETIME, CREATEMAN, UPDATEMAN,
|
|
|
|
+ BZ)
|
|
|
|
+ values (#{fileId,jdbcType=VARCHAR}, #{nodeId,jdbcType=VARCHAR}, #{fileName,jdbcType=VARCHAR},
|
|
|
|
+ #{filePath,jdbcType=VARCHAR}, #{fileType,jdbcType=VARCHAR}, #{createtime,jdbcType=VARCHAR},
|
|
|
|
+ #{updatetime,jdbcType=VARCHAR}, #{createman,jdbcType=VARCHAR}, #{updateman,jdbcType=VARCHAR},
|
|
|
|
+ #{bz,jdbcType=VARCHAR})
|
|
|
|
+ </insert>
|
|
|
|
+ <insert id="insertSelective" parameterType="com.steerinfo.ems.tfileoperate.model.TFileOperate">
|
|
|
|
+ insert into T_FILE_OPERATE
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="fileId != null">
|
|
|
|
+ FILE_ID,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="nodeId != null">
|
|
|
|
+ NODE_ID,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="fileName != null">
|
|
|
|
+ FILE_NAME,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="filePath != null">
|
|
|
|
+ FILE_PATH,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="fileType != null">
|
|
|
|
+ FILE_TYPE,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createtime != null">
|
|
|
|
+ CREATETIME,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updatetime != null">
|
|
|
|
+ UPDATETIME,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createman != null">
|
|
|
|
+ CREATEMAN,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updateman != null">
|
|
|
|
+ UPDATEMAN,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="bz != null">
|
|
|
|
+ BZ,
|
|
|
|
+ </if>
|
|
|
|
+ </trim>
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="fileId != null">
|
|
|
|
+ #{fileId,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="nodeId != null">
|
|
|
|
+ #{nodeId,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="fileName != null">
|
|
|
|
+ #{fileName,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="filePath != null">
|
|
|
|
+ #{filePath,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="fileType != null">
|
|
|
|
+ #{fileType,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createtime != null">
|
|
|
|
+ #{createtime,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updatetime != null">
|
|
|
|
+ #{updatetime,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createman != null">
|
|
|
|
+ #{createman,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updateman != null">
|
|
|
|
+ #{updateman,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="bz != null">
|
|
|
|
+ #{bz,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ </trim>
|
|
|
|
+ </insert>
|
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.tfileoperate.model.TFileOperate">
|
|
|
|
+ update T_FILE_OPERATE
|
|
|
|
+ set NODE_ID = #{nodeId,jdbcType=VARCHAR},
|
|
|
|
+ FILE_NAME = #{fileName,jdbcType=VARCHAR},
|
|
|
|
+ FILE_PATH = #{filePath,jdbcType=VARCHAR},
|
|
|
|
+ FILE_TYPE = #{fileType,jdbcType=VARCHAR},
|
|
|
|
+ CREATETIME = #{createtime,jdbcType=VARCHAR},
|
|
|
|
+ UPDATETIME = #{updatetime,jdbcType=VARCHAR},
|
|
|
|
+ CREATEMAN = #{createman,jdbcType=VARCHAR},
|
|
|
|
+ UPDATEMAN = #{updateman,jdbcType=VARCHAR},
|
|
|
|
+ BZ = #{bz,jdbcType=VARCHAR}
|
|
|
|
+ where FILE_ID = #{fileId,jdbcType=VARCHAR}
|
|
|
|
+ </update>
|
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.tfileoperate.model.TFileOperate">
|
|
|
|
+ update T_FILE_OPERATE
|
|
|
|
+ <set>
|
|
|
|
+ <if test="nodeId != null">
|
|
|
|
+ NODE_ID = #{nodeId,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="fileName != null">
|
|
|
|
+ FILE_NAME = #{fileName,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="filePath != null">
|
|
|
|
+ FILE_PATH = #{filePath,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="fileType != null">
|
|
|
|
+ FILE_TYPE = #{fileType,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createtime != null">
|
|
|
|
+ CREATETIME = #{createtime,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updatetime != null">
|
|
|
|
+ UPDATETIME = #{updatetime,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createman != null">
|
|
|
|
+ CREATEMAN = #{createman,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updateman != null">
|
|
|
|
+ UPDATEMAN = #{updateman,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="bz != null">
|
|
|
|
+ BZ = #{bz,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ </set>
|
|
|
|
+ where FILE_ID = #{fileId,jdbcType=VARCHAR}
|
|
|
|
+ </update>
|
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
|
+ <include refid="select" />
|
|
|
|
+ where FILE_ID = #{fileId,jdbcType=VARCHAR}
|
|
|
|
+ </select>
|
|
|
|
+ <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
|
+ <include refid="select"/>
|
|
|
|
+ where NODE_ID = #{nodeId,jdbcType=VARCHAR}
|
|
|
|
+ </select>
|
|
|
|
+ <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
|
+ <include refid="select" />
|
|
|
|
+ <include refid="whereLike" />
|
|
|
|
+ </select>
|
|
|
|
+ <insert id="batchInsert" parameterType="java.util.List">
|
|
|
|
+ insert into T_FILE_OPERATE
|
|
|
|
+ (FILE_ID,
|
|
|
|
+ NODE_ID, FILE_NAME, FILE_PATH,
|
|
|
|
+ FILE_TYPE, CREATETIME, UPDATETIME,
|
|
|
|
+ CREATEMAN, UPDATEMAN, BZ
|
|
|
|
+ )
|
|
|
|
+ ( <foreach collection="list" item="item" separator="union all">
|
|
|
|
+ select
|
|
|
|
+ #{item.fileId,jdbcType=VARCHAR},
|
|
|
|
+ #{item.nodeId,jdbcType=VARCHAR}, #{item.fileName,jdbcType=VARCHAR}, #{item.filePath,jdbcType=VARCHAR},
|
|
|
|
+ #{item.fileType,jdbcType=VARCHAR}, #{item.createtime,jdbcType=VARCHAR}, #{item.updatetime,jdbcType=VARCHAR},
|
|
|
|
+ #{item.createman,jdbcType=VARCHAR}, #{item.updateman,jdbcType=VARCHAR}, #{item.bz,jdbcType=VARCHAR}
|
|
|
|
+ from dual
|
|
|
|
+ </foreach> )
|
|
|
|
+ </insert>
|
|
|
|
+ <update id="batchUpdate" parameterType="java.util.List">
|
|
|
|
+ update T_FILE_OPERATE
|
|
|
|
+ set
|
|
|
|
+ FILE_ID=
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case FILE_ID" separator=" ">
|
|
|
|
+ when #{item.fileId,jdbcType=VARCHAR} then #{item.fileId,jdbcType=VARCHAR}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,NODE_ID=
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case FILE_ID" separator=" ">
|
|
|
|
+ when #{item.fileId,jdbcType=VARCHAR} then #{item.nodeId,jdbcType=VARCHAR}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,FILE_NAME=
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case FILE_ID" separator=" ">
|
|
|
|
+ when #{item.fileId,jdbcType=VARCHAR} then #{item.fileName,jdbcType=VARCHAR}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,FILE_PATH=
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case FILE_ID" separator=" ">
|
|
|
|
+ when #{item.fileId,jdbcType=VARCHAR} then #{item.filePath,jdbcType=VARCHAR}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,FILE_TYPE=
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case FILE_ID" separator=" ">
|
|
|
|
+ when #{item.fileId,jdbcType=VARCHAR} then #{item.fileType,jdbcType=VARCHAR}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,CREATETIME=
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case FILE_ID" separator=" ">
|
|
|
|
+ when #{item.fileId,jdbcType=VARCHAR} then #{item.createtime,jdbcType=VARCHAR}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,UPDATETIME=
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case FILE_ID" separator=" ">
|
|
|
|
+ when #{item.fileId,jdbcType=VARCHAR} then #{item.updatetime,jdbcType=VARCHAR}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,CREATEMAN=
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case FILE_ID" separator=" ">
|
|
|
|
+ when #{item.fileId,jdbcType=VARCHAR} then #{item.createman,jdbcType=VARCHAR}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,UPDATEMAN=
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case FILE_ID" separator=" ">
|
|
|
|
+ when #{item.fileId,jdbcType=VARCHAR} then #{item.updateman,jdbcType=VARCHAR}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,BZ=
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case FILE_ID" separator=" ">
|
|
|
|
+ when #{item.fileId,jdbcType=VARCHAR} then #{item.bz,jdbcType=VARCHAR}
|
|
|
|
+ </foreach>
|
|
|
|
+ where FILE_ID in
|
|
|
|
+ <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
|
|
+ #{item.fileId,jdbcType=VARCHAR}
|
|
|
|
+ </foreach>
|
|
|
|
+ </update>
|
|
|
|
+ <delete id="batchDelete" parameterType="java.util.List">
|
|
|
|
+ delete from T_FILE_OPERATE
|
|
|
|
+ where FILE_ID in
|
|
|
|
+ <foreach close=")" collection="list" item="id" open="(" separator=",">
|
|
|
|
+ #{id}
|
|
|
|
+ </foreach>
|
|
|
|
+ </delete>
|
|
|
|
+ <!-- 友情提示!!!-->
|
|
|
|
+ <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
|
+
|
|
|
|
+</mapper>
|