<?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="cn.xluobo.business.sc.base.repo.mapper.ScSchoolMapper">

    <select id="selectForSelect" resultType="cn.xluobo.business.sc.base.domain.resp.RespSchoolSelect">
        select school_id,school_name,province_code,city_code,
               fcn_dict_name(province_code,'province_code') as province_name,
               fcn_dict_name(city_code,'city_code') as city_name
        from sc_school
        where 1=1
        <if test="search != null and search != ''">
            and school_name like concat('%',#{search} ,'%')
        </if>
        <if test="schoolId != null and schoolId != ''">
            and school_id = #{schoolId}
        </if>
        limit 0,#{maxRecord}
    </select>
</mapper>
