Commit 7bc33e19 authored by 王淑君's avatar 王淑君

sql查询课程评论添加corpId

parent b619ecb8
...@@ -39,12 +39,13 @@ public interface BDiscussRepository extends BaseMapper<BDiscuss> { ...@@ -39,12 +39,13 @@ public interface BDiscussRepository extends BaseMapper<BDiscuss> {
" AND bd.del_flag = '0' " + " AND bd.del_flag = '0' " +
" AND bd.flag = '1' " " AND bd.flag = '1' "
+ "<if test=\"lessonId !=null and lessonId != '' \">and bd.lesson_id = #{lessonId} </if> " + "<if test=\"lessonId !=null and lessonId != '' \">and bd.lesson_id = #{lessonId} </if> "
+ "<if test=\"pid !=null and pid != '' \">and bd.pid = #{pid} </if> " + "<if test=\"pid !=null and pid != '' \">and bd.pid = #{pid} </if> " +
+ "<if test=\"pid ==null or pid == '' \">and bd.pid = '-1' </if> "
"and corp_id = #{corpId} " +
" order by bd.update_date desc "
+ "</script>") + "</script>")
@ResultMap(value = "BaseResultMapDto" ) @ResultMap(value = "BaseResultMapDto" )
List<BDiscussDto> getDiscussByLessonId(@Param("lessonId") String lessonId, @Param("pid") String pid); List<BDiscussDto> getDiscussByLessonId(@Param("lessonId") String lessonId, @Param("pid") String pid, @Param("corpId") String corpId);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment