<?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.CustomLoginDeleteExcludeMapper">

    <select id="countList" resultType="integer"
            parameterType="com.crm.rely.backend.core.entity.custom.login.delete.CustomLoginDeleteExcludeSearchEntity">
        select count(*) from custom_login_delete_exclude
        <where>
            <if test="login!=null">
                and `login` = #{login}
            </if>
            <if test="cId!=null">
                and `c_id` = #{cId}
            </if>
            <if test="platform!=null and platform!='' ">
                and `platform`=#{platform}
            </if>
        </where>
    </select>

    <select id="pageList" resultType="com.crm.rely.backend.core.pojo.table.CustomLoginDeleteExcludeTable"
            parameterType="com.crm.rely.backend.core.entity.custom.login.delete.CustomLoginDeleteExcludeSearchEntity">
        select * from custom_login_delete_exclude
        <where>
            <if test="login!=null">
                and `login` = #{login}
            </if>
            <if test="cId!=null">
                and `c_id` = #{cId}
            </if>
            <if test="platform!=null and platform!='' ">
                and `platform`=#{platform}
            </if>
        </where>
        order by id desc
        limit #{page.offset},#{page.row}
    </select>

</mapper>