aboutsummaryrefslogtreecommitdiffstats
path: root/intentanalysis/src/main/resources/mybatis/sql/FulfilmentInfoMapper.xml
diff options
context:
space:
mode:
Diffstat (limited to 'intentanalysis/src/main/resources/mybatis/sql/FulfilmentInfoMapper.xml')
-rw-r--r--intentanalysis/src/main/resources/mybatis/sql/FulfilmentInfoMapper.xml24
1 files changed, 18 insertions, 6 deletions
diff --git a/intentanalysis/src/main/resources/mybatis/sql/FulfilmentInfoMapper.xml b/intentanalysis/src/main/resources/mybatis/sql/FulfilmentInfoMapper.xml
index 2290703..d9b9f7f 100644
--- a/intentanalysis/src/main/resources/mybatis/sql/FulfilmentInfoMapper.xml
+++ b/intentanalysis/src/main/resources/mybatis/sql/FulfilmentInfoMapper.xml
@@ -6,17 +6,29 @@
<insert id="insertFulfilmentInfo">
- <if test="fulfilmentInfo != null">
- insert into fulfilment_info(fulfilment_info_id, fulfilment_info_status, not_fulfilled_state, not_fulfilled_reason)
- values (#{parentId}, #{fulfilmentInfo.fulfilmentStatus}, #{fulfilmentInfo.notFulfilledState}, #{fulfilmentInfo.notFulfilledReason})
- </if>
+ insert into fulfilment_info(fulfilment_info_id, fulfilment_info_status, not_fulfilled_state, not_fulfilled_reason)
+ values (#{parentId}, #{fulfilmentInfo.fulfilmentStatus}, #{fulfilmentInfo.notFulfilledState}, #{fulfilmentInfo.notFulfilledReason})
</insert>
- <select id="selectFulfilmentInfoById" resultType="org.onap.usecaseui.intentanalysis.bean.models.FulfilmentInfo">
+ <select id="selectFulfilmentInfo" resultType="org.onap.usecaseui.intentanalysis.bean.models.FulfilmentInfo">
select fulfilment_info_status fulfilmentStatus, not_fulfilled_state notFulfilledState,
- not_fulfilled_reason notFulfilledReason
+ not_fulfilled_reason notFulfilledReason
from fulfilment_info
where fulfilment_info_id = #{parentId}
</select>
+ <update id="updateFulfilmentInfo">
+ update fulfilment_info
+ <trim prefix="set" suffixOverrides=",">
+ <if test="fulfilmentInfo.fulfilmentStatus != null">fulfilment_info_status = #{fulfilmentInfo.fulfilmentStatus},</if>
+ <if test="fulfilmentInfo.notFulfilledState != null">not_fulfilled_state = #{fulfilmentInfo.notFulfilledState},</if>
+ <if test="fulfilmentInfo.notFulfilledReason != null">not_fulfilled_reason = #{fulfilmentInfo.notFulfilledReason},</if>
+ </trim>
+ where fulfilment_info_id = #{parentId}
+ </update>
+
+ <delete id="deleteFulfilmentInfo" parameterType="string">
+ delete from fulfilment_info
+ where fulfilment_info_id = #{parentId}
+ </delete>
</mapper>