<?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.hhh.cloud.framework.demo.clazz.mapper.ClazzStudentMapper">

    <select id="selectPageStudent" resultType="com.hhh.cloud.framework.demo.clazz.entity.ClazzStudent">
        SELECT id, name, age, gender, class_no
        FROM clazz_student
        WHERE 1 = 1
        <if test="map.name != null and map.name != ''">
            AND name LIKE CONCAT('%', #{map.name}, '%')
        </if>
        <if test="map.classNo != null and map.classNo != ''">
            AND class_no = #{classNo}
        </if>
        <include refid="com.hhh.cloud.framework.command.mapper.CommandMapper.tableLogic" />  <!-- 逻辑删除 -->
        ORDER BY name
    </select>
</mapper>
