<?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="jnpf.cultivate.mapper.FtbCultivateLabelMapper">

    <select id="commonCourseLabelList" resultType="jnpf.model.cultivate.v2.label.vo.FtbCultivateLabelVo">
        SELECT
        distinct p1.F_Id as id,
        p1.F_Name as name
        FROM
        ftb_cultivate_label as p1 join ftb_cultivate_course as p2 on p1.F_Id = p2.F_TypeId
        WHERE
        p1.F_EnabledMark = 0
        and p1.F_type=1
        and p2.F_Label=1
        and p2.F_IsGrounding = 1
        and p2.F_EnabledMark = 0

        <if test="params.keyWord!= null and params.keyWord!= ''">
            and p2.F_Name like CONCAT('%',#{params.keyWord},'%')
        </if>

        ORDER BY
        p1.F_Source DESC,
        p1.F_CreatorTime asc
    </select>
</mapper>