<?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.ZjkLearningRecordsMapper">

    <select id="selectRecord" resultType="org.dromara.zjk.learning_world.domain.vo.ZjkLearningRecordsVo">
        SELECT zlr.*,expert_name,course_name
        FROM zjk_learning_records zlr
        LEFT JOIN zjk_expert ze on ze.expert_id = zlr.expert_id
        left join zjk_learning_course zlc on zlc.id = zlr.course_id
        where zlr.del_flag = 0
        <if test="bo.courseName != null and bo.courseName != ''">
            and zlc.course_name like '%' || #{bo.courseName} || '%'
        </if>
        <if test="bo.expertName != null and bo.expertName != '' ">
            and ze.expert_name like '%' || #{bo.expertName} || '%'
        </if>
    </select>
</mapper>
