WechatAppRefreshTokenMapper.xml
1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?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.com.glsx.dj.wechat.mapper.WechatAppRefreshTokenMapper">
<resultMap id="BaseResultMap" type="cn.com.glsx.dj.wechat.model.WechatAppRefreshToken">
<id column="ID" jdbcType="INTEGER" property="id" />
<result column="APP_ID" jdbcType="VARCHAR" property="appId" />
<result column="AUTHORIZER_REFRESH_TOKEN" jdbcType="VARCHAR" property="authorizerRefreshToken" />
<result column="CREATED_BY" jdbcType="VARCHAR" property="createdBy" />
<result column="CREATED_DATE" jdbcType="TIMESTAMP" property="createdDate" />
<result column="UPDATED_BY" jdbcType="VARCHAR" property="updatedBy" />
<result column="UPDATED_DATE" jdbcType="TIMESTAMP" property="updatedDate" />
<result column="DELETED_FLAG" jdbcType="CHAR" property="deletedFlag" />
</resultMap>
<sql id="Base_Column_List">
ID, APP_ID, AUTHORIZER_REFRESH_TOKEN, CREATED_BY, CREATED_DATE, UPDATED_BY, UPDATED_DATE,
DELETED_FLAG
</sql>
<select id="getByAppId" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from dj_wechat_app_refresh_token
where APP_ID = #{appId}
</select>
<update id="updateByAppId" parameterType="cn.com.glsx.dj.wechat.model.WechatAppRefreshToken">
update dj_wechat_app_refresh_token
<set>
<if test="authorizerRefreshToken != null">
AUTHORIZER_REFRESH_TOKEN = #{authorizerRefreshToken,jdbcType=VARCHAR},
</if>
<if test="updatedBy != null">
UPDATED_BY = #{updatedBy,jdbcType=VARCHAR},
</if>
UPDATED_DATE = NOW(),
<if test="deletedFlag != null">
DELETED_FLAG = #{deletedFlag,jdbcType=CHAR},
</if>
</set>
where APP_ID = #{appId}
</update>
</mapper>