diff options
Diffstat (limited to 'intentanalysis/src/main/resources')
3 files changed, 37 insertions, 37 deletions
diff --git a/intentanalysis/src/main/resources/intent-analysis-init.sql b/intentanalysis/src/main/resources/intent-analysis-init.sql index 4c985e4..4a349e7 100644 --- a/intentanalysis/src/main/resources/intent-analysis-init.sql +++ b/intentanalysis/src/main/resources/intent-analysis-init.sql @@ -39,9 +39,9 @@ create table if not exists context_mapping( parent_id varchar(255) ); -create table if not exists fulfilment_info( - fulfilment_info_id varchar(255) primary key, - fulfilment_info_status varchar(255), +create table if not exists fulfillment_info( + fulfillment_info_id varchar(255) primary key, + fulfillment_info_status varchar(255), not_fulfilled_state varchar(255), not_fulfilled_reason varchar(255) ); diff --git a/intentanalysis/src/main/resources/mybatis/sql/FulfillmentInfoMapper.xml b/intentanalysis/src/main/resources/mybatis/sql/FulfillmentInfoMapper.xml new file mode 100644 index 0000000..5aa65c5 --- /dev/null +++ b/intentanalysis/src/main/resources/mybatis/sql/FulfillmentInfoMapper.xml @@ -0,0 +1,34 @@ +<?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.FulfillmentInfoMapper"> + + + <insert id="insertFulfillmentInfo"> + insert into fulfillment_info(fulfillment_info_id, fulfillment_info_status, not_fulfilled_state, not_fulfilled_reason) + values (#{parentId}, #{fulfillmentInfo.fulfillmentStatus}, #{fulfillmentInfo.notFulfilledState}, #{fulfillmentInfo.notFulfilledReason}) + </insert> + + <select id="selectFulfillmentInfo" resultType="org.onap.usecaseui.intentanalysis.bean.models.FulfillmentInfo"> + select fulfillment_info_status fulfillmentStatus, not_fulfilled_state notFulfilledState, + not_fulfilled_reason notFulfilledReason + from fulfillment_info + where fulfillment_info_id = #{parentId} + </select> + + <update id="updateFulfillmentInfo"> + update fulfillment_info + <trim prefix="set" suffixOverrides=","> + <if test="fulfillmentInfo.fulfillmentStatus != null">fulfillment_info_status = #{fulfillmentInfo.fulfillmentStatus},</if> + <if test="fulfillmentInfo.notFulfilledState != null">not_fulfilled_state = #{fulfillmentInfo.notFulfilledState},</if> + <if test="fulfillmentInfo.notFulfilledReason != null">not_fulfilled_reason = #{fulfillmentInfo.notFulfilledReason},</if> + </trim> + where fulfillment_info_id = #{parentId} + </update> + + <delete id="deleteFulfillmentInfo" parameterType="string"> + delete from fulfillment_info + where fulfillment_info_id = #{parentId} + </delete> +</mapper> diff --git a/intentanalysis/src/main/resources/mybatis/sql/FulfilmentInfoMapper.xml b/intentanalysis/src/main/resources/mybatis/sql/FulfilmentInfoMapper.xml deleted file mode 100644 index d9b9f7f..0000000 --- a/intentanalysis/src/main/resources/mybatis/sql/FulfilmentInfoMapper.xml +++ /dev/null @@ -1,34 +0,0 @@ -<?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.FulfilmentInfoMapper"> - - - <insert id="insertFulfilmentInfo"> - 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="selectFulfilmentInfo" resultType="org.onap.usecaseui.intentanalysis.bean.models.FulfilmentInfo"> - select fulfilment_info_status fulfilmentStatus, not_fulfilled_state notFulfilledState, - 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> |