blob: b08d88afce48aa9e957773503620949a70dcf211 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<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,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 intent_generateType intentGenerateType from intent
</select>
<insert id="insertIntent">
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">
update intent
<trim prefix="set" suffixOverrides=",">
<if test="intent.intentName != null">intent_name = #{intent.intentName},</if>
</trim>
where intent_id = #{intent.intentId}
</update>
<delete id="deleteIntent" parameterType="string">
delete
from intent
where intent_id = #{intentId}
</delete>
<select id="getIntentByName" resultType="org.onap.usecaseui.intentanalysis.bean.models.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>
|