<?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.liquidnet.service.smile.mapper.SmileSchoolMapper">

    <select id="selectListLimit" resultType="com.liquidnet.service.smile.entity.SmileSchool">
        select id,name from smile_school where  `del_tag` = 0 LIMIT 20;
    </select>

    <select id="selectSchoolList" parameterType="java.util.Map" resultType="com.liquidnet.service.smile.entity.SmileSchool">
        select *
        from smile_school
        <where>
            del_tag = 0
            <if test="name!=''">
                AND `name` LIKE concat('%',#{name},'%')
            </if>
        </where>
    </select>

    <update id="updateDel">
        update smile_school set `del_tag` = 1 where id = #{id}
    </update>

</mapper>
