|
@@ -0,0 +1,99 @@
|
|
|
|
|
+<?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.MdFileUoloadMapper">
|
|
|
|
|
+
|
|
|
|
|
+ <resultMap type="com.ruoyi.interfaces.domain.MdFileUoload" id="MdFileUoloadResult">
|
|
|
|
|
+ <result property="mdid" column="mdid" />
|
|
|
|
|
+ <result property="fileVersion" column="file_version" />
|
|
|
|
|
+ <result property="state" column="state" />
|
|
|
|
|
+ <result property="remark" column="remark" />
|
|
|
|
|
+ <result property="filePath" column="file_path" />
|
|
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
|
|
+ <result property="updateBy" column="update_by" />
|
|
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
|
|
+ </resultMap>
|
|
|
|
|
+
|
|
|
|
|
+ <sql id="selectMdFileUoloadVo">
|
|
|
|
|
+ select file_Id, mdid, file_version,state, remark, file_path, create_by, create_time, update_by, update_time from md_file_uoload
|
|
|
|
|
+ </sql>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="selectMdFileUoloadList" parameterType="com.ruoyi.interfaces.domain.MdFileUoload" resultMap="MdFileUoloadResult">
|
|
|
|
|
+ <include refid="selectMdFileUoloadVo"/>
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="mdid != null and mdid != ''">and mdid = #{mdid}</if>
|
|
|
|
|
+ <if test="state != null and state != ''">and state = #{state}</if>
|
|
|
|
|
+ <if test="filePath != null and filePath != ''">and file_path = #{filePath}</if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ order by create_by desc
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="selectMdFileUoloadByFileId" parameterType="String" resultMap="MdFileUoloadResult">
|
|
|
|
|
+ <include refid="selectMdFileUoloadVo"/>
|
|
|
|
|
+ where file_Id = #{fileId}
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <insert id="insertMdFileUoload" parameterType="com.ruoyi.interfaces.domain.MdFileUoload" useGeneratedKeys="true" keyProperty="mdid">
|
|
|
|
|
+ insert into md_file_uoload
|
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
+ <if test="mdid != null">mdid,</if>
|
|
|
|
|
+ <if test="fileVersion != null">file_version,</if>
|
|
|
|
|
+ <if test="state != null">state,</if>
|
|
|
|
|
+ <if test="remark != null">remark,</if>
|
|
|
|
|
+ <if test="filePath != null">file_path,</if>
|
|
|
|
|
+ <if test="createBy != null">create_by,</if>
|
|
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
|
|
+ <if test="updateBy != null">update_by,</if>
|
|
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
+ <if test="mdid != null">#{mdid},</if>
|
|
|
|
|
+ <if test="fileVersion != null">#{fileVersion},</if>
|
|
|
|
|
+ <if test="state != null">#{state},</if>
|
|
|
|
|
+ <if test="remark != null">#{remark},</if>
|
|
|
|
|
+ <if test="filePath != null">#{filePath},</if>
|
|
|
|
|
+ <if test="createBy != null">#{createBy},</if>
|
|
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
|
|
+ <if test="updateBy != null">#{updateBy},</if>
|
|
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ </insert>
|
|
|
|
|
+
|
|
|
|
|
+ <update id="updateMdFileUoload" parameterType="com.ruoyi.interfaces.domain.MdFileUoload">
|
|
|
|
|
+ update md_file_uoload
|
|
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
|
|
+ <if test="mdid != null">mdid = #{mdid},</if>
|
|
|
|
|
+ <if test="fileVersion != null">file_version = #{fileVersion},</if>
|
|
|
|
|
+ <if test="remark != null">remark = #{remark},</if>
|
|
|
|
|
+ <if test="filePath != null">file_path = #{filePath},</if>
|
|
|
|
|
+ <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
|
|
+ <if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ where file_Id = #{fileId}
|
|
|
|
|
+ </update>
|
|
|
|
|
+ <update id="startMdFileUoload">
|
|
|
|
|
+ update md_file_uoload set state = '1'
|
|
|
|
|
+ where file_Id = #{fileId}
|
|
|
|
|
+ </update>
|
|
|
|
|
+ <update id="shutMdFileUoload">
|
|
|
|
|
+ update md_file_uoload
|
|
|
|
|
+ set state = '0'
|
|
|
|
|
+ where file_Id != #{fileId}
|
|
|
|
|
+ and mdid = #{mdid}
|
|
|
|
|
+ </update>
|
|
|
|
|
+
|
|
|
|
|
+ <delete id="deleteMdFileUoloadByMdid" parameterType="String">
|
|
|
|
|
+ delete from md_file_uoload where file_id = #{fileId}
|
|
|
|
|
+ </delete>
|
|
|
|
|
+
|
|
|
|
|
+ <delete id="deleteMdFileUoloadByMdids" >
|
|
|
|
|
+ delete from md_file_uoload where file_id in
|
|
|
|
|
+ <foreach item="fileId" collection="array" open="(" separator="," close=")">
|
|
|
|
|
+ #{fileId}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </delete>
|
|
|
|
|
+</mapper>
|