Sfoglia il codice sorgente

fix:课程评论查询修复

caoliqin 1 giorno fa
parent
commit
a13d4de8f5

+ 9 - 0
fs-service/src/main/java/com/fs/course/param/FsCourseWatchCommentPageParam.java

@@ -1,5 +1,6 @@
 package com.fs.course.param;
 
+import com.fs.common.annotation.Excel;
 import com.fs.common.core.domain.BaseEntity;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
@@ -30,4 +31,12 @@ public class FsCourseWatchCommentPageParam extends BaseEntity{
     @ApiModelProperty(value = "是否全部")
     private Boolean isAll = false;
 
+    /** 课程id */
+    @Excel(name = "课程id")
+    private Long courseId;
+
+    /** 视频id */
+    @Excel(name = "视频id")
+    private Long videoId;
+
 }

+ 2 - 0
fs-service/src/main/resources/mapper/course/FsCourseWatchCommentMapper.xml

@@ -56,6 +56,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             LEFT JOIN fs_user_course_video on fs_user_course_video.video_id = fs_course_watch_comment.video_id
         </if>
         <where>
+            <if test="courseId != null "> and fs_course_watch_comment.course_id = #{courseId}</if>
+            <if test="videoId != null "> and fs_course_watch_comment.video_id = #{videoId}</if>
             <if test="nickName != null and nickName != '' ">and fs_user.nick_name like concat('%', #{nickName}, '%')</if>
             <if test="isAll != null and isAll == true and keywords != null and keywords !='' ">
                 AND (fs_user.nickname LIKE concat('%',#{keywords},'%')