diff options
author | zhuguanyu <zhuguanyu5@huawei.com> | 2022-08-16 16:14:56 +0800 |
---|---|---|
committer | zhuguanyu <zhuguanyu5@huawei.com> | 2022-08-26 16:34:02 +0800 |
commit | a6a29c67cbb22b9b120d08fe5310a45a16d987c6 (patch) | |
tree | ab4941a0309a835b111dadd9fc8d2f9056f21f9f /intentanalysis/src/main/resources/mybatis/sql/ExpectationTargetMapper.xml | |
parent | 9643136574c0c06909ebe9af120c022fbb951b6d (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/ExpectationTargetMapper.xml')
-rw-r--r-- | intentanalysis/src/main/resources/mybatis/sql/ExpectationTargetMapper.xml | 16 |
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 |