<?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.admin.db.mapper.TnbUserMapper">
    <insert id="save">
        insert into tnb_user
        (`username`)
        values
        (#{username})
    </insert>

    <update id="updateUsername">
        update tnb_user
        set `username`=#{username}
        where id=#{id}
    </update>

    <delete id="deleteById">
        delete from tnb_user
        where id=#{id}
    </delete>

    <select id="findAll" resultType="cn.reghao.tnb.admin.model.po.TnbUser">
        select *
        from tnb_user
        limit 1000
    </select>
</mapper>
