12345678910111213 |
- <?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.TokenInterface">
- <select id="getTokenById" parameterType="com.fuzamei.entity.Token" resultType="com.fuzamei.entity.Token">
- select * from token where user_id = #{userId};
- </select>
- <insert id="insertToken" parameterType="com.fuzamei.entity.Token">
- insert into token(user_id,token)values(#{userId},#{token});
- </insert>
- <update id="updateToken" parameterType="com.fuzamei.entity.Token">
- update token set token = #{token} where user_id = #{userId};
- </update>
- </mapper>
|