summaryrefslogtreecommitdiffstats
path: root/intentanalysis/src/main/resources/mybatis/sql/ExpectationMapper.xml
diff options
context:
space:
mode:
authorKeguang He <hekeguang@chinamobile.com>2022-07-26 01:17:21 +0000
committerGerrit Code Review <gerrit@onap.org>2022-07-26 01:17:21 +0000
commit0c41af52f3f453219a0240cf54ea321829a49c0e (patch)
tree682c84b423f65e9c5b7476a30f504e8a757cace2 /intentanalysis/src/main/resources/mybatis/sql/ExpectationMapper.xml
parent7753765f0712e846ff87a8b2dd6b9586b2e02f47 (diff)
parentc556b574b03a0458e1f8121351c80286ac02bb63 (diff)
Merge "Intent service impletation"
Diffstat (limited to 'intentanalysis/src/main/resources/mybatis/sql/ExpectationMapper.xml')
-rw-r--r--intentanalysis/src/main/resources/mybatis/sql/ExpectationMapper.xml28
1 files changed, 28 insertions, 0 deletions
diff --git a/intentanalysis/src/main/resources/mybatis/sql/ExpectationMapper.xml b/intentanalysis/src/main/resources/mybatis/sql/ExpectationMapper.xml
new file mode 100644
index 0000000..5c5ac06
--- /dev/null
+++ b/intentanalysis/src/main/resources/mybatis/sql/ExpectationMapper.xml
@@ -0,0 +1,28 @@
+<?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.server.mapper.ExpectationMapper">
+
+
+ <select id="selectExpectationByIntentId" resultType="org.onap.usecaseui.intentanalysis.bean.po.ExpectationPo">
+ select expectation_id expectationId, expectation_name expectationName,
+ target_moi targetMOI, intent_id intentId
+ from expectation
+ where intent_id = #{intentId}
+ </select>
+
+ <insert id="insertExpectation">
+ insert into expectation(expectation_id, expectation_name, target_moi, intent_id)
+ values
+ <foreach collection="list" index="index" item="item" separator=",">
+ (#{item.expectationId}, #{item.expectationName}, #{item.targetMOI}, #{item.intentId})
+ </foreach>
+ </insert>
+
+ <delete id="deleteExpectationByIntentId">
+ delete from expectation
+ where intent_id = #{intentId}
+ </delete>
+
+</mapper> \ No newline at end of file