|
@@ -0,0 +1,63 @@
|
|
|
+<!DOCTYPE mapper
|
|
|
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
+
|
|
|
+<mapper namespace="com.bosshand.virgo.file.document.dao.DocumentInputDataDao">
|
|
|
+
|
|
|
+ <resultMap type="com.bosshand.virgo.file.document.model.DocumentInputData" id="documentInputDataResult">
|
|
|
+ <id column="id" property="id"/>
|
|
|
+ <result column="documentTemplateId" property="documentTemplateId"/>
|
|
|
+ <result column="name" property="name"/>
|
|
|
+ <result column="type" property="type"/>
|
|
|
+ <result column="code" property="code"/>
|
|
|
+ <result column="required" property="required"/>
|
|
|
+ <result column="data" property="data"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <insert id="insert" parameterType="com.bosshand.virgo.file.document.model.DocumentInputData" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ INSERT INTO document_input_data(`documentTemplateId`, `name`, `type`, `code`, `required`, `data`)
|
|
|
+ VALUES (#{documentTemplateId}, #{name}, #{type}, #{code}, #{required}, #{data})
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <delete id="delete">
|
|
|
+ DELETE from document_input_data where documentTemplateId=#{documentTemplateId}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <update id="update" parameterType="com.bosshand.virgo.file.document.model.DocumentInputData">
|
|
|
+ UPDATE document_input_data
|
|
|
+ <trim prefix="set" suffixOverrides=",">
|
|
|
+ <if test="documentTemplateId!=0">documentTemplateId=#{documentTemplateId},</if>
|
|
|
+ <if test="name!=null">name=#{name},</if>
|
|
|
+ <if test="type!=null">type=#{type},</if>
|
|
|
+ <if test="code!=null">code=#{code},</if>
|
|
|
+ <if test="required!=null">required=#{required},</if>
|
|
|
+ <if test="data!=null">data=#{data},</if>
|
|
|
+ </trim>
|
|
|
+ WHERE id=#{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <select id="getList" resultMap="documentInputDataResult">
|
|
|
+ SELECT * FROM document_input_data
|
|
|
+ <where>
|
|
|
+ <if test="id != 0">
|
|
|
+ and id = #{id}
|
|
|
+ </if>
|
|
|
+ <if test="documentTemplateId != 0">
|
|
|
+ and documentTemplateId = #{documentTemplateId}
|
|
|
+ </if>
|
|
|
+ <if test="name != null">
|
|
|
+ and name = #{name}
|
|
|
+ </if>
|
|
|
+ <if test="type != null">
|
|
|
+ and type = #{type}
|
|
|
+ </if>
|
|
|
+ <if test="code != null">
|
|
|
+ and code = #{code}
|
|
|
+ </if>
|
|
|
+ <if test="required != null">
|
|
|
+ and required = #{required}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+</mapper>
|