summaryrefslogtreecommitdiffstats
path: root/intentanalysis/src/main/resources
diff options
context:
space:
mode:
authorkaixiliu <liukaixi@chinamobile.com>2023-04-04 14:21:46 +0800
committerKaixi LIU <liukaixi@chinamobile.com>2023-04-10 08:39:01 +0000
commit4c91cd3e52050c2f36f533a57661d770259f5973 (patch)
tree66376b6c76e0b7b3c125af61753a444fd28a2d95 /intentanalysis/src/main/resources
parentcd69d6ff83ee0d06683031f04ed71c692b6bffaa (diff)
update intent process code
Issue-ID: USECASEUI-785 Signed-off-by: kaixiliu <liukaixi@chinamobile.com> Change-Id: Iee30fea33ff357a792f342166c9ddec26ad4feba
Diffstat (limited to 'intentanalysis/src/main/resources')
-rw-r--r--intentanalysis/src/main/resources/intent-analysis-init.sql3
-rw-r--r--intentanalysis/src/main/resources/mybatis/sql/IntentEventRecordMapper.xml15
2 files changed, 13 insertions, 5 deletions
diff --git a/intentanalysis/src/main/resources/intent-analysis-init.sql b/intentanalysis/src/main/resources/intent-analysis-init.sql
index a3834f9..4c985e4 100644
--- a/intentanalysis/src/main/resources/intent-analysis-init.sql
+++ b/intentanalysis/src/main/resources/intent-analysis-init.sql
@@ -77,5 +77,6 @@ create table if not exists intent_Event_Record(
intentId varchar(255),
intentName varchar(255),
intentStatus varchar (225),
- operateType varchar (225)
+ operateType varchar (225),
+ parent_id varchar(255)
); \ No newline at end of file
diff --git a/intentanalysis/src/main/resources/mybatis/sql/IntentEventRecordMapper.xml b/intentanalysis/src/main/resources/mybatis/sql/IntentEventRecordMapper.xml
index 296fc43..bd86b9e 100644
--- a/intentanalysis/src/main/resources/mybatis/sql/IntentEventRecordMapper.xml
+++ b/intentanalysis/src/main/resources/mybatis/sql/IntentEventRecordMapper.xml
@@ -5,13 +5,20 @@
<mapper namespace="org.onap.usecaseui.intentanalysis.mapper.IntentEventRecordMapper">
<insert id="insertIntentRecord">
- insert into intent_Event_Record(intentId, intentName, intentStatus, operateType)
+ insert into intent_Event_Record(intentId, intentName, intentStatus, operateType,parent_id)
values(#{intentEventRecord.intentId}, #{intentEventRecord.intentName},
- #{intentEventRecord.intentStatus},#{intentEventRecord.operateType})
+ #{intentEventRecord.intentStatus},#{intentEventRecord.operateType},
+ #{parentId})
</insert>
- <select id="getIntentEventRecordByntentId" resultType="org.onap.usecaseui.intentanalysis.bean.models.IntentEventRecord">
- select * from intent_Event_Record where intentId = #{intentId};
+ <select id="getIntentEventRecordByIntentId" resultType="org.onap.usecaseui.intentanalysis.bean.models.IntentEventRecord">
+ select id,intentId,intentName,intentStatus,operateType,parent_id parentId
+ from intent_Event_Record where intentId = #{intentId};
+ </select>
+
+ <select id="getIntentEventRecordByPid" resultType="org.onap.usecaseui.intentanalysis.bean.models.IntentEventRecord">
+ select id,intentId,intentName,intentStatus,operateType,parent_id
+ from intent_Event_Record where parent_id = #{parentId} and operateType=#{operateType};
</select>
</mapper>