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

添加用户登录(还未验证)

This commit is contained in:
2022-03-13 02:05:29 +08:00
parent 1b78102d61
commit b49e720b3f
11 changed files with 756 additions and 1 deletions

View File

@@ -0,0 +1,188 @@
<?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="plus.bookshelf.Dao.Mapper.UserDOMapper">
<resultMap id="BaseResultMap" type="plus.bookshelf.Dao.DO.UserDO">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Sun Mar 13 01:51:14 SGT 2022.
-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="username" jdbcType="VARCHAR" property="username" />
<result column="encript_pwd" jdbcType="VARCHAR" property="encriptPwd" />
<result column="nickname" jdbcType="VARCHAR" property="nickname" />
<result column="user_identity" jdbcType="VARCHAR" property="userIdentity" />
<result column="avatar" jdbcType="VARCHAR" property="avatar" />
<result column="phone" jdbcType="VARCHAR" property="phone" />
<result column="weixin_third_party_auth_code" jdbcType="VARCHAR" property="weixinThirdPartyAuthCode" />
<result column="qq_third_party_auth_code" jdbcType="VARCHAR" property="qqThirdPartyAuthCode" />
</resultMap>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Sun Mar 13 01:51:14 SGT 2022.
-->
id, username, encript_pwd, nickname, user_identity, avatar, phone, weixin_third_party_auth_code,
qq_third_party_auth_code
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Sun Mar 13 01:51:14 SGT 2022.
-->
select
<include refid="Base_Column_List" />
from user_info
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.
This element was generated on Sun Mar 13 01:51:14 SGT 2022.
-->
delete from user_info
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="plus.bookshelf.Dao.DO.UserDO">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Sun Mar 13 01:51:14 SGT 2022.
-->
insert into user_info (id, username, encript_pwd,
nickname, user_identity, avatar,
phone, weixin_third_party_auth_code, qq_third_party_auth_code
)
values (#{id,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, #{encriptPwd,jdbcType=VARCHAR},
#{nickname,jdbcType=VARCHAR}, #{userIdentity,jdbcType=VARCHAR}, #{avatar,jdbcType=VARCHAR},
#{phone,jdbcType=VARCHAR}, #{weixinThirdPartyAuthCode,jdbcType=VARCHAR}, #{qqThirdPartyAuthCode,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="plus.bookshelf.Dao.DO.UserDO">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Sun Mar 13 01:51:14 SGT 2022.
-->
insert into user_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="username != null">
username,
</if>
<if test="encriptPwd != null">
encript_pwd,
</if>
<if test="nickname != null">
nickname,
</if>
<if test="userIdentity != null">
user_identity,
</if>
<if test="avatar != null">
avatar,
</if>
<if test="phone != null">
phone,
</if>
<if test="weixinThirdPartyAuthCode != null">
weixin_third_party_auth_code,
</if>
<if test="qqThirdPartyAuthCode != null">
qq_third_party_auth_code,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="username != null">
#{username,jdbcType=VARCHAR},
</if>
<if test="encriptPwd != null">
#{encriptPwd,jdbcType=VARCHAR},
</if>
<if test="nickname != null">
#{nickname,jdbcType=VARCHAR},
</if>
<if test="userIdentity != null">
#{userIdentity,jdbcType=VARCHAR},
</if>
<if test="avatar != null">
#{avatar,jdbcType=VARCHAR},
</if>
<if test="phone != null">
#{phone,jdbcType=VARCHAR},
</if>
<if test="weixinThirdPartyAuthCode != null">
#{weixinThirdPartyAuthCode,jdbcType=VARCHAR},
</if>
<if test="qqThirdPartyAuthCode != null">
#{qqThirdPartyAuthCode,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="plus.bookshelf.Dao.DO.UserDO">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Sun Mar 13 01:51:14 SGT 2022.
-->
update user_info
<set>
<if test="username != null">
username = #{username,jdbcType=VARCHAR},
</if>
<if test="encriptPwd != null">
encript_pwd = #{encriptPwd,jdbcType=VARCHAR},
</if>
<if test="nickname != null">
nickname = #{nickname,jdbcType=VARCHAR},
</if>
<if test="userIdentity != null">
user_identity = #{userIdentity,jdbcType=VARCHAR},
</if>
<if test="avatar != null">
avatar = #{avatar,jdbcType=VARCHAR},
</if>
<if test="phone != null">
phone = #{phone,jdbcType=VARCHAR},
</if>
<if test="weixinThirdPartyAuthCode != null">
weixin_third_party_auth_code = #{weixinThirdPartyAuthCode,jdbcType=VARCHAR},
</if>
<if test="qqThirdPartyAuthCode != null">
qq_third_party_auth_code = #{qqThirdPartyAuthCode,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="plus.bookshelf.Dao.DO.UserDO">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Sun Mar 13 01:51:14 SGT 2022.
-->
update user_info
set username = #{username,jdbcType=VARCHAR},
encript_pwd = #{encriptPwd,jdbcType=VARCHAR},
nickname = #{nickname,jdbcType=VARCHAR},
user_identity = #{userIdentity,jdbcType=VARCHAR},
avatar = #{avatar,jdbcType=VARCHAR},
phone = #{phone,jdbcType=VARCHAR},
weixin_third_party_auth_code = #{weixinThirdPartyAuthCode,jdbcType=VARCHAR},
qq_third_party_auth_code = #{qqThirdPartyAuthCode,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByUsernameAndEncryptpwd" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from user_info
where username = #{username} and encript_pwd = #{encryptPwd}
</select>
</mapper>