管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2022-11-17 15375a1d0d07c61c132906ff8da45f67bcd711f6
src/main/resources/mapper/sys/TokenMapper.xml
@@ -13,8 +13,12 @@
    <select id="selectCount" resultType="java.lang.Integer" parameterType="java.lang.String">
        select count(*) from lf.sys_token
        <where>
            <if test="token != null">
                token = #{token}
            1=1
            <if test="name != null">
                and token = #{name}
            </if>
            <if test="type != null">
                and type = #{type}
            </if>
        </where>
    </select>
@@ -23,8 +27,13 @@
    <select id="selectByPage" resultMap="resultMap" resultType="com.lf.server.entity.sys.TokenEntity">
        select * from lf.sys_token
        <where>
            <if test="token != null">
                token = #{token}
            1=1
            <if test="name != null">
                and token = #{name}
            </if>
            <if test="type != null">
                and type = #{type}
            </if>
        </where>
        order by id
@@ -40,7 +49,7 @@
    </select>
    <select id="selectOneByToken" resultType="com.lf.server.entity.sys.TokenEntity">
        select * from lf.sys_token where token = #{token} and expire > now() limit 1
        select a.*,fn_uname(a.create_user) uname from lf.sys_token a where token = #{token} and expire > now() limit 1
    </select>
    <insert id="insertToken" parameterType="com.lf.server.entity.sys.TokenEntity">
@@ -63,15 +72,14 @@
        </foreach>
    </insert>
    <delete id="deleteToken"  >
    <delete id="deleteToken">
        delete from lf.sys_token where id = #{id}
    </delete>
    <delete id="deleteTokens"  >
    <delete id="deleteTokens">
        delete from lf.sys_token where id in
        <foreach item="ids" collection="list" index="index" open="("
                 separator="," close=")">
            #{ids}
        <foreach item="id" collection="ids" index="index" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>