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

    <select id="countSearch"
            parameterType="com.crm.rely.backend.core.entity.custom.login.special.CustomLoginSpecialCalcListEntity"
            resultType="Integer">
        select count(clsc.id)
        from custom_login_special_calc clsc
        <include refid="whereSql"></include>
    </select>

    <select id="listSearch"
            parameterType="com.crm.rely.backend.core.entity.custom.login.special.CustomLoginSpecialCalcListEntity"
            resultType="com.crm.rely.backend.core.pojo.table.CustomLoginSpecialCalcTable">
        select clsc.*
        from custom_login_special_calc clsc
        <include refid="whereSql"></include>
    </select>


    <sql id="whereSql">
        <where>
            <if test="login != null">
                and clsc.login = #{login}
            </if>
        </where>
    </sql>

</mapper>