| | |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 黑名单 |
| | | * @author WWW |
| | | */ |
| | | @Mapper |
| | | @Repository |
| | | @SuppressWarnings("ALL") |
| | | public interface BlacklistMapper { |
| | | /** |
| | | * 查询记录数 |
| | | * |
| | | * @param ip IP地址 |
| | | * @param type 类别 |
| | | * @return 记录数 |
| | | */ |
| | | public Integer selectCount(String ip, Integer type); |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * |
| | | * @param ip IP地址 |
| | | * @param type 类别 |
| | | * @param limit 记录数 |
| | | * @param offset 偏移量 |
| | | * @return 列表 |
| | | */ |
| | | public List<BlacklistEntity> selectByPage(String ip, Integer type, Integer limit, Integer offset); |
| | | |
| | | /** |
| | | * 查询所有 |
| | | * |
| | | * @return |
| | | */ |
| | | public List<BlacklistEntity> selectAll(); |
| | | |
| | | /** |
| | | * 根据ID查询 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public BlacklistEntity selectById(int id); |
| | | |
| | | /** |
| | | * 查询IP列表 |
| | | * @param type 类别 |
| | | * @return |
| | | */ |
| | | public List<String> selectIpList(Integer type); |
| | | |
| | | /** |
| | | * 插入一条 |
| | | * |
| | | * @param entity |
| | | * @return |
| | | */ |
| | | public Integer insert(BlacklistEntity entity); |
| | | |
| | | /** |
| | | * 插入多条 |
| | | * |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public Integer inserts(List<BlacklistEntity> list); |
| | | |
| | | /** |
| | | * 删除一条 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public Integer delete(int id); |
| | | |
| | | /** |
| | | * 删除多条 |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | public Integer deletes(List<Integer> ids); |
| | | |
| | | /** |
| | | * 更新一条 |
| | | * |
| | | * @param entity |
| | | * @return |
| | | */ |
| | | public Integer update(BlacklistEntity entity); |
| | | |
| | | /** |
| | | * 更新多条 |
| | | * |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public Integer updates(List<BlacklistEntity> list); |
| | | } |