<?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.qmth.paper.library.common.mapper.BasicSchoolMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.qmth.paper.library.common.entity.BasicSchool">
    <result column="id" property="id" />
        <result column="code" property="code" />
        <result column="name" property="name" />
        <result column="enable" property="enable" />
        <result column="access_key" property="accessKey" />
        <result column="access_secret" property="accessSecret" />
        <result column="remark" property="remark" />
        <result column="create_time" property="createTime" />
        <result column="update_time" property="updateTime" />
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id,
        code, name, enable, access_key, access_secret, remark, create_time, update_time
    </sql>
    <select id="listSchool" resultType="com.qmth.paper.library.common.bean.dto.SchoolDto">
        select id, code,name, enable, logo from basic_school where enable = true order by create_time desc
    </select>

</mapper>
