<?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.auth.app.db.mapper.oauth.UserOauthAppMapper">
    <insert id="save">
        insert into oauth_user_oauth_app
        (`id`,`deleted`,`create_time`,`update_time`,`user_id`,`app_name`,`home_url`,`client_id`)
        values
        (#{id},#{deleted},#{createTime},#{updateTime},#{userId},#{appName},#{homeUrl},#{clientId})
    </insert>

    <delete id="deleteByClientId">
        delete from oauth_user_oauth_app
        where client_id=#{clientId}
    </delete>

    <select id="findAll" resultType="cn.reghao.tnb.auth.app.model.po.oauth.UserOauthApp">
        select * from oauth_user_oauth_app
    </select>
</mapper>
