diff options
Diffstat (limited to 'intentanalysis/src/main/resources/mybatis/sql/ExpectationMapper.xml')
-rw-r--r-- | intentanalysis/src/main/resources/mybatis/sql/ExpectationMapper.xml | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/intentanalysis/src/main/resources/mybatis/sql/ExpectationMapper.xml b/intentanalysis/src/main/resources/mybatis/sql/ExpectationMapper.xml index 720bdd5..3b0923f 100644 --- a/intentanalysis/src/main/resources/mybatis/sql/ExpectationMapper.xml +++ b/intentanalysis/src/main/resources/mybatis/sql/ExpectationMapper.xml @@ -12,7 +12,7 @@ where intent_id = #{intentId} </select> - <insert id="insertExpectation"> + <insert id="insertExpectationList"> insert into expectation(expectation_id, expectation_name, target_moi, intent_id) values <foreach collection="expectationList" index="index" item="item" separator=","> @@ -25,4 +25,24 @@ where intent_id = #{intentId} </delete> + <update id="updateExpectation"> + update expectation + <trim prefix="set" suffixOverrides=","> + <if test="expectationName != null">expectation_name = #{expectationName},</if> + <if test="targetMOI != null">target_moi = #{targetMOI},</if> + </trim> + where expectation_id = #{expectationId} + </update> + + <insert id="insertExpectation"> + insert into expectation(expectation_id, expectation_name, target_moi, intent_id) + values (#{expectation.expectationId}, #{expectation.expectationName}, #{expectation.targetMOI}, #{intentId}) + </insert> + + <delete id="deleteExpectationById"> + delete + from expectation + where expectation_id = #{expectationId} + </delete> + </mapper>
\ No newline at end of file |