summaryrefslogtreecommitdiffstats
path: root/intentanalysis/src/main/resources/mybatis/sql/ExpectationTargetMapper.xml
diff options
context:
space:
mode:
Diffstat (limited to 'intentanalysis/src/main/resources/mybatis/sql/ExpectationTargetMapper.xml')
-rw-r--r--intentanalysis/src/main/resources/mybatis/sql/ExpectationTargetMapper.xml16
1 files changed, 12 insertions, 4 deletions
diff --git a/intentanalysis/src/main/resources/mybatis/sql/ExpectationTargetMapper.xml b/intentanalysis/src/main/resources/mybatis/sql/ExpectationTargetMapper.xml
index 89648b5..1910912 100644
--- a/intentanalysis/src/main/resources/mybatis/sql/ExpectationTargetMapper.xml
+++ b/intentanalysis/src/main/resources/mybatis/sql/ExpectationTargetMapper.xml
@@ -6,9 +6,17 @@
<insert id="insertExpectationTarget">
- insert into expectation_target(target_id, target_name, expectation_id)
- values
- (#{expectationTarget.targetId}, #{expectationTarget.targetName}, #{expectationId})
+ <if test="expectationTarget != null">
+ insert into expectation_target(target_id, target_name, target_condition, expectation_id)
+ values
+ (#{expectationTarget.targetId}, #{expectationTarget.targetName}, #{expectationTarget.targetCondition}, #{expectationId})
+ </if>
</insert>
-</mapper>
+ <select id="selectIntentExpectationTargetListByExpectationId" resultType="org.onap.usecaseui.intentanalysis.bean.models.ExpectationTarget">
+ select target_id targetId, target_name targetName, target_condition targetCondition
+ from expectation_target
+ where expectation_id = #{expectationId}
+ </select>
+
+</mapper> \ No newline at end of file