CourseMapper.xml 1.87 KB
<?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.lego.core.mapper.CourseMapper">

    <resultMap type="CourseVo" id="CourseResult">
        <id property="id" column="id"/>
        <result property="entiretyId" column="entirety_id"/>
        <result property="name" column="name"/>
        <result property="type" column="type"/>
        <result property="twoDimensionalType" column="two_dimensional_type"/>
        <result property="twoDimensionalUrl" column="two_dimensional_url"/>
        <result property="threeDimensionalType" column="two_dimensional_type"/>
        <result property="threeDimensionalType" column="three_dimensional_type"/>
        <result property="threeDimensionalUrl" column="three_dimensional_url"/>
        <result property="threeDimensionalType" column="three_dimensional_type"/>
        <result property="caseOssId" column="case_oss_id"/>
        <result property="caseName" column="case_name"/>
        <result property="teachingOssId" column="teaching_oss_id"/>
        <result property="teachingName" column="teaching_name"/>
        <result property="pptOssId" column="ppt_oss_id"/>
        <result property="pptName" column="ppt_name"/>
        <result property="ossId" column="oss_id"/>
        <result property="language" column="language"/>
        <result property="canPack" column="can_pack"/>
        <result property="sort" column="sort"/>
        <result property="programType" column="program_type"/>
    </resultMap>

    <select id="selectPageCourse" resultMap="CourseResult">
        select u.*
        from core_course u
                 inner join core_entirety v ON v.id = u.entirety_id
                 inner join core_building_block w ON w.id = v.building_block_id
            ${ew.getCustomSqlSegment}
    </select>
</mapper>