From c556b574b03a0458e1f8121351c80286ac02bb63 Mon Sep 17 00:00:00 2001 From: ShuhaoCai Date: Mon, 25 Jul 2022 11:01:46 +0800 Subject: Intent service impletation Signed-off-by: ShuhaoCai Issue-ID: USECASEUI-704 Change-Id: If31afadd3c81ffa308a51ad4e6ba65a82e557010 --- .../resources/mybatis/sql/ExpectationMapper.xml | 28 +++++++++++++++++ .../main/resources/mybatis/sql/IntentMapper.xml | 35 ++++++++++++++++++++++ .../src/main/resources/mybatis/sql/StateMapper.xml | 27 +++++++++++++++++ 3 files changed, 90 insertions(+) create mode 100644 intentanalysis/src/main/resources/mybatis/sql/ExpectationMapper.xml create mode 100644 intentanalysis/src/main/resources/mybatis/sql/IntentMapper.xml create mode 100644 intentanalysis/src/main/resources/mybatis/sql/StateMapper.xml (limited to 'intentanalysis/src/main/resources/mybatis/sql') 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 @@ + + + + + + + + + insert into expectation(expectation_id, expectation_name, target_moi, intent_id) + values + + (#{item.expectationId}, #{item.expectationName}, #{item.targetMOI}, #{item.intentId}) + + + + + delete from expectation + where intent_id = #{intentId} + + + \ No newline at end of file diff --git a/intentanalysis/src/main/resources/mybatis/sql/IntentMapper.xml b/intentanalysis/src/main/resources/mybatis/sql/IntentMapper.xml new file mode 100644 index 0000000..c814bfe --- /dev/null +++ b/intentanalysis/src/main/resources/mybatis/sql/IntentMapper.xml @@ -0,0 +1,35 @@ + + + + + + + + + + insert into Intent(intent_id, intent_name) + values(#{intentId}, #{intentName}) + + + + update intent + + intent_id = #{intentId}, + intent_name = #{intentName}, + + where intent_id = #{intentId} + + + + delete from intent + where intent_id = #{intentId} + + + \ No newline at end of file diff --git a/intentanalysis/src/main/resources/mybatis/sql/StateMapper.xml b/intentanalysis/src/main/resources/mybatis/sql/StateMapper.xml new file mode 100644 index 0000000..987c75f --- /dev/null +++ b/intentanalysis/src/main/resources/mybatis/sql/StateMapper.xml @@ -0,0 +1,27 @@ + + + + + + + + insert into state(state_id, state_name, expectation_id, is_satisfied, condition) + values + + (#{item.stateId}, #{item.stateName}, #{item.expectationId}, #{item.isSatisfied}, #{item.condition}) + + + + + delete from state + where expectation_id = #{expectationId} + + + \ No newline at end of file -- cgit 1.2.3-korg