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

    <select id="selectCommonPage" resultType="org.dromara.zjk.learning_world.domain.vo.ZjkLearningCommontVo">
        select zlc.*,zli.information_title
        from Zjk_learning_commont  zlc
        inner join zjk_learning_information zli on zlc.information_id = zli.id
        where zlc.del_flag = 0 and zli.del_flag = 0
        <if test="bo.startTime != null ">
            and zlc.comment_time >= #{bo.startTime}
        </if>
          <if test="bo.endTime != null ">
            and zlc.comment_time &lt;= #{bo.endTime}
        </if>
        <if test="bo.comment != null and bo.comment != '' ">
            and zlc.comment like '%' || #{bo.comment} || '%'
        </if>
          <if test="bo.status != null and bo.status != '' ">
            and zlc.status = #{bo.status}
        </if>
          <if test="bo.parentId != null ">
            and zlc.parent_id = #{bo.parentId}
        </if>
        <if test="bo.informationId != null ">
            and zlc.information_id = #{bo.informationId}
        </if>
    </select>
</mapper>
