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