summaryrefslogtreecommitdiffstats
path: root/intentanalysis/src/main/resources/mybatis/sql/ExpectationObjectMapper.xml
diff options
context:
space:
mode:
authorzhangfan345 <zhangfan345@huawei.com>2022-08-30 10:47:22 +0800
committerguanyu zhu <zhuguanyu5@huawei.com>2022-08-30 12:20:27 +0000
commit6331fc23cbe8321150fbcf0f176a1106e3982aa0 (patch)
tree94d8e38425d30e120f91596e82eb28d766490e9e /intentanalysis/src/main/resources/mybatis/sql/ExpectationObjectMapper.xml
parenta6a29c67cbb22b9b120d08fe5310a45a16d987c6 (diff)
Update intent module and CRUD APIs
Issue-ID: USECASEUI-710 Signed-off-by: zhangfan345 <zhangfan345@huawei.com> Change-Id: I3e53e952b3554235e324b87adef2a997bae82d2a Signed-off-by: zhangfan345 <zhangfan345@huawei.com>
Diffstat (limited to 'intentanalysis/src/main/resources/mybatis/sql/ExpectationObjectMapper.xml')
-rw-r--r--intentanalysis/src/main/resources/mybatis/sql/ExpectationObjectMapper.xml15
1 files changed, 14 insertions, 1 deletions
diff --git a/intentanalysis/src/main/resources/mybatis/sql/ExpectationObjectMapper.xml b/intentanalysis/src/main/resources/mybatis/sql/ExpectationObjectMapper.xml
index b158eb2..1c8b513 100644
--- a/intentanalysis/src/main/resources/mybatis/sql/ExpectationObjectMapper.xml
+++ b/intentanalysis/src/main/resources/mybatis/sql/ExpectationObjectMapper.xml
@@ -13,7 +13,7 @@
</if>
</insert>
- <select id="selectIntentExpectationObjectByExpectationId" resultType="org.onap.usecaseui.intentanalysis.bean.models.ExpectationObject">
+ <select id="selectExpectationObject" resultType="org.onap.usecaseui.intentanalysis.bean.models.ExpectationObject">
select object_type objectType, object_instance objectInstance
from expectation_object
where expectation_id = #{expectationId}
@@ -25,4 +25,17 @@
where expectation_id = #{expectationId}
</select>
+ <update id="updateExpectationObject">
+ 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>
+
+ <delete id="deleteExpectationObject">
+ delete from expectation_object
+ where expectation_id = #{expectationId}
+ </delete>
</mapper>