<?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="cn.iocoder.mall.pay.biz.dao.PayNotifyLogMapper">

    <!--<sql id="FIELDS">-->
        <!--id, transaction_id, transaction_extension_id, app_id, order_id,-->
        <!--status, next_notify_time, last_execute_time, notify_times, max_notify_times,-->
        <!--create_time-->
    <!--</sql>-->

    <insert id="insert" parameterType="PayNotifyLogDO" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
        INSERT INTO notify_log (
            notify_id, request, response, status
        ) VALUES (
            #{notifyId}, #{request}, #{response}, #{status}
        )
    </insert>

    <!--<update id="update" parameterType="PayTransactionNotifyTaskDO">-->
        <!--UPDATE transaction_notify_task-->
        <!--<set>-->
            <!--<if test="status != null">-->
                <!--, status = #{status}-->
            <!--</if>-->
            <!--<if test="nextNotifyTime != null">-->
                <!--, last_notify_time = #{nextNotifyTime}-->
            <!--</if>-->
            <!--<if test="lastExecuteTime != null">-->
                <!--, last_execute_time = #{lastExecuteTime}-->
            <!--</if>-->
            <!--<if test="notifyTimes != null">-->
                <!--, notify_times = #{notifyTimes}-->
            <!--</if>-->
        <!--</set>-->
        <!--WHERE id = #{id}-->
    <!--</update>-->

    <!--<select id="selectByTransactionCode" parameterType="String" resultType="PayTransactionExtensionDO">-->
        <!--SELECT-->
        <!--<include refid="FIELDS"/>-->
        <!--FROM transaction_extension-->
        <!--WHERE transaction_code = #{transactionCode}-->
        <!--LIMIT 1-->
    <!--</select>-->

</mapper>
