<?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.account.app.db.mapper.UserRegistryMapper">
    <insert id="save">
        insert into user_registry
        (`enabled`,`rule`,`captcha_code`,`verify_code`,`enable_code`,`domain`)
        values
        (#{enabled},#{rule},#{captchaCode},#{verifyCode},#{enableCode},#{domain})
    </insert>
    
    <update id="update">
        update user_registry
        set update_time=now(),rule=#{rule}
        where id=#{id}
    </update>
    
    <select id="findAll" resultType="cn.reghao.tnb.account.app.model.po.UserRegistry">
        select *
        from user_registry
        limit 1
    </select>
</mapper>