summaryrefslogtreecommitdiffstats
path: root/intentanalysis/src/main/resources/mybatis
diff options
context:
space:
mode:
authorhekeguang <hekeguang@chinamobile.com>2022-11-22 11:11:52 +0800
committerhekeguang <hekeguang@chinamobile.com>2022-11-22 11:12:08 +0800
commit2f871e98fa6e94cc41ed1f12205030b117dd1569 (patch)
tree2f8ee93033d7e5e78c9ad926e40d22ca3f413697 /intentanalysis/src/main/resources/mybatis
parent89039c53eae5a28678e23aa42cadc3b61204330d (diff)
Add logs for intentAnalysisServer.
Issue-ID: USECASEUI-762 Change-Id: I22df538103455df4ccc886eab3d06acc899279c4 Signed-off-by: hekeguang <hekeguang@chinamobile.com>
Diffstat (limited to 'intentanalysis/src/main/resources/mybatis')
-rw-r--r--intentanalysis/src/main/resources/mybatis/sql/IMFRegInfoMapper.xml21
-rw-r--r--intentanalysis/src/main/resources/mybatis/sql/IntentMapper.xml15
2 files changed, 30 insertions, 6 deletions
diff --git a/intentanalysis/src/main/resources/mybatis/sql/IMFRegInfoMapper.xml b/intentanalysis/src/main/resources/mybatis/sql/IMFRegInfoMapper.xml
index 504c244..aaca817 100644
--- a/intentanalysis/src/main/resources/mybatis/sql/IMFRegInfoMapper.xml
+++ b/intentanalysis/src/main/resources/mybatis/sql/IMFRegInfoMapper.xml
@@ -8,7 +8,7 @@
<insert id="insertIMFRegInfoRegInfo">
insert into intent_management_function_reg_info(imfr_info_id,imfr_info_description,support_area,support_model,support_interfaces,handle_name,intent_function_type)
values
- (#{imfregInfo.id}, #{imfregInfo.description},#{imfregInfo.supportArea} , #{imfregInfo.supportModel},#{imfregInfo.supportInterfaces},#{imfregInfo.handleName},#{imfregInfo.intentFunctionType})
+ (#{imf.id}, #{imf.description},#{imf.supportArea} , #{imf.supportModel},#{imf.supportInterfaces},#{imf.handleName},#{imf.intentFunctionType})
</insert>
<select id="getImfRegInfoList" resultType="org.onap.usecaseui.intentanalysis.bean.models.IntentManagementFunctionRegInfo">
@@ -17,4 +17,23 @@
from intent_management_function_reg_info
</select>
+ <delete id="deleteFunctionManageById">
+ delete from intent_management_function_reg_info
+ where imfr_info_id = #{id}
+ </delete>
+
+
+ <update id="updateIntentManageById" parameterType="org.onap.usecaseui.intentanalysis.bean.models.IntentManagementFunctionRegInfo">
+ update intent_management_function_reg_info
+ <trim prefix="set" suffixOverrides=",">
+ <if test="imf.description != null">imfr_info_description = #{imf.description},</if>
+ <if test="imf.supportArea != null">support_area = #{imf.supportArea},</if>
+ <if test="imf.supportModel != null">support_model = #{imf.supportModel},</if>
+ <if test="imf.supportInterfaces != null">support_interfaces = #{imf.supportInterfaces},</if>
+ <if test="imf.handleName != null">handle_name = #{imf.handleName},</if>
+ <if test="imf.intentFunctionType!= null">intent_function_type = #{imf.intentFunctionType},</if>
+ </trim>
+ where imfr_info_id = #{imf.id}
+ </update>
+
</mapper>
diff --git a/intentanalysis/src/main/resources/mybatis/sql/IntentMapper.xml b/intentanalysis/src/main/resources/mybatis/sql/IntentMapper.xml
index 57c8952..b08d88a 100644
--- a/intentanalysis/src/main/resources/mybatis/sql/IntentMapper.xml
+++ b/intentanalysis/src/main/resources/mybatis/sql/IntentMapper.xml
@@ -5,17 +5,17 @@
<mapper namespace="org.onap.usecaseui.intentanalysis.mapper.IntentMapper">
<select id="selectIntent" resultType="org.onap.usecaseui.intentanalysis.bean.models.Intent">
- select intent_id intentId, intent_name intentName from intent
+ select intent_id intentId, intent_name intentName,intent_generateType intentGenerateType from intent
where intent_id = #{intentId}
</select>
<select id="selectIntentList" resultType="org.onap.usecaseui.intentanalysis.bean.models.Intent">
- select intent_id intentId, intent_name intentName from intent
+ select intent_id intentId, intent_name intentName intent_generateType intentGenerateType from intent
</select>
<insert id="insertIntent">
- insert into Intent(intent_id, intent_name)
- values(#{intent.intentId}, #{intent.intentName})
+ insert into Intent(intent_id, intent_name,intent_generateType)
+ values(#{intent.intentId}, #{intent.intentName},#{intent.intentGenerateType})
</insert>
<update id="updateIntent" parameterType="org.onap.usecaseui.intentanalysis.bean.models.Intent">
@@ -33,8 +33,13 @@
</delete>
<select id="getIntentByName" resultType="org.onap.usecaseui.intentanalysis.bean.models.Intent">
- select intent_id intentId, intent_name intentName from intent
+ select intent_id intentId, intent_name intentName, intent_generateType intentGenerateType from intent
where intent_name like #{intentName}
</select>
+ <select id="getIntentListByIntentGenerateType" resultType="org.onap.usecaseui.intentanalysis.bean.models.Intent">
+ select intent_id intentId, intent_name intentName,intent_generateType intentGenerateType from intent
+ where intent_generateType = #{intentGenerateType}
+ </select>
+
</mapper> \ No newline at end of file