123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?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 = "com.fuzamei.mapperInterface.LoginMapper">
-
- <select id="queryUser" resultType="User">
- select
- u.user_id,
- u.username,
- u.person_name,
- u.random,
- r.role_name,
- t.token
- from
- users u
- left join
- role r
- on
- u.role_id=r.role_id
- left join
- token t
- on
- t.user_id=u.user_id
- where
- u.username=#{username}
- and
- u.password=#{password}
-
- </select>
-
- <update id="updateToken">
- update
- token
- set
- token=#{token}
- where
- user_id=#{userId}
- </update>
-
- <insert id="insertToken">
- insert into token(user_id,token) values(#{userId},#{token})
- </insert>
-
-
-
-
-
-
- </mapper>
|