aboutsummaryrefslogtreecommitdiffstats
path: root/intentanalysis/src/main/resources/mybatis/sql/ExpectationObjectMapper.xml
diff options
context:
space:
mode:
authorzhuguanyu <zhuguanyu5@huawei.com>2022-08-16 16:14:56 +0800
committerzhuguanyu <zhuguanyu5@huawei.com>2022-08-26 16:34:02 +0800
commita6a29c67cbb22b9b120d08fe5310a45a16d987c6 (patch)
treeab4941a0309a835b111dadd9fc8d2f9056f21f9f /intentanalysis/src/main/resources/mybatis/sql/ExpectationObjectMapper.xml
parent9643136574c0c06909ebe9af120c022fbb951b6d (diff)
Update intent module and intent API of retrieval
Issue-ID: USECASEUI-710 Signed-off-by: zhuguanyu <zhuguanyu5@huawei.com> Change-Id: I1d6e19db2a4c78f07b907f51fa3c9cf904eff4aa
Diffstat (limited to 'intentanalysis/src/main/resources/mybatis/sql/ExpectationObjectMapper.xml')
-rw-r--r--intentanalysis/src/main/resources/mybatis/sql/ExpectationObjectMapper.xml20
1 files changed, 17 insertions, 3 deletions
diff --git a/intentanalysis/src/main/resources/mybatis/sql/ExpectationObjectMapper.xml b/intentanalysis/src/main/resources/mybatis/sql/ExpectationObjectMapper.xml
index d67b9bf..b158eb2 100644
--- a/intentanalysis/src/main/resources/mybatis/sql/ExpectationObjectMapper.xml
+++ b/intentanalysis/src/main/resources/mybatis/sql/ExpectationObjectMapper.xml
@@ -6,9 +6,23 @@
<insert id="insertExpectationObject">
- insert into expectation_object(expectation_id, object_type, object_instance)
- values
- (#{expectationId}, #{expectationObject.objectType}, #{expectationObject.objectInstance})
+ <if test="expectationObject != null">
+ insert into expectation_object(object_type, object_instance, expectation_id)
+ values
+ (#{expectationObject.objectType}, #{expectationObject.objectInstance}, #{expectationId})
+ </if>
</insert>
+ <select id="selectIntentExpectationObjectByExpectationId" resultType="org.onap.usecaseui.intentanalysis.bean.models.ExpectationObject">
+ select object_type objectType, object_instance objectInstance
+ from expectation_object
+ where expectation_id = #{expectationId}
+ </select>
+
+ <select id="selectExpectationObjectId" resultType="java.lang.String">
+ select object_id
+ from expectation_object
+ where expectation_id = #{expectationId}
+ </select>
+
</mapper>