<?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.reghao.tnb.message.app.db.mapper.WebhookMapper">
    <insert id="save">
        insert into message_webhook
            (`name`,`url`,`sign`)
        values
            (#{name},#{url},#{sign})
    </insert>

    <delete id="deleteByName">
        delete from message_webhook
        where `name`=#{name}
    </delete>

    <select id="findAll" resultType="cn.reghao.tnb.message.app.model.po.Webhook">
        select *
        from message_webhook
    </select>
    <select id="findByName" resultType="cn.reghao.tnb.message.app.model.po.Webhook">
        select *
        from message_webhook
        where name=#{name}
    </select>
</mapper>