|
@@ -0,0 +1,111 @@
|
|
|
+<?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.doc.biz.mapper.DocInfoDelMapper">
|
|
|
+
|
|
|
+ <resultMap type="DocInfoDel" id="DocInfoDelResult">
|
|
|
+ <result property="docId" column="DOC_ID" />
|
|
|
+ <result property="spaceId" column="SPACE_ID" />
|
|
|
+ <result property="dirId" column="DIR_ID" />
|
|
|
+ <result property="fileName" column="FILE_NAME" />
|
|
|
+ <result property="fileId" column="FILE_ID" />
|
|
|
+ <result property="fileSize" column="FILE_SIZE" />
|
|
|
+ <result property="fileType" column="FILE_TYPE" />
|
|
|
+ <result property="createBy" column="CREATE_BY" />
|
|
|
+ <result property="createTime" column="CREATE_TIME" />
|
|
|
+ <result property="updateBy" column="UPDATE_BY" />
|
|
|
+ <result property="updateTime" column="UPDATE_TIME" />
|
|
|
+ <result property="delTime" column="DEL_TIME" />
|
|
|
+ <result property="remark" column="REMARK" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectDocInfoDelVo">
|
|
|
+ select DOC_ID, SPACE_ID, DIR_ID, FILE_NAME, FILE_ID, FILE_SIZE, FILE_TYPE, CREATE_BY, CREATE_TIME, UPDATE_BY, UPDATE_TIME, DEL_TIME, REMARK from doc_info_del
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectDocInfoDelList" parameterType="DocInfoDel" resultMap="DocInfoDelResult">
|
|
|
+ <include refid="selectDocInfoDelVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="spaceId != null "> and SPACE_ID = #{spaceId}</if>
|
|
|
+ <if test="dirId != null "> and DIR_ID = #{dirId}</if>
|
|
|
+ <if test="fileName != null and fileName != ''"> and FILE_NAME like concat('%', #{fileName}, '%')</if>
|
|
|
+ <if test="fileId != null and fileId != ''"> and FILE_ID = #{fileId}</if>
|
|
|
+ <if test="fileSize != null "> and FILE_SIZE = #{fileSize}</if>
|
|
|
+ <if test="fileType != null and fileType != ''"> and FILE_TYPE = #{fileType}</if>
|
|
|
+ <if test="createBy != null and createBy != ''"> and CREATE_BY = #{createBy}</if>
|
|
|
+ <if test="createTime != null "> and CREATE_TIME = #{createTime}</if>
|
|
|
+ <if test="updateBy != null and updateBy != ''"> and UPDATE_BY = #{updateBy}</if>
|
|
|
+ <if test="updateTime != null "> and UPDATE_TIME = #{updateTime}</if>
|
|
|
+ <if test="delTime != null "> and DEL_TIME = #{delTime}</if>
|
|
|
+ <if test="remark != null and remark != ''"> and REMARK = #{remark}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectDocInfoDelByDocId" parameterType="Long" resultMap="DocInfoDelResult">
|
|
|
+ <include refid="selectDocInfoDelVo"/>
|
|
|
+ where DOC_ID = #{docId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertDocInfoDel" parameterType="DocInfoDel" useGeneratedKeys="true" keyProperty="docId">
|
|
|
+ insert into doc_info_del
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="spaceId != null">SPACE_ID,</if>
|
|
|
+ <if test="dirId != null">DIR_ID,</if>
|
|
|
+ <if test="fileName != null">FILE_NAME,</if>
|
|
|
+ <if test="fileId != null">FILE_ID,</if>
|
|
|
+ <if test="fileSize != null">FILE_SIZE,</if>
|
|
|
+ <if test="fileType != null">FILE_TYPE,</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>
|
|
|
+ <if test="delTime != null">DEL_TIME,</if>
|
|
|
+ <if test="remark != null">REMARK,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="spaceId != null">#{spaceId},</if>
|
|
|
+ <if test="dirId != null">#{dirId},</if>
|
|
|
+ <if test="fileName != null">#{fileName},</if>
|
|
|
+ <if test="fileId != null">#{fileId},</if>
|
|
|
+ <if test="fileSize != null">#{fileSize},</if>
|
|
|
+ <if test="fileType != null">#{fileType},</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>
|
|
|
+ <if test="delTime != null">#{delTime},</if>
|
|
|
+ <if test="remark != null">#{remark},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateDocInfoDel" parameterType="DocInfoDel">
|
|
|
+ update doc_info_del
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="spaceId != null">SPACE_ID = #{spaceId},</if>
|
|
|
+ <if test="dirId != null">DIR_ID = #{dirId},</if>
|
|
|
+ <if test="fileName != null">FILE_NAME = #{fileName},</if>
|
|
|
+ <if test="fileId != null">FILE_ID = #{fileId},</if>
|
|
|
+ <if test="fileSize != null">FILE_SIZE = #{fileSize},</if>
|
|
|
+ <if test="fileType != null">FILE_TYPE = #{fileType},</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>
|
|
|
+ <if test="delTime != null">DEL_TIME = #{delTime},</if>
|
|
|
+ <if test="remark != null">REMARK = #{remark},</if>
|
|
|
+ </trim>
|
|
|
+ where DOC_ID = #{docId}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteDocInfoDelByDocId" parameterType="Long">
|
|
|
+ delete from doc_info_del where DOC_ID = #{docId}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteDocInfoDelByDocIds" parameterType="String">
|
|
|
+ delete from doc_info_del where DOC_ID in
|
|
|
+ <foreach item="docId" collection="array" open="(" separator="," close=")">
|
|
|
+ #{docId}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|