|
|
|
@ -377,12 +377,72 @@ getGroupQuestionTypeCount
|
|
|
|
|
count( 1 ) AS total_count
|
|
|
|
|
FROM
|
|
|
|
|
resources_question t
|
|
|
|
|
left join course_info ta on ta.course_info_id = t.course_info_id
|
|
|
|
|
left join course_label tb on tb.course_label_id = ta.course_label_id
|
|
|
|
|
WHERE
|
|
|
|
|
1 = 1
|
|
|
|
|
AND ta.course_info_status = 1
|
|
|
|
|
AND t.question_status = 1
|
|
|
|
|
@ // 开课ID
|
|
|
|
|
AND tb.course_label_status = 1
|
|
|
|
|
@if(!isEmpty(courseLabelTypePlural)){
|
|
|
|
|
and find_in_set(tb.course_label_type, #courseLabelTypePlural#)
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(resourcesQuestionIds)){
|
|
|
|
|
and find_in_set(t.resources_question_id,#resourcesQuestionIds#)
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(resourcesQuestionId)){
|
|
|
|
|
and t.resources_question_id =#resourcesQuestionId#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(courseInfoIds)){
|
|
|
|
|
and find_in_set(t.course_info_id,#courseInfoIds#)
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(courseInfoId)){
|
|
|
|
|
AND t.course_info_id = #courseInfoId#
|
|
|
|
|
and t.course_info_id =#courseInfoId#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(questionType)){
|
|
|
|
|
and t.question_type =#questionType#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(questionStatus)){
|
|
|
|
|
and t.question_status =#questionStatus#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(questionScore)){
|
|
|
|
|
and t.question_score =#questionScore#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(questionStem)){
|
|
|
|
|
and t.question_stem = #questionStem#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(questionOptionA)){
|
|
|
|
|
and t.question_option_a =#questionOptionA#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(questionOptionB)){
|
|
|
|
|
and t.question_option_b =#questionOptionB#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(questionOptionC)){
|
|
|
|
|
and t.question_option_c =#questionOptionC#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(questionOptionD)){
|
|
|
|
|
and t.question_option_d =#questionOptionD#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(questionOptionE)){
|
|
|
|
|
and t.question_option_e =#questionOptionE#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(questionAnswer)){
|
|
|
|
|
and t.question_answer =#questionAnswer#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(questionAnalysis)){
|
|
|
|
|
and t.question_analysis =#questionAnalysis#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(orgId)){
|
|
|
|
|
and t.org_id =#orgId#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(orgIdPlural)){
|
|
|
|
|
and find_in_set(ifnull(t.org_id, 1), #orgIdPlural#)
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(userId)){
|
|
|
|
|
and t.user_id =#userId#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(addType)){
|
|
|
|
|
and t.add_type =#addType#
|
|
|
|
|
@}
|
|
|
|
|
GROUP BY
|
|
|
|
|
t.question_type
|
|
|
|
|