aboutsummaryrefslogtreecommitdiffstats
path: root/intentanalysis/src/main/resources/mybatis/sql/FulfilmentInfoMapper.xml
diff options
context:
space:
mode:
authorKeguang He <hekeguang@chinamobile.com>2022-08-31 07:03:21 +0000
committerGerrit Code Review <gerrit@onap.org>2022-08-31 07:03:21 +0000
commit7679786f7dd60e0ca5e2b1d0f93e235cf0df0011 (patch)
tree6e17ea37551d9e978d4c62bdcd75fff291374d90 /intentanalysis/src/main/resources/mybatis/sql/FulfilmentInfoMapper.xml
parentc2649cfda700cbcc2cb6e33d9ab6ed98d2e56989 (diff)
parent6331fc23cbe8321150fbcf0f176a1106e3982aa0 (diff)
Merge "Update intent module and CRUD APIs"
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>