forked from zhangyuan/epmet-cloud-lingshan
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.4 KiB
38 lines
1.4 KiB
<?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.epmet.dao.PreAuthTokenDao">
|
|
|
|
<resultMap type="com.epmet.entity.PreAuthTokenEntity" id="preAuthTokenMap">
|
|
<result property="id" column="ID"/>
|
|
<result property="preAuthToken" column="PRE_AUTH_TOKEN"/>
|
|
<result property="expiresIn" column="EXPIRES_IN"/>
|
|
<result property="delFlag" column="DEL_FLAG"/>
|
|
<result property="createdBy" column="CREATED_BY"/>
|
|
<result property="createdTime" column="CREATED_TIME"/>
|
|
<result property="updatedBy" column="UPDATED_BY"/>
|
|
<result property="updatedTime" column="UPDATED_TIME"/>
|
|
</resultMap>
|
|
|
|
<!-- 插入 pre_auth_code -->
|
|
<insert id="insertPreAuthToken" parameterType="com.epmet.dto.form.PreAuthTokenFormDTO">
|
|
INSERT INTO pre_auth_token ( ID, PRE_AUTH_TOKEN, EXPIRES_IN_TIME, DEL_FLAG, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME )
|
|
VALUES
|
|
(
|
|
REPLACE ( UUID(), '-', '' ),
|
|
#{preAuthToken},
|
|
#{expiresInTime},
|
|
#{delFlag},
|
|
#{createdBy},
|
|
NOW(),
|
|
#{updatedBy},
|
|
NOW()
|
|
)
|
|
</insert>
|
|
|
|
<!-- 删pre_auth_code -->
|
|
<delete id="deleteOldPreAuthCode">
|
|
delete from pre_auth_token where del_flag = 0
|
|
</delete>
|
|
|
|
</mapper>
|