|
@@ -18,6 +18,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="gradeId" column="grade_id"/>
|
|
|
</resultMap>
|
|
|
|
|
|
+ <resultMap type="com.zhongzheng.modules.user.vo.UserNoteVo" id="UserNoteVo">
|
|
|
+ <result property="noteId" column="note_id"/>
|
|
|
+ <result property="noteText" column="note_text"/>
|
|
|
+ <result property="noteDate" column="note_date"/>
|
|
|
+ <result property="courseId" column="course_id"/>
|
|
|
+ <result property="sectionId" column="section_id"/>
|
|
|
+ <result property="goodsId" column="goods_id"/>
|
|
|
+ <result property="createTime" column="create_time"/>
|
|
|
+ <result property="moduleId" column="module_id"/>
|
|
|
+ <result property="chapterId" column="chapter_id"/>
|
|
|
+ <result property="gradeId" column="grade_id"/>
|
|
|
+ <result property="sectionName" column="section_name"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
<resultMap type="com.zhongzheng.modules.user.vo.UserDateNoteVo" id="UserDateNoteVo">
|
|
|
<result property="dateNote" column="date_note"/>
|
|
|
</resultMap>
|
|
@@ -52,4 +66,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</if>
|
|
|
order by un.note_date desc
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="listDateSon" parameterType="com.zhongzheng.modules.user.bo.UserNoteQueryBo" resultMap="UserNoteVo">
|
|
|
+ SELECT
|
|
|
+ un.*,
|
|
|
+ (SELECT cs.`name` FROM course_section cs where cs.section_id = un.section_id) as section_name
|
|
|
+ FROM
|
|
|
+ user_note un
|
|
|
+ WHERE 1=1
|
|
|
+ AND un.status = 1
|
|
|
+ <if test="goodsId != null and goodsId !='' ">
|
|
|
+ AND un.goods_id=#{goodsId}
|
|
|
+ </if>
|
|
|
+ <if test="moduleId != null and moduleId !='' ">
|
|
|
+ AND un.module_id=#{moduleId}
|
|
|
+ </if>
|
|
|
+ <if test="courseId != null and courseId !='' ">
|
|
|
+ AND un.course_id =#{courseId}
|
|
|
+ </if>
|
|
|
+ <if test="sectionId != null and sectionId !='' ">
|
|
|
+ AND un.section_id =#{sectionId}
|
|
|
+ </if>
|
|
|
+ <if test="chapterId != null and chapterId !='' ">
|
|
|
+ AND un.chapter_id =#{chapterId}
|
|
|
+ </if>
|
|
|
+ <if test="gradeId != null and gradeId !='' ">
|
|
|
+ AND un.grade_id =#{gradeId}
|
|
|
+ </if>
|
|
|
+ <if test="userId != null and userId !='' ">
|
|
|
+ AND un.user_id =#{userId}
|
|
|
+ </if>
|
|
|
+ order by un.note_date desc
|
|
|
+ </select>
|
|
|
</mapper>
|