1
0
mirror of https://gitee.com/bookshelfplus/bookshelfplus synced 2025-10-10 01:35:14 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

第三方登录回调后登陆系统用户逻辑基本完成

This commit is contained in:
2022-04-04 19:20:07 +08:00
parent 71feaffeb9
commit 54911675a1
20 changed files with 502 additions and 41 deletions

View File

@@ -6,10 +6,35 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<result column="id" jdbcType="INTEGER" property="id" />
<result column="user_id" jdbcType="VARCHAR" property="userId" />
<result column="third_party_user_id" jdbcType="VARCHAR" property="thirdPartyUserId" />
<id column="id" jdbcType="INTEGER" property="id" />
<result column="user_id" jdbcType="INTEGER" property="userId" />
<result column="third_party_user_id" jdbcType="INTEGER" property="thirdPartyUserId" />
</resultMap>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, user_id, third_party_user_id
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from third_party_user_auth_relation
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from third_party_user_auth_relation
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="plus.bookshelf.Dao.DO.ThirdPartyUserAuthDO">
<!--
WARNING - @mbg.generated
@@ -17,7 +42,7 @@
-->
insert into third_party_user_auth_relation (id, user_id, third_party_user_id
)
values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=VARCHAR}, #{thirdPartyUserId,jdbcType=VARCHAR}
values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{thirdPartyUserId,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="plus.bookshelf.Dao.DO.ThirdPartyUserAuthDO">
@@ -42,11 +67,49 @@
#{id,jdbcType=INTEGER},
</if>
<if test="userId != null">
#{userId,jdbcType=VARCHAR},
#{userId,jdbcType=INTEGER},
</if>
<if test="thirdPartyUserId != null">
#{thirdPartyUserId,jdbcType=VARCHAR},
#{thirdPartyUserId,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="plus.bookshelf.Dao.DO.ThirdPartyUserAuthDO">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update third_party_user_auth_relation
<set>
<if test="userId != null">
user_id = #{userId,jdbcType=INTEGER},
</if>
<if test="thirdPartyUserId != null">
third_party_user_id = #{thirdPartyUserId,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="plus.bookshelf.Dao.DO.ThirdPartyUserAuthDO">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update third_party_user_auth_relation
set user_id = #{userId,jdbcType=INTEGER},
third_party_user_id = #{thirdPartyUserId,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByThirdPartyUserId" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from third_party_user_auth_relation
where third_party_user_id = #{thirdPartyUserId,jdbcType=INTEGER}
</select>
<select id="selectByUserId" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from third_party_user_auth_relation
where user_id = #{userId,jdbcType=INTEGER}
</select>
</mapper>