beetlsql3-dev
Mlxa0324 2 years ago
parent 82af76a7bc
commit c07ae959c0

@ -4,13 +4,11 @@ queryByCondition
select
@pageTag(){
t.*
@if(!isEmpty(teacherOpenCourseChatLogParentId)){
,(select count(1) from teacher_open_course_chat_log a
where a.teacher_open_course_chat_log_status = 1
and teacher_open_course_chat_log_parent_id = #teacherOpenCourseChatLogId#
) as comment_count
@}
t.*,
ifnull((select count(1) from teacher_open_course_chat_log a
where a.teacher_open_course_chat_log_status = 1
and a.teacher_open_course_chat_log_parent_id = t.teacher_open_course_chat_log_id
), 0) as comment_count
@}
from teacher_open_course_chat_log t
where 1=1

Loading…
Cancel
Save