All Downloads are FREE. Search and download functionalities are using the official Maven repository.

mapper.MemberWithdrawalEventHandler.xml Maven / Gradle / Ivy

There is a newer version: 2024.09
Show newest version
<?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="com.taotao.cloud.idempotent.enhance.db.mapper.BusinessIdempotentMapper">

    <insert id="insert">
        INSERT INTO business_idempotent(namespace, source, operation_type, business_key, unique_key, idempotent_status,
                                        object_version_number, response, create_date, last_modified_date)
        VALUES (#{namespace},
                #{source},
                #{operationType},
                #{businessKey},
                #{uniqueKey},
                #{idempotentStatus},
                #{objectVersionNumber},
                #{response},
                #{createDate},
                #{lastModifiedDate})
    </insert>

    <update id="changeIdempotentStatusProcessing">
        UPDATE business_idempotent
        SET idempotent_status     = #{idempotentStatus},
            object_version_number = #{objectVersionNumber} + 1,
            last_modified_date    = #{lastModifiedDate}
        WHERE unique_key = #{uniqueKey}
          AND object_version_number = #{objectVersionNumber}
    </update>

    <update id="changeIdempotentStatusSuccess">
        UPDATE business_idempotent
        SET idempotent_status     = #{idempotentStatus},
            response              = #{response},
            object_version_number = #{objectVersionNumber} + 1,
            last_modified_date    = #{lastModifiedDate}
        WHERE unique_key = #{uniqueKey}
          AND object_version_number = #{objectVersionNumber}
    </update>

    <delete id="deleteByUniqueKey">
        DELETE
        FROM business_idempotent
        WHERE unique_key = #{uniqueKey}
    </delete>

    <select id="queryByUniqueKey" resultType="com.taotao.cloud.idempotent.enhance.core.pojo.IdempotentEntity">
        SELECT namespace,
               source,
               operation_type,
               business_key,
               unique_key,
               idempotent_status,
               object_version_number,
               response,
               create_date,
               last_modified_date
        FROM business_idempotent
        WHERE unique_key = #{uniqueKey}
    </select>

</mapper>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy