aboutsummaryrefslogtreecommitdiffstats
path: root/intentanalysis/src/main/resources/mybatis
diff options
context:
space:
mode:
authorkaixiliu <liukaixi@chinamobile.com>2023-08-29 10:45:18 +0800
committerkaixiliu <liukaixi@chinamobile.com>2023-08-29 10:45:56 +0800
commitb32a2d2af10287b1420f8c54b6a90b6aeabff12f (patch)
tree754e63eb3a7fed43304ac4cc71c2b1c511deea71 /intentanalysis/src/main/resources/mybatis
parentd87439a9b1e844c130ab1581e3fd174f401a498d (diff)
Modify Intent Model
Issue-ID: USECASEUI-819 Change-Id: I63041d772aac1e4591d2f8d71be7f699c25be3a1 Signed-off-by: kaixiliu <liukaixi@chinamobile.com>
Diffstat (limited to 'intentanalysis/src/main/resources/mybatis')
-rw-r--r--intentanalysis/src/main/resources/mybatis/sql/ExpectationObjectMapper.xml18
-rw-r--r--intentanalysis/src/main/resources/mybatis/sql/ObjectInstanceMapper.xml9
2 files changed, 12 insertions, 15 deletions
diff --git a/intentanalysis/src/main/resources/mybatis/sql/ExpectationObjectMapper.xml b/intentanalysis/src/main/resources/mybatis/sql/ExpectationObjectMapper.xml
index 74a0904..21244c2 100644
--- a/intentanalysis/src/main/resources/mybatis/sql/ExpectationObjectMapper.xml
+++ b/intentanalysis/src/main/resources/mybatis/sql/ExpectationObjectMapper.xml
@@ -7,14 +7,14 @@
<insert id="insertExpectationObject">
<if test="expectationObject != null">
- insert into expectation_object(object_type, object_instance, expectation_id)
+ insert into expectation_object(object_type, expectation_id)
values
- (#{expectationObject.objectType}, #{expectationObject.objectInstance}, #{expectationId})
+ (#{expectationObject.objectType}, #{expectationId})
</if>
</insert>
<select id="selectExpectationObject" resultType="org.onap.usecaseui.intentanalysis.bean.models.ExpectationObject">
- select object_type objectType, object_instance objectInstance
+ select object_type objectType
from expectation_object
where expectation_id = #{expectationId}
</select>
@@ -29,7 +29,6 @@
update expectation_object
<trim prefix="set" suffixOverrides=",">
<if test="expectationObject.objectType != null">object_type = #{expectationObject.objectType},</if>
- <if test="expectationObject.objectInstance != null">object_instance = #{expectationObject.objectInstance},</if>
</trim>
where expectation_id = #{expectationId}
</update>
@@ -38,15 +37,4 @@
delete from expectation_object
where expectation_id = #{expectationId}
</delete>
-
- <select id="getExpectationIdByObjectInstance" resultType="java.lang.String">
- select expectation_id
- from expectation_object
- where object_instance = #{objectInstance}
- </select>
-
- <select id="getAllObjectInstances" resultType="java.lang.String">
- select object_instance
- from expectation_object
- </select>
</mapper>
diff --git a/intentanalysis/src/main/resources/mybatis/sql/ObjectInstanceMapper.xml b/intentanalysis/src/main/resources/mybatis/sql/ObjectInstanceMapper.xml
index cec563c..bf93c95 100644
--- a/intentanalysis/src/main/resources/mybatis/sql/ObjectInstanceMapper.xml
+++ b/intentanalysis/src/main/resources/mybatis/sql/ObjectInstanceMapper.xml
@@ -22,4 +22,13 @@
delete from object_instance where parent_id = #{parentId}
</delete>
+ <select id="queryAllObjectInstances" resultType="java.lang.String">
+ select object_instance
+ from object_instance
+ </select>
+
+ <select id="getParentIdByInstance" resultType="java.lang.String">
+ select parent_id from object_instance where object_instance = #{objectInstance}
+ </select>
+
</mapper>