Commit 130b434f authored by luzhuang's avatar luzhuang

fix:知识广场查询,重新统计

parent 587d0748
...@@ -1354,9 +1354,57 @@ public interface BLessonRepository extends BaseMapper<BLesson> { ...@@ -1354,9 +1354,57 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
* 查询平台推荐 * 查询平台推荐
* @return * @return
*/ */
@Select(" <script> select distinct bl.* " + @Select(" <script> select distinct " +
" ,su.name lecturerName " + " bl.business_id, " +
" bl.code, " +
" bl.lesson_name, " +
" bl.default_url, " +
" bl.create_by, " +
" bl.update_by, " +
" bl.del_flag, " +
" bl.flag, " +
" bl.remarks, " +
" bl.update_date, " +
" bl.create_date, " +
" bl.class_hour, " +
" bl.lecturer_id, " +
" bl.release_state, " +
" bl.course_id, " +
" bl.course_time, " +
" bl.course_description, " +
" bl.view_range, " +
" bl.release_date, " +
" bl.close_date, " +
" bl.lesson_type, " +
" bl.recommend, " +
" bl.corp_id, " +
" bl.apply_start_date, " +
" bl.apply_over_date, " +
" bl.train_start_date, " +
" bl.train_over_date, " +
" bl.max_apply_person, " +
" bl.train_address, " +
" bl.train_sign_time, " +
" bl.qr_code, " +
" bl.value_consume, " +
" bl.value_gain, " +
" bl.value_update_date, " +
" bl.is_trans, " +
" bl.from_corp, " +
" bl.push_lable, " +
" su.name lecturerName " +
" ,suc.name createByName " + " ,suc.name createByName " +
" ,(select count(1) from b_lesson_person b " +
" left join s_user s on s.business_id = b.person_id " +
" where 1=1 " +
" and b.del_flag != 1 and b.flag = 1 and b.lesson_id = bl.business_id " +
" and s.corp_id = #{curUser.corpId} ) person_number ,"+
"(select count(1) from b_discuss b " +
" left join s_user s on s.business_id = b.student_id " +
" where 1=1 " +
" and b.del_flag='0' and b.flag = '1' " +
" and b.lesson_id = bl.business_id " +
" and s.corp_id = #{curUser.corpId} ) discuss_number " +
" from b_lesson bl " + " from b_lesson bl " +
" right join b_lesson_corp blc on blc.lesson_id = bl.business_id and bl.corp_id = '###' " + " right join b_lesson_corp blc on blc.lesson_id = bl.business_id and bl.corp_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 " +
......
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