|
@@ -0,0 +1,92 @@
|
|
|
+<?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.kgraph.graph.suport.mapper.ExtractByHandMapper">
|
|
|
+
|
|
|
+ <resultMap type="ExtractByHand" id="ExtractByHandResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="subTaskId" column="sub_task_id" />
|
|
|
+ <result property="pageNo" column="page_no" />
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ <result property="updateBy" column="update_by" />
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
+ <collection property="details" select="selectDetailsByHandId" column="id" javaType="ArrayList" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectExtractByHandVo">
|
|
|
+ select id, sub_task_id, page_no, create_by, create_time, update_by, update_time from t_extract_by_hand
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectExtractByHandList" parameterType="ExtractByHand" resultMap="ExtractByHandResult">
|
|
|
+ <include refid="selectExtractByHandVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="subTaskId != null "> and sub_task_id = #{subTaskId}</if>
|
|
|
+ <if test="pageNo != null "> and page_no = #{pageNo}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getExtractByHandBySubtaskId" parameterType="Long" resultMap="ExtractByHandResult">
|
|
|
+ <include refid="selectExtractByHandVo"/>
|
|
|
+ where sub_task_id = #{subTaskId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectExtractByHandById" parameterType="Long" resultMap="ExtractByHandResult">
|
|
|
+ <include refid="selectExtractByHandVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <sql id="selectExtractByHandDetailVo">
|
|
|
+ select id, hand_id as handId, entity_class_id as entityClassId, entity, create_by as createBy, create_time as createTime, update_by as updateBy, update_time as updateTime from t_extract_by_hand_detail
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectDetailsByHandId" resultType="com.kgraph.graph.suport.domain.ExtractByHandDetail">
|
|
|
+ <include refid="selectExtractByHandDetailVo"/>
|
|
|
+ WHERE hand_id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertExtractByHand" parameterType="ExtractByHand" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into t_extract_by_hand
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="subTaskId != null">sub_task_id,</if>
|
|
|
+ <if test="pageNo != null">page_no,</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="subTaskId != null">#{subTaskId},</if>
|
|
|
+ <if test="pageNo != null">#{pageNo},</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="updateExtractByHand" parameterType="ExtractByHand">
|
|
|
+ update t_extract_by_hand
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="subTaskId != null">sub_task_id = #{subTaskId},</if>
|
|
|
+ <if test="pageNo != null">page_no = #{pageNo},</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 id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteExtractByHandById" parameterType="Long">
|
|
|
+ delete from t_extract_by_hand where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteExtractByHandByIds" parameterType="String">
|
|
|
+ delete from t_extract_by_hand where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|