<?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="org.dromara.zjk.learning_world.mapper.ZjkLearningResourceMapper">

    <select id="getById" resultType="org.dromara.zjk.learning_world.domain.vo.ZjkLearningResourceVo">
        SELECT
        zlr.*,
        su.nick_name user_name,
        so.original_name,
        so.url
        FROM
        zjk_learning_resource zlr
        INNER JOIN sys_user su ON su.user_id = zlr.create_by
        left join sys_oss so on so.oss_id = zlr.paper_accessory
        WHERE
        zlr.del_flag = 0
        AND zlr.ID = #{ ID}
    </select>
</mapper>
