diff options
Diffstat (limited to 'intentanalysis/src/main/resources/mybatis/sql/ExpectationMapper.xml')
-rw-r--r-- | intentanalysis/src/main/resources/mybatis/sql/ExpectationMapper.xml | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/intentanalysis/src/main/resources/mybatis/sql/ExpectationMapper.xml b/intentanalysis/src/main/resources/mybatis/sql/ExpectationMapper.xml index 24d574b..16c7850 100644 --- a/intentanalysis/src/main/resources/mybatis/sql/ExpectationMapper.xml +++ b/intentanalysis/src/main/resources/mybatis/sql/ExpectationMapper.xml @@ -17,34 +17,42 @@ <insert id="insertIntentExpectation"> insert into expectation(expectation_id, expectation_name, expectation_type, intent_id) - values (#{expectation.expectationId}, #{expectation.expectationName}, #{expectation.expectationType}, #{intentId}) + values (#{intentExpectation.expectationId}, #{intentExpectation.expectationName}, #{intentExpectation.expectationType}, #{intentId}) </insert> - <select id="selectIntentExpectationListByIntentId" resultType="org.onap.usecaseui.intentanalysis.bean.models.Expectation"> + <select id="selectIntentExpectationList" resultType="org.onap.usecaseui.intentanalysis.bean.models.Expectation"> select expectation_id expectationId, expectation_name expectationName, expectation_type expectationType, - intent_id intentId + intent_id intentId from expectation where intent_id = #{intentId} </select> + <select id="selectIntentExpectation" resultType="org.onap.usecaseui.intentanalysis.bean.models.Expectation"> + select expectation_id expectationId, expectation_name expectationName, expectation_type expectationType, + intent_id intentId + from expectation + where expectation_id = #{expectationId} + </select> + <update id="updateIntentExpectation"> update expectation <trim prefix="set" suffixOverrides=","> - <if test="expectationName != null">expectation_name = #{expectationName},</if> + <if test="intentExpectation.expectationName != null">expectation_name = #{intentExpectation.expectationName},</if> + <if test="intentExpectation.expectationType != null">expectation_type = #{intentExpectation.expectationType},</if> </trim> - where expectation_id = #{expectationId} + where expectation_id = #{intentExpectation.expectationId} </update> - <delete id="deleteIntentExpectationListByIntentId"> + <delete id="deleteIntentExpectationList"> delete from expectation where intent_id = #{intentId} </delete> - <delete id="deleteIntentExpectationById"> + <delete id="deleteIntentExpectation"> delete from expectation where expectation_id = #{expectationId} </delete> -</mapper>
\ No newline at end of file +</mapper> |