| | |
| | | <?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.lf.server.mapper.sys.BlacklistMapper"> |
| | | <select id="selectCount" resultType="java.lang.Integer" parameterType="java.lang.String"> |
| | | <select id="selectCount" resultType="java.lang.Integer"> |
| | | select count(*) from lf.sys_blacklist |
| | | <where> |
| | | 1 = 1 |
| | | <if test="ip != null"> |
| | | and ip like #{ip} |
| | | and upper(ip) like #{ip} |
| | | </if> |
| | | <if test="type != null"> |
| | | and type = #{type} |
| | |
| | | <where> |
| | | 1 = 1 |
| | | <if test="ip != null"> |
| | | and a.ip like #{ip} |
| | | and upper(a.ip) like #{ip} |
| | | </if> |
| | | <if test="type != null"> |
| | | and a.type = #{type} |
| | | </if> |
| | | </where> |
| | | order by a.id |
| | | order by a.id desc |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectAll" resultType="com.lf.server.entity.sys.BlacklistEntity"> |
| | | select a.*,fn_uname(a.create_user) createName,fn_uname(a.update_user) updateName from lf.sys_blacklist a order by a.id; |
| | | select a.*,fn_uname(a.create_user) createName,fn_uname(a.update_user) updateName from lf.sys_blacklist a order by a.id desc |
| | | </select> |
| | | |
| | | <select id="selectById" resultType="com.lf.server.entity.sys.BlacklistEntity"> |
| | | select a.*,fn_uname(a.create_user) createName,fn_uname(a.update_user) updateName from lf.sys_blacklist a where a.id = #{id} |
| | | </select> |
| | | |
| | | <select id="selectIpList" resultType="java.lang.String"> |
| | | select ip from lf.sys_blacklist where type = #{type} |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.lf.server.entity.sys.BlacklistEntity"> |
| | |
| | | |
| | | <delete id="deletes"> |
| | | delete from lf.sys_blacklist 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> |
| | | |