<?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="io.renren.modules.snoop.dao.SnoopDao">

    <select id="selectByName" resultType="io.renren.modules.snoop.entity.SnoopEntity">
        SELECT * FROM snoop WHERE snoop_name like concat('%',#{name},'%') limit #{page}, #{size};
    </select>

    <select id="getCountByName" resultType="java.lang.Integer">
        SELECT count(*) from snoop
        WHERE name like concat('%',#{name},'%');
    </select>
</mapper>