|
@@ -6,6 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
|
|
<resultMap type="BmDocument" id="BmDocumentResult">
|
|
<resultMap type="BmDocument" id="BmDocumentResult">
|
|
|
<id property="documentId" column="document_id" />
|
|
<id property="documentId" column="document_id" />
|
|
|
|
|
+ <result property="knowledgeId" column="knowledge_id" />
|
|
|
<result property="customSeparator" column="custom_separator" />
|
|
<result property="customSeparator" column="custom_separator" />
|
|
|
<result property="knowledgeType" column="knowledge_type" />
|
|
<result property="knowledgeType" column="knowledge_type" />
|
|
|
<result property="sentenceSize" column="sentence_size" />
|
|
<result property="sentenceSize" column="sentence_size" />
|
|
@@ -13,6 +14,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="wordNum" column="word_num" />
|
|
<result property="wordNum" column="word_num" />
|
|
|
<result property="name" column="name" />
|
|
<result property="name" column="name" />
|
|
|
<result property="url" column="url" />
|
|
<result property="url" column="url" />
|
|
|
|
|
+ <result property="parseImage" column="parse_image" />
|
|
|
<result property="remark" column="remark" />
|
|
<result property="remark" column="remark" />
|
|
|
<result property="createBy" column="create_by" />
|
|
<result property="createBy" column="create_by" />
|
|
|
<result property="createTime" column="create_time" />
|
|
<result property="createTime" column="create_time" />
|
|
@@ -21,7 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
<sql id="selectSql">
|
|
<sql id="selectSql">
|
|
|
- select document_id, custom_separator, knowledge_type, sentence_size, length, word_num, name,url, create_by, create_time, remark
|
|
|
|
|
|
|
+ select document_id, knowledge_id,custom_separator, knowledge_type, sentence_size, length, word_num, name,url, create_by, create_time, remark
|
|
|
from bm_document
|
|
from bm_document
|
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
|
@@ -31,6 +33,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="documentId != null and documentId != ''">
|
|
<if test="documentId != null and documentId != ''">
|
|
|
AND document_id = #{documentId}
|
|
AND document_id = #{documentId}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="knowledgeId != null and knowledgeId != ''">
|
|
|
|
|
+ AND knowledge_id = #{knowledgeId}
|
|
|
|
|
+ </if>
|
|
|
</where>
|
|
</where>
|
|
|
order by create_time asc
|
|
order by create_time asc
|
|
|
</select>
|
|
</select>
|
|
@@ -43,6 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<insert id="insertDocument" parameterType="BmDocument">
|
|
<insert id="insertDocument" parameterType="BmDocument">
|
|
|
insert into bm_document(
|
|
insert into bm_document(
|
|
|
<if test="documentId != null and documentId != ''">document_id,</if>
|
|
<if test="documentId != null and documentId != ''">document_id,</if>
|
|
|
|
|
+ <if test="knowledgeId != null and knowledgeId != ''">knowledge_id,</if>
|
|
|
<if test="customSeparator != null and customSeparator != ''">custom_separator,</if>
|
|
<if test="customSeparator != null and customSeparator != ''">custom_separator,</if>
|
|
|
<if test="knowledgeType != null">knowledge_type,</if>
|
|
<if test="knowledgeType != null">knowledge_type,</if>
|
|
|
<if test="sentenceSize != null and sentenceSize != ''">sentence_size,</if>
|
|
<if test="sentenceSize != null and sentenceSize != ''">sentence_size,</if>
|
|
@@ -50,11 +56,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="length != null">length,</if>
|
|
<if test="length != null">length,</if>
|
|
|
<if test="name != null and name != ''">name,</if>
|
|
<if test="name != null and name != ''">name,</if>
|
|
|
<if test="url != null and url != ''">url,</if>
|
|
<if test="url != null and url != ''">url,</if>
|
|
|
|
|
+ <if test="parseImage != null">parse_image,</if>
|
|
|
<if test="remark != null and remark != ''">remark,</if>
|
|
<if test="remark != null and remark != ''">remark,</if>
|
|
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
|
|
create_time
|
|
create_time
|
|
|
)values(
|
|
)values(
|
|
|
<if test="documentId != null and documentId != ''">#{documentId},</if>
|
|
<if test="documentId != null and documentId != ''">#{documentId},</if>
|
|
|
|
|
+ <if test="knowledgeId != null and knowledgeId != ''">#{knowledgeId},</if>
|
|
|
<if test="customSeparator != null and customSeparator != ''">#{customSeparator},</if>
|
|
<if test="customSeparator != null and customSeparator != ''">#{customSeparator},</if>
|
|
|
<if test="knowledgeType != null">#{knowledgeType},</if>
|
|
<if test="knowledgeType != null">#{knowledgeType},</if>
|
|
|
<if test="sentenceSize != null and sentenceSize != ''">#{sentenceSize},</if>
|
|
<if test="sentenceSize != null and sentenceSize != ''">#{sentenceSize},</if>
|
|
@@ -62,10 +70,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="length != null">#{length},</if>
|
|
<if test="length != null">#{length},</if>
|
|
|
<if test="name != null and name != ''">#{name},</if>
|
|
<if test="name != null and name != ''">#{name},</if>
|
|
|
<if test="url != null and url != ''">#{url},</if>
|
|
<if test="url != null and url != ''">#{url},</if>
|
|
|
|
|
+ <if test="parseImage != null">#{parseImage},</if>
|
|
|
<if test="remark != null and remark != ''">#{remark},</if>
|
|
<if test="remark != null and remark != ''">#{remark},</if>
|
|
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
|
|
sysdate()
|
|
sysdate()
|
|
|
)
|
|
)
|
|
|
</insert>
|
|
</insert>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <update id="updateDocument" parameterType="BmDocument">
|
|
|
|
|
+ update bm_document
|
|
|
|
|
+ <set>
|
|
|
|
|
+ <if test="customSeparator != null and customSeparator != ''">custom_separator = #{customSeparator},</if>
|
|
|
|
|
+ <if test="knowledgeType != null">knowledge_type = #{knowledgeType},</if>
|
|
|
|
|
+ <if test="sentenceSize != null and sentenceSize != ''">sentence_size = #{sentenceSize},</if>
|
|
|
|
|
+ <if test="wordNum != null">word_num = #{wordNum},</if>
|
|
|
|
|
+ <if test="length != null">length = #{length},</if>
|
|
|
|
|
+ <if test="name != null and name != ''">name = #{name},</if>
|
|
|
|
|
+ <if test="url != null and url != ''">url = #{url},</if>
|
|
|
|
|
+ <if test="parseImage != null">parse_image = #{parseImage},</if>
|
|
|
|
|
+ <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
|
|
|
|
+ <if test="remark != null">remark = #{remark},</if>
|
|
|
|
|
+ update_time = sysdate()
|
|
|
|
|
+ </set>
|
|
|
|
|
+ where document_id = #{documentId}
|
|
|
|
|
+ </update>
|
|
|
|
|
|
|
|
</mapper>
|
|
</mapper>
|