package top.phrack.ctf.models.dao;

import java.util.List;
import org.apache.ibatis.annotations.Param;
import top.phrack.ctf.pojo.IpLogs;
import top.phrack.ctf.pojo.IpLogsExample;

public interface IpLogsMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table public.ip_logs
     *
     * @mbggenerated Thu Mar 31 16:07:59 CST 2016
     */
    int countByExample(IpLogsExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table public.ip_logs
     *
     * @mbggenerated Thu Mar 31 16:07:59 CST 2016
     */
    int deleteByExample(IpLogsExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table public.ip_logs
     *
     * @mbggenerated Thu Mar 31 16:07:59 CST 2016
     */
    int deleteByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table public.ip_logs
     *
     * @mbggenerated Thu Mar 31 16:07:59 CST 2016
     */
    int insert(IpLogs record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table public.ip_logs
     *
     * @mbggenerated Thu Mar 31 16:07:59 CST 2016
     */
    int insertSelective(IpLogs record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table public.ip_logs
     *
     * @mbggenerated Thu Mar 31 16:07:59 CST 2016
     */
    List<IpLogs> selectByExample(IpLogsExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table public.ip_logs
     *
     * @mbggenerated Thu Mar 31 16:07:59 CST 2016
     */
    IpLogs selectByPrimaryKey(Long id);
    
    IpLogs selectByAddrAndId(@Param("addr")String addr,@Param("userid")Long userid);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table public.ip_logs
     *
     * @mbggenerated Thu Mar 31 16:07:59 CST 2016
     */
    int updateByExampleSelective(@Param("record") IpLogs record, @Param("example") IpLogsExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table public.ip_logs
     *
     * @mbggenerated Thu Mar 31 16:07:59 CST 2016
     */
    int updateByExample(@Param("record") IpLogs record, @Param("example") IpLogsExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table public.ip_logs
     *
     * @mbggenerated Thu Mar 31 16:07:59 CST 2016
     */
    int updateByPrimaryKeySelective(IpLogs record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table public.ip_logs
     *
     * @mbggenerated Thu Mar 31 16:07:59 CST 2016
     */
    int updateByPrimaryKey(IpLogs record);
    
    Long CountByUserId(Long userid);
    
    List<IpLogs> selectByUserid(Long userid);
    
    List<IpLogs> selectAllOrderByUserId();
}