aboutsummaryrefslogtreecommitdiffstats
path: root/intentanalysis/src/main/resources/mybatis/sql
diff options
context:
space:
mode:
Diffstat (limited to 'intentanalysis/src/main/resources/mybatis/sql')
-rw-r--r--intentanalysis/src/main/resources/mybatis/sql/ConditionMapper.xml30
-rw-r--r--intentanalysis/src/main/resources/mybatis/sql/ContextMapper.xml6
-rw-r--r--intentanalysis/src/main/resources/mybatis/sql/ExpectationTargetMapper.xml4
-rw-r--r--intentanalysis/src/main/resources/mybatis/sql/IMFRegInfoMapper.xml13
4 files changed, 48 insertions, 5 deletions
diff --git a/intentanalysis/src/main/resources/mybatis/sql/ConditionMapper.xml b/intentanalysis/src/main/resources/mybatis/sql/ConditionMapper.xml
new file mode 100644
index 0000000..d77c06a
--- /dev/null
+++ b/intentanalysis/src/main/resources/mybatis/sql/ConditionMapper.xml
@@ -0,0 +1,30 @@
+<?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="org.onap.usecaseui.intentanalysis.mapper.ConditionMapper">
+
+ <insert id="insertConditionList">
+ insert into condition(condition_id, condition_name, operator_type, condition_value)
+ values
+ <foreach collection="contextList" index="index" item="item" separator=",">
+ (#{item.conditionId}, #{item.conditionName}, #{item.operatorType}, #{item.conditionValue})
+ </foreach>
+ </insert>
+
+ <insert id="insertConditionParentList">
+ insert into condition_mapping(condition_id, parent_type, parent_id)
+ values
+ <foreach collection="conditionList" index="index" item="item" separator=",">
+ (#{item.conditionId}, #{parentType}, #{parentId})
+ </foreach>
+ </insert>
+
+<!-- 这里的查询有问题-->
+ <select id="selectConditionByParentId" resultType="org.onap.usecaseui.intentanalysis.bean.models.Context">
+ select condition_id conditionId, condition_name conditiontName, operator_type operatorType
+ from condition
+ where condition_id = #{parentId}
+ </select>
+
+</mapper> \ No newline at end of file
diff --git a/intentanalysis/src/main/resources/mybatis/sql/ContextMapper.xml b/intentanalysis/src/main/resources/mybatis/sql/ContextMapper.xml
index 450721d..56569e4 100644
--- a/intentanalysis/src/main/resources/mybatis/sql/ContextMapper.xml
+++ b/intentanalysis/src/main/resources/mybatis/sql/ContextMapper.xml
@@ -6,10 +6,10 @@
<insert id="insertContextList">
- insert into context(context_id, context_name, context_type, context_condition)
+ insert into context(context_id, context_name)
values
<foreach collection="contextList" index="index" item="item" separator=",">
- (#{item.contextId}, #{item.contextName}, #{item.contextType}, #{item.contextCondition})
+ (#{item.contextId}, #{item.contextName})
</foreach>
</insert>
@@ -22,7 +22,7 @@
</insert>
<select id="selectContextByParentId" resultType="org.onap.usecaseui.intentanalysis.bean.models.Context">
- select context_id contextId, context_name contextName, context_type contextType, context_condition contextCondition
+ select context_id contextId, context_name contextName
from context
where intent_id = #{parentId}
</select>
diff --git a/intentanalysis/src/main/resources/mybatis/sql/ExpectationTargetMapper.xml b/intentanalysis/src/main/resources/mybatis/sql/ExpectationTargetMapper.xml
index 0a915bf..89648b5 100644
--- a/intentanalysis/src/main/resources/mybatis/sql/ExpectationTargetMapper.xml
+++ b/intentanalysis/src/main/resources/mybatis/sql/ExpectationTargetMapper.xml
@@ -6,9 +6,9 @@
<insert id="insertExpectationTarget">
- insert into expectation_target(target_id, target_name, target_condition, expectation_id)
+ insert into expectation_target(target_id, target_name, expectation_id)
values
- (#{expectationTarget.targetId}, #{expectationTarget.targetName}, #{expectationTarget.targetCondition}, #{expectationId})
+ (#{expectationTarget.targetId}, #{expectationTarget.targetName}, #{expectationId})
</insert>
</mapper>
diff --git a/intentanalysis/src/main/resources/mybatis/sql/IMFRegInfoMapper.xml b/intentanalysis/src/main/resources/mybatis/sql/IMFRegInfoMapper.xml
new file mode 100644
index 0000000..8f6cd3c
--- /dev/null
+++ b/intentanalysis/src/main/resources/mybatis/sql/IMFRegInfoMapper.xml
@@ -0,0 +1,13 @@
+<?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="org.onap.usecaseui.intentanalysis.mapper.IMFRegInfoMapper">
+
+ <insert id="insertIMFRegInfoRegInfo">
+ insert into intent_management_function_reg_info(imfr_info_id, imfr_info_description, support_model,handle_name,intent_function_type)
+ values
+ (#{imfregInfo.id}, #{imfregInfo.description}, #{imfregInfo.supportArea},#{imfregInfo.handleName},#{imfregInfo.intentFunctionType})
+ </insert>
+
+</mapper>