<?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.crm.manager.dao.mapper.SysGoogleGroupEmailMapper">
    <select id="countList" resultType="integer"
            parameterType="com.crm.rely.backend.core.entity.system.google.SysGoogleGroupEmailSearchEntity">
        select count(*) from sys_google_group_email
        <where>
            <if test="groupName!=null and groupName!=''">
                and `group_name` like concat(#{groupName},"%")
            </if>
        </where>
    </select>

    <select id="pageList" resultType="com.crm.rely.backend.core.pojo.table.SysGoogleGroupEmailTable"
            parameterType="com.crm.rely.backend.core.entity.system.google.SysGoogleGroupEmailSearchEntity">
        select * from sys_google_group_email
        <where>
            <if test="groupName!=null and groupName!=''">
                and `group_name` like concat(#{groupName},"%")
            </if>
        </where>
        order by id desc
        <if test="page != null">
            limit #{page.offset},#{page.row}
        </if>
    </select>
</mapper>