Commit af525ee3 authored by luzhuang's avatar luzhuang

feat: 我的课程 新增平台推送的课程

parent 8aceea52
...@@ -812,7 +812,7 @@ public class BLessonController extends PaginationController<BLesson> { ...@@ -812,7 +812,7 @@ public class BLessonController extends PaginationController<BLesson> {
* @param * @param
* @return * @return
*/ */
@ApiOperation(value = "647 返回首页模块角标数量", notes = "返回首页模块角标数量", response = BLesson.class) @ApiOperation(value = "647 返回首页模块角标数量", notes = "返回首页模块角标数量", response = NewCountDTO.class)
@GetMapping(value = "/queryNewCount") @GetMapping(value = "/queryNewCount")
public Result queryNewCount(CurUser curUser, BindingResult bindingResult) { public Result queryNewCount(CurUser curUser, BindingResult bindingResult) {
return Result.builder(new PersistModel(1), return Result.builder(new PersistModel(1),
......
...@@ -23,13 +23,13 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> { ...@@ -23,13 +23,13 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> {
" left join b_lesson bl on blp.lesson_id = bl.business_id " + " left join b_lesson bl on blp.lesson_id = bl.business_id " +
" left join s_user su on su.business_id = bl.lecturer_id " + " left join s_user su on su.business_id = bl.lecturer_id " +
" left join b_course bc on bc.business_id = bl.course_id " + " left join b_course bc on bc.business_id = bl.course_id " +
" left join b_lesson_corp blc on bl.business_id = blc.lesson_id and bl.corp_id = '###' " +
" where blp.del_flag != 1 and blp.flag = 1 " + " where blp.del_flag != 1 and blp.flag = 1 " +
" and bl.del_flag != 1 and bl.flag = 1 " + " and bl.del_flag != 1 and bl.flag = 1 " +
" and bl.del_flag != 1 and bl.flag = 1 " +
// " and bl.release_state = '2' " + // " and bl.release_state = '2' " +
" and blp.person_id = #{param.userId} " + " and blp.person_id = #{param.userId} " +
" and bl.corp_id = #{param.corpId} " + " and (bl.corp_id = #{param.corpId} or blc.corp_id = #{param.corpId} )" +
" <if test= \" param.isFinish != null and param.isFinish != ''\">and blp.is_finish = #{param.isFinish} </if> " + " <if test= \" param.isFinish != null and param.isFinish != ''\">and blp.is_finish = #{param.isFinish} </if> " +
" <if test= \" param.lessonType !=null and param.lessonType != ''\">and bl.lesson_type = #{param.lessonType} </if> " + " <if test= \" param.lessonType !=null and param.lessonType != ''\">and bl.lesson_type = #{param.lessonType} </if> " +
......
...@@ -540,34 +540,38 @@ public interface BLessonRepository extends BaseMapper<BLesson> { ...@@ -540,34 +540,38 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
"(select COUNT(1) from b_lesson_person blp " + "(select COUNT(1) from b_lesson_person blp " +
" LEFT join b_lesson bl on blp.lesson_id = bl.business_id " + " LEFT join b_lesson bl on blp.lesson_id = bl.business_id " +
" LEFT join b_lesson_corp blc on blc.lesson_id = bl.business_id and bl.corp_id = '###'" +
" where blp.del_flag != 1 and blp.flag = 1 " + " where blp.del_flag != 1 and blp.flag = 1 " +
" and bl.del_flag != 1 and bl.flag = 1 " + " and bl.del_flag != 1 and bl.flag = 1 " +
" and bl.lesson_type = 0 " + " and bl.lesson_type = 0 " +
" and bl.corp_id = #{curUser.corpId} " + " and (bl.corp_id = #{curUser.corpId} or blc.corp_id = #{curUser.corpId}) " +
" and blp.person_id = #{curUser.userId} and blp.is_finish is not null ) learnAllCount, " + " and blp.person_id = #{curUser.userId} and blp.is_finish is not null ) learnAllCount, " +
"(select COUNT(1) from b_lesson_person blp " + "(select COUNT(1) from b_lesson_person blp " +
" LEFT join b_lesson bl on blp.lesson_id = bl.business_id " + " LEFT join b_lesson bl on blp.lesson_id = bl.business_id " +
" LEFT join b_lesson_corp blc on blc.lesson_id = bl.business_id and bl.corp_id = '###'" +
" where blp.del_flag != 1 and blp.flag = 1 " + " where blp.del_flag != 1 and blp.flag = 1 " +
" and bl.del_flag != 1 and bl.flag = 1 " + " and bl.del_flag != 1 and bl.flag = 1 " +
" and bl.lesson_type = 0 " + " and bl.lesson_type = 0 " +
" and bl.corp_id = #{curUser.corpId} " + " and (bl.corp_id = #{curUser.corpId} or blc.corp_id = #{curUser.corpId}) " +
" and blp.person_id = #{curUser.userId} and blp.is_finish = '2') finishCount, " + " and blp.person_id = #{curUser.userId} and blp.is_finish = '2') finishCount, " +
"(select COUNT(1) from b_lesson_person blp " + "(select COUNT(1) from b_lesson_person blp " +
" LEFT join b_lesson bl on blp.lesson_id = bl.business_id " + " LEFT join b_lesson bl on blp.lesson_id = bl.business_id " +
" LEFT join b_lesson_corp blc on blc.lesson_id = bl.business_id and bl.corp_id = '###'" +
" where blp.del_flag != 1 and blp.flag = 1 " + " where blp.del_flag != 1 and blp.flag = 1 " +
" and bl.del_flag != 1 and bl.flag = 1 " + " and bl.del_flag != 1 and bl.flag = 1 " +
" and bl.lesson_type = 0 " + " and bl.lesson_type = 0 " +
" and bl.corp_id = #{curUser.corpId} " + " and (bl.corp_id = #{curUser.corpId} or blc.corp_id = #{curUser.corpId}) " +
" and blp.person_id = #{curUser.userId} and blp.is_finish = '1') notFinishCount, " + " and blp.person_id = #{curUser.userId} and blp.is_finish = '1') notFinishCount, " +
"(select COUNT(1) from b_lesson_person blp " + "(select COUNT(1) from b_lesson_person blp " +
" LEFT join b_lesson bl on blp.lesson_id = bl.business_id " + " LEFT join b_lesson bl on blp.lesson_id = bl.business_id " +
" LEFT join b_lesson_corp blc on blc.lesson_id = bl.business_id and bl.corp_id = '###'" +
" where blp.del_flag != 1 and blp.flag = 1 " + " where blp.del_flag != 1 and blp.flag = 1 " +
" and bl.del_flag != 1 and bl.flag = 1 " + " and bl.del_flag != 1 and bl.flag = 1 " +
" and bl.lesson_type = 0 " + " and bl.lesson_type = 0 " +
" and bl.corp_id = #{curUser.corpId} " + " and (bl.corp_id = #{curUser.corpId} or blc.corp_id = #{curUser.corpId}) " +
" and blp.person_id = #{curUser.userId} and blp.is_finish = '0') notStartCount " + " and blp.person_id = #{curUser.userId} and blp.is_finish = '0') notStartCount " +
"</script>"}) "</script>"})
ILessonCountDTO iLessonCount(@Param("curUser") CurUser curUser); ILessonCountDTO iLessonCount(@Param("curUser") CurUser curUser);
......
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