| | |
| | | <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> |
| | |
| | | <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 |
| | |
| | | </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"> |
| | |
| | | </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> |
| | | |