diff options
author | Keguang He <hekeguang@chinamobile.com> | 2022-09-01 07:44:55 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2022-09-01 07:44:55 +0000 |
commit | d004c121a83dfea3654d9ac47bd558e2237b7e6f (patch) | |
tree | 103640f096a16e868037470977bf77d4260258d8 /intentanalysis/src/main/resources/mybatis/sql | |
parent | 63492d1459f46c889ba93641ec51ab8928cc0127 (diff) | |
parent | 54e7ca4ddf183cd15bd7afff0c53b1970698432b (diff) |
Merge "Add UT to intent service"
Diffstat (limited to 'intentanalysis/src/main/resources/mybatis/sql')
-rw-r--r-- | intentanalysis/src/main/resources/mybatis/sql/IntentMapper.xml | 2 | ||||
-rw-r--r-- | intentanalysis/src/main/resources/mybatis/sql/StateMapper.xml | 53 |
2 files changed, 1 insertions, 54 deletions
diff --git a/intentanalysis/src/main/resources/mybatis/sql/IntentMapper.xml b/intentanalysis/src/main/resources/mybatis/sql/IntentMapper.xml index c5d3b3d..57c8952 100644 --- a/intentanalysis/src/main/resources/mybatis/sql/IntentMapper.xml +++ b/intentanalysis/src/main/resources/mybatis/sql/IntentMapper.xml @@ -34,7 +34,7 @@ <select id="getIntentByName" resultType="org.onap.usecaseui.intentanalysis.bean.models.Intent"> select intent_id intentId, intent_name intentName from intent - where intent_name like "%"#{intent.intentName}"%" + where intent_name like #{intentName} </select> </mapper>
\ No newline at end of file diff --git a/intentanalysis/src/main/resources/mybatis/sql/StateMapper.xml b/intentanalysis/src/main/resources/mybatis/sql/StateMapper.xml deleted file mode 100644 index d103015..0000000 --- a/intentanalysis/src/main/resources/mybatis/sql/StateMapper.xml +++ /dev/null @@ -1,53 +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.StateMapper"> - - <select id="selectStateByExpectation" resultType="org.onap.usecaseui.intentanalysis.bean.models.State"> - select state_id stateId, state_name stateName, condition, - is_satisfied isSatisfied - from state - where expectation_id = #{expectationId} - </select> - - <insert id="insertStateList" parameterType="java.util.ArrayList"> - <if test="stateList != null"> - insert into state(state_id, state_name, expectation_id, is_satisfied, condition) - values - <foreach collection="stateList" index="index" item="item" separator=","> - (#{item.stateId}, #{item.stateName}, #{expectationId}, #{item.isSatisfied}, #{item.condition}) - </foreach> - </if> - </insert> - - <delete id="deleteStateByExpectationId"> - delete - from state - where expectation_id = #{expectationId} - </delete> - - <insert id="insertState"> - <if test="state != null"> - insert into state(state_id, state_name, expectation_id, is_satisfied, condition) - values (#{state.stateId}, #{state.stateName}, #{expectationId}, #{state.isSatisfied}, #{state.condition}) - </if> - </insert> - - <update id="updateState" parameterType="java.util.List"> - update state - <trim prefix="set" suffixOverrides=","> - <if test="stateName != null">state_name = #{stateName},</if> - <if test="isSatisfied != null">is_satisfied = #{isSatisfied},</if> - <if test="condition != null">condition = #{condition},</if> - </trim> - where state_id = #{stateId} - </update> - - <delete id="deleteStateById"> - delete - from state - where state_id = #{stateId} - </delete> - -</mapper>
\ No newline at end of file |