<?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.hc.business.mapper.ZccmClassConfigSponsorMapper">

    <resultMap type="zccmclassConfigSponsor" id="ClassConfigSponsorMap">
        <result property="sponsorId" column="sponsor_id" jdbcType="INTEGER"/>
        <result property="sponsorUrl" column="sponsor_url" jdbcType="VARCHAR"/>
        <result property="sponsorName" column="sponsor_name" jdbcType="VARCHAR"/>
        <result property="classId" column="class_id" jdbcType="INTEGER"/>
        <result property="sponsorIndex" column="sponsor_index" jdbcType="INTEGER"/>
        <result property="createTime" column="create_time" jdbcType="INTEGER"/>
    </resultMap>

    <sql id="Base_Column_List">
        sponsor_id,
           sponsor_url,
           sponsor_name,
           class_id,
           sponsor_index,
           create_time
    </sql>

    <select id="queryListByClassId" resultMap="ClassConfigSponsorMap">
        SELECT
        <include refid="Base_Column_List"/>
        FROM zccm_class_config_sponsor
        WHERE class_id = #{classId}
    </select>

</mapper>
