<?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.web.dao.mapper.SysConfigMapper">

    <select id="countList" resultType="integer"
            parameterType="com.crm.rely.backend.core.entity.system.config.SysConfigSearchEntity">

        select count(*) from sys_config
        <where>
            <if test="code!=null and code!=''">
                and code=#{code}
            </if>
        </where>

    </select>

    <select id="pageList" resultType="com.crm.rely.backend.core.pojo.table.SysConfigTable"
            parameterType="com.crm.rely.backend.core.entity.system.config.SysConfigSearchEntity">

        select * from sys_config
        <where>
            <if test="code!=null and code!=''">
                and code=#{code}
            </if>
        </where>
        limit #{page.offset},#{page.row}
    </select>


</mapper>