queryByCondition
===
* 根据不为空的参数进行分页查询
select
@pageTag (){
t.*
@}
from teacher_open_course_question_log t
where 1=1
@// 数据权限, 该sql语句功能点,如果不考虑数据权限,可以删除此行
and #function ("teacherOpenCourseQuestionLog.query")#
@if (!isEmpty(teacherOpenCourseQuestionLogId)){
and t.teacher_open_course_question_log_id =#teacherOpenCourseQuestionLogId#
@}
@if (!isEmpty(teacherOpenCourseQuestionLogIdPlural)){
and find_in_set(t.teacher_open_course_question_log_id,#teacherOpenCourseQuestionLogIdPlural#)
@}
@if (!isEmpty(teacherOpenCourseQuestionSettingId)){
and t.teacher_open_course_question_setting_id =#teacherOpenCourseQuestionSettingId#
@}
@if (!isEmpty(teacherOpenCourseQuestionSettingIdPlural)){
and find_in_set(t.teacher_open_course_question_setting_id,#teacherOpenCourseQuestionSettingIdPlural#)
@}
@if (!isEmpty(resourcesQuestionSnapshotId)){
and t.resources_question_snapshot_id =#resourcesQuestionSnapshotId#
@}
@if (!isEmpty(resourcesQuestionSnapshotIdPlural)){
and find_in_set(t.resources_question_snapshot_id,#resourcesQuestionSnapshotIdPlural#)
@}
@if (!isEmpty(teacherOpenCourseQuestionLogAnswer)){
and t.teacher_open_course_question_log_answer =#teacherOpenCourseQuestionLogAnswer#
@}
@if (!isEmpty(teacherOpenCourseQuestionLogUploadFile)){
and t.teacher_open_course_question_log_upload_file =#teacherOpenCourseQuestionLogUploadFile#
@}
@if (!isEmpty(teacherOpenCourseQuestionLogAddTime)){
and t.teacher_open_course_question_log_add_time =#teacherOpenCourseQuestionLogAddTime#
@}
@if (isEmpty(teacherOpenCourseQuestionLogStatus) && isEmpty(teacherOpenCourseQuestionLogStatusPlural)){
and t.teacher_open_course_question_log_status != 2
@}else{
@if (!isEmpty(teacherOpenCourseQuestionLogStatus)){
and t.teacher_open_course_question_log_status =#teacherOpenCourseQuestionLogStatus#
@}else if(!isEmpty(teacherOpenCourseQuestionLogStatusPlural)){
and find_in_set(t.teacher_open_course_question_log_status,#teacherOpenCourseQuestionLogStatusPlural#)
@}
@}
@if (!isEmpty(studentId)){
and t.student_id =#studentId#
@}
@if (!isEmpty(studentIdPlural)){
and find_in_set(t.student_id,#studentIdPlural#)
@}
@if (!isEmpty(studentScore)){
and t.student_score =#studentScore#
@}
@if (!isEmpty(questionType)){
and t.question_type =#questionType#
@}
@if (!isEmpty(questionTypePlural)){
and find_in_set(t.question_type,#questionTypePlural#)
@}
@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(isTuck)){
and t.is_tuck =#isTuck#
@}
@if (!isEmpty(isErrorFavorite)){
and (t.is_error_favorite =#isErrorFavorite# or t.student_score != t.question_score)
@}
@if (!isEmpty(orgId)){
and t.org_id =#orgId#
@}
@if (!isEmpty(orgIdPlural)){
and find_in_set(t.org_id,#orgIdPlural#)
@}
@if (!isEmpty(userId)){
and t.user_id =#userId#
@}
@if (!isEmpty(userIdPlural)){
and find_in_set(t.user_id,#userIdPlural#)
@}
queryByConditionQuery
===
* 根据不为空的参数进行分页查询(无权限)
select
@pageTag (){
t.*
@}
from teacher_open_course_question_log t
where 1=1
@if (!isEmpty(teacherOpenCourseQuestionLogId)){
and t.teacher_open_course_question_log_id =#teacherOpenCourseQuestionLogId#
@}
@if (!isEmpty(teacherOpenCourseQuestionLogIdPlural)){
and find_in_set(t.teacher_open_course_question_log_id,#teacherOpenCourseQuestionLogIdPlural#)
@}
@if (!isEmpty(teacherOpenCourseQuestionSettingId)){
and t.teacher_open_course_question_setting_id =#teacherOpenCourseQuestionSettingId#
@}
@if (!isEmpty(teacherOpenCourseQuestionSettingIdPlural)){
and find_in_set(t.teacher_open_course_question_setting_id,#teacherOpenCourseQuestionSettingIdPlural#)
@}
@if (!isEmpty(resourcesQuestionSnapshotId)){
and t.resources_question_snapshot_id =#resourcesQuestionSnapshotId#
@}
@if (!isEmpty(resourcesQuestionSnapshotIdPlural)){
and find_in_set(t.resources_question_snapshot_id,#resourcesQuestionSnapshotIdPlural#)
@}
@if (!isEmpty(teacherOpenCourseQuestionLogAnswer)){
and t.teacher_open_course_question_log_answer =#teacherOpenCourseQuestionLogAnswer#
@}
@if (!isEmpty(teacherOpenCourseQuestionLogUploadFile)){
and t.teacher_open_course_question_log_upload_file =#teacherOpenCourseQuestionLogUploadFile#
@}
@if (!isEmpty(teacherOpenCourseQuestionLogAddTime)){
and t.teacher_open_course_question_log_add_time =#teacherOpenCourseQuestionLogAddTime#
@}
@if (isEmpty(teacherOpenCourseQuestionLogStatus) && isEmpty(teacherOpenCourseQuestionLogStatusPlural)){
and t.teacher_open_course_question_log_status != 2
@}else{
@if (!isEmpty(teacherOpenCourseQuestionLogStatus)){
and t.teacher_open_course_question_log_status =#teacherOpenCourseQuestionLogStatus#
@}else if(!isEmpty(teacherOpenCourseQuestionLogStatusPlural)){
and find_in_set(t.teacher_open_course_question_log_status,#teacherOpenCourseQuestionLogStatusPlural#)
@}
@}
@if (!isEmpty(studentId)){
and t.student_id =#studentId#
@}
@if (!isEmpty(studentIdPlural)){
and find_in_set(t.student_id,#studentIdPlural#)
@}
@if (!isEmpty(studentScore)){
and t.student_score =#studentScore#
@}
@if (!isEmpty(questionType)){
and t.question_type =#questionType#
@}
@if (!isEmpty(questionTypePlural)){
and find_in_set(t.question_type,#questionTypePlural#)
@}
@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(isTuck)){
and t.is_tuck =#isTuck#
@}
@if (!isEmpty(isErrorFavorite)){
and (t.is_error_favorite =#isErrorFavorite# or t.student_score != t.question_score)
@}
@if (!isEmpty(orgId)){
and t.org_id =#orgId#
@}
@if (!isEmpty(orgIdPlural)){
and find_in_set(t.org_id,#orgIdPlural#)
@}
@if (!isEmpty(userId)){
and t.user_id =#userId#
@}
@if (!isEmpty(userIdPlural)){
and find_in_set(t.user_id,#userIdPlural#)
@}
studentScoreList
===
* 根据不为空的参数进行分页查询(无权限) 查询得分总和
select
@pageTag (){
tz.*
@}
from (
select
t.student_id,
ta.student_sn,
ta.student_name,
t.teacher_open_course_question_setting_id,
sum(t.student_score) as sum_student_score
from teacher_open_course_question_log t
left join student ta on ta.student_id = t.student_id
where 1=1
@if (!isEmpty(teacherOpenCourseQuestionLogId)){
and t.teacher_open_course_question_log_id =#teacherOpenCourseQuestionLogId#
@}
@if (!isEmpty(teacherOpenCourseQuestionLogIdPlural)){
and find_in_set(t.teacher_open_course_question_log_id,#teacherOpenCourseQuestionLogIdPlural#)
@}
@if (!isEmpty(teacherOpenCourseQuestionSettingId)){
and t.teacher_open_course_question_setting_id =#teacherOpenCourseQuestionSettingId#
@}
@if (!isEmpty(teacherOpenCourseQuestionSettingIdPlural)){
and find_in_set(t.teacher_open_course_question_setting_id,#teacherOpenCourseQuestionSettingIdPlural#)
@}
@if (!isEmpty(resourcesQuestionSnapshotId)){
and t.resources_question_snapshot_id =#resourcesQuestionSnapshotId#
@}
@if (!isEmpty(resourcesQuestionSnapshotIdPlural)){
and find_in_set(t.resources_question_snapshot_id,#resourcesQuestionSnapshotIdPlural#)
@}
@if (!isEmpty(teacherOpenCourseQuestionLogAnswer)){
and t.teacher_open_course_question_log_answer =#teacherOpenCourseQuestionLogAnswer#
@}
@if (!isEmpty(teacherOpenCourseQuestionLogUploadFile)){
and t.teacher_open_course_question_log_upload_file =#teacherOpenCourseQuestionLogUploadFile#
@}
@if (!isEmpty(teacherOpenCourseQuestionLogAddTime)){
and t.teacher_open_course_question_log_add_time =#teacherOpenCourseQuestionLogAddTime#
@}
@if (isEmpty(teacherOpenCourseQuestionLogStatus) && isEmpty(teacherOpenCourseQuestionLogStatusPlural)){
and t.teacher_open_course_question_log_status != 2
@}else{
@if (!isEmpty(teacherOpenCourseQuestionLogStatus)){
and t.teacher_open_course_question_log_status =#teacherOpenCourseQuestionLogStatus#
@}else if(!isEmpty(teacherOpenCourseQuestionLogStatusPlural)){
and find_in_set(t.teacher_open_course_question_log_status,#teacherOpenCourseQuestionLogStatusPlural#)
@}
@}
@if (!isEmpty(studentId)){
and t.student_id =#studentId#
@}
@if (!isEmpty(studentIdPlural)){
and find_in_set(t.student_id,#studentIdPlural#)
@}
@if (!isEmpty(studentScore)){
and t.student_score =#studentScore#
@}
@if (!isEmpty(questionType)){
and t.question_type =#questionType#
@}
@if (!isEmpty(questionTypePlural)){
and find_in_set(t.question_type,#questionTypePlural#)
@}
@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(isTuck)){
and t.is_tuck =#isTuck#
@}
@if (!isEmpty(isErrorFavorite)){
and (t.is_error_favorite =#isErrorFavorite# or t.student_score != t.question_score)
@}
@if (!isEmpty(orgId)){
and t.org_id =#orgId#
@}
@if (!isEmpty(orgIdPlural)){
and find_in_set(t.org_id,#orgIdPlural#)
@}
@if (!isEmpty(userId)){
and t.user_id =#userId#
@}
@if (!isEmpty(userIdPlural)){
and find_in_set(t.user_id,#userIdPlural#)
@}
group by
t.student_id,
ta.student_sn,
ta.student_name,
t.teacher_open_course_question_setting_id
)tz
deleteTeacherOpenCourseQuestionLogByIds
===
* 批量删除(假删除)
update teacher_open_course_question_log set teacher_open_course_question_log_status = 2 where find_in_set(teacher_open_course_question_log_id,#ids#)
logicDeleteBySettingIds
===
* 根据题目配置ID批量删除( 假删除)
update teacher_open_course_question_log set teacher_open_course_question_log_status = 2 where find_in_set(teacher_open_course_question_setting_id, settingIds#)
deleteByIds
===
* 批量删除(真删除)
delete from teacher_open_course_question_log where find_in_set(teacher_open_course_question_log_id,#ids#)
deleteBySettingIds
===
* 根据题目配置ID 批量(真删除)
delete from teacher_open_course_question_log where find_in_set(teacher_open_course_question_setting_id, #settingIds #)
getByIds
===
select * from teacher_open_course_question_log where find_in_set(teacher_open_course_question_log_id,#ids#)
updateGivenByIds
===
* 批量更新指定字段,无论此字段是否有值
update teacher_open_course_question_log
set
@if (contain("teacherOpenCourseQuestionSettingId",_given)){
@if (isEmpty(teacherOpenCourseQuestionSettingId)){
teacher_open_course_question_setting_id = null ,
@}else{
teacher_open_course_question_setting_id = #teacherOpenCourseQuestionSettingId # ,
@}
@}
@if (contain("resourcesQuestionSnapshotId",_given)){
@if (isEmpty(resourcesQuestionSnapshotId)){
resources_question_snapshot_id = null ,
@}else{
resources_question_snapshot_id = #resourcesQuestionSnapshotId # ,
@}
@}
@if (contain("teacherOpenCourseQuestionLogAnswer",_given)){
@if (isEmpty(teacherOpenCourseQuestionLogAnswer)){
teacher_open_course_question_log_answer = null ,
@}else{
teacher_open_course_question_log_answer = #teacherOpenCourseQuestionLogAnswer # ,
@}
@}
@if (contain("teacherOpenCourseQuestionLogUploadFile",_given)){
@if (isEmpty(teacherOpenCourseQuestionLogUploadFile)){
teacher_open_course_question_log_upload_file = null ,
@}else{
teacher_open_course_question_log_upload_file = #teacherOpenCourseQuestionLogUploadFile # ,
@}
@}
@if (contain("teacherOpenCourseQuestionLogAddTime",_given)){
@if (isEmpty(teacherOpenCourseQuestionLogAddTime)){
teacher_open_course_question_log_add_time = null ,
@}else{
teacher_open_course_question_log_add_time = #teacherOpenCourseQuestionLogAddTime # ,
@}
@}
@if (contain("teacherOpenCourseQuestionLogStatus",_given)){
@if (isEmpty(teacherOpenCourseQuestionLogStatus)){
teacher_open_course_question_log_status = null ,
@}else{
teacher_open_course_question_log_status = #teacherOpenCourseQuestionLogStatus # ,
@}
@}
@if (contain("studentId",_given)){
@if (isEmpty(studentId)){
student_id = null ,
@}else{
student_id = #studentId # ,
@}
@}
@if (contain("isTuck",_given)){
@if (isEmpty(isTick)){
is_tuck = null ,
@}else{
is_tuck = #isTuck # ,
@}
@}
@if (contain("isErrorFavorite",_given)){
@if (isEmpty(isErrorFavorite)){
is_error_favorite = null ,
@}else{
is_error_favorite = #isErrorFavorite # ,
@}
@}
@if (contain("orgId",_given)){
@if (isEmpty(orgId)){
org_id = null ,
@}else{
org_id = #orgId # ,
@}
@}
@if (contain("userId",_given)){
@if (isEmpty(userId)){
user_id = null ,
@}else{
user_id = #userId # ,
@}
@}
teacher_open_course_question_log_id = teacher_open_course_question_log_id
where find_in_set(teacher_open_course_question_log_id,#teacherOpenCourseQuestionLogIdPlural#)
getTeacherOpenCourseQuestionLogValues
===
* 根据不为空的参数进行查询
select t.*
from teacher_open_course_question_log t
where 1=1
@if (!isEmpty(teacherOpenCourseQuestionLogId)){
and t.teacher_open_course_question_log_id =#teacherOpenCourseQuestionLogId#
@}
@if (!isEmpty(teacherOpenCourseQuestionSettingId)){
and t.teacher_open_course_question_setting_id =#teacherOpenCourseQuestionSettingId#
@}
@if (!isEmpty(resourcesQuestionSnapshotId)){
and t.resources_question_snapshot_id =#resourcesQuestionSnapshotId#
@}
@if (!isEmpty(teacherOpenCourseQuestionLogAnswer)){
and t.teacher_open_course_question_log_answer =#teacherOpenCourseQuestionLogAnswer#
@}
@if (!isEmpty(teacherOpenCourseQuestionLogUploadFile)){
and t.teacher_open_course_question_log_upload_file =#teacherOpenCourseQuestionLogUploadFile#
@}
@if (!isEmpty(teacherOpenCourseQuestionLogAddTime)){
and t.teacher_open_course_question_log_add_time =#teacherOpenCourseQuestionLogAddTime#
@}
@if (!isEmpty(teacherOpenCourseQuestionLogStatus)){
and t.teacher_open_course_question_log_status =#teacherOpenCourseQuestionLogStatus#
@}else{
and t.teacher_open_course_question_log_status != 2
@}
@if (!isEmpty(studentId)){
and t.student_id =#studentId#
@}
@if (!isEmpty(isTuck)){
and t.is_tuck =#isTuck#
@}
@if (!isEmpty(isErrorFavorite)){
and (t.is_error_favorite =#isErrorFavorite# or t.student_score != t.question_score)
@}
@if (!isEmpty(orgId)){
and t.org_id =#orgId#
@}
@if (!isEmpty(userId)){
and t.user_id =#userId#
@}
getValuesByQuery
===
* 根据不为空的参数进行查询
select t.*
from teacher_open_course_question_log t
where 1=1 and #function ("teacherOpenCourseQuestionLog.query")#
@if (!isEmpty(teacherOpenCourseQuestionLogId)){
and t.teacher_open_course_question_log_id =#teacherOpenCourseQuestionLogId#
@}
@if (!isEmpty(teacherOpenCourseQuestionLogIdPlural)){
and find_in_set(t.teacher_open_course_question_log_id,#teacherOpenCourseQuestionLogIdPlural#)
@}
@if (!isEmpty(teacherOpenCourseQuestionSettingId)){
and t.teacher_open_course_question_setting_id =#teacherOpenCourseQuestionSettingId#
@}
@if (!isEmpty(teacherOpenCourseQuestionSettingIdPlural)){
and find_in_set(t.teacher_open_course_question_setting_id,#teacherOpenCourseQuestionSettingIdPlural#)
@}
@if (!isEmpty(resourcesQuestionSnapshotId)){
and t.resources_question_snapshot_id =#resourcesQuestionSnapshotId#
@}
@if (!isEmpty(resourcesQuestionSnapshotIdPlural)){
and find_in_set(t.resources_question_snapshot_id,#resourcesQuestionSnapshotIdPlural#)
@}
@if (!isEmpty(teacherOpenCourseQuestionLogAnswer)){
and t.teacher_open_course_question_log_answer =#teacherOpenCourseQuestionLogAnswer#
@}
@if (!isEmpty(teacherOpenCourseQuestionLogUploadFile)){
and t.teacher_open_course_question_log_upload_file =#teacherOpenCourseQuestionLogUploadFile#
@}
@if (!isEmpty(teacherOpenCourseQuestionLogAddTime)){
and t.teacher_open_course_question_log_add_time =#teacherOpenCourseQuestionLogAddTime#
@}
@if (isEmpty(teacherOpenCourseQuestionLogStatus) && isEmpty(teacherOpenCourseQuestionLogStatusPlural)){
and t.teacher_open_course_question_log_status != 2
@}else{
@if (!isEmpty(teacherOpenCourseQuestionLogStatus)){
and t.teacher_open_course_question_log_status =#teacherOpenCourseQuestionLogStatus#
@}else if(!isEmpty(teacherOpenCourseQuestionLogStatusPlural)){
and find_in_set(t.teacher_open_course_question_log_status,#teacherOpenCourseQuestionLogStatusPlural#)
@}
@}
@if (!isEmpty(studentId)){
and t.student_id =#studentId#
@}
@if (!isEmpty(studentIdPlural)){
and find_in_set(t.student_id,#studentIdPlural#)
@}
@if (!isEmpty(isTuck)){
and t.is_tuck =#isTuck#
@}
@if (!isEmpty(isErrorFavorite)){
and (t.is_error_favorite =#isErrorFavorite# or t.student_score != t.question_score)
@}
@if (!isEmpty(orgId)){
and t.org_id =#orgId#
@}
@if (!isEmpty(orgIdPlural)){
and find_in_set(t.org_id,#orgIdPlural#)
@}
@if (!isEmpty(userId)){
and t.user_id =#userId#
@}
@if (!isEmpty(userIdPlural)){
and find_in_set(t.user_id,#userIdPlural#)
@}
getValuesByQueryNotWithPermission
===
* 根据不为空的参数进行查询
select t.*
from teacher_open_course_question_log t
where 1=1
@if (!isEmpty(teacherOpenCourseQuestionLogId)){
and t.teacher_open_course_question_log_id =#teacherOpenCourseQuestionLogId#
@}
@if (!isEmpty(teacherOpenCourseQuestionLogIdPlural)){
and find_in_set(t.teacher_open_course_question_log_id,#teacherOpenCourseQuestionLogIdPlural#)
@}
@if (!isEmpty(teacherOpenCourseQuestionSettingId)){
and t.teacher_open_course_question_setting_id =#teacherOpenCourseQuestionSettingId#
@}
@if (!isEmpty(teacherOpenCourseQuestionSettingIdPlural)){
and find_in_set(t.teacher_open_course_question_setting_id,#teacherOpenCourseQuestionSettingIdPlural#)
@}
@if (!isEmpty(resourcesQuestionSnapshotId)){
and t.resources_question_snapshot_id =#resourcesQuestionSnapshotId#
@}
@if (!isEmpty(resourcesQuestionSnapshotIdPlural)){
and find_in_set(t.resources_question_snapshot_id,#resourcesQuestionSnapshotIdPlural#)
@}
@if (!isEmpty(teacherOpenCourseQuestionLogAnswer)){
and t.teacher_open_course_question_log_answer =#teacherOpenCourseQuestionLogAnswer#
@}
@if (!isEmpty(teacherOpenCourseQuestionLogUploadFile)){
and t.teacher_open_course_question_log_upload_file =#teacherOpenCourseQuestionLogUploadFile#
@}
@if (!isEmpty(teacherOpenCourseQuestionLogAddTime)){
and t.teacher_open_course_question_log_add_time =#teacherOpenCourseQuestionLogAddTime#
@}
@if (isEmpty(teacherOpenCourseQuestionLogStatus) && isEmpty(teacherOpenCourseQuestionLogStatusPlural)){
and t.teacher_open_course_question_log_status != 2
@}else{
@if (!isEmpty(teacherOpenCourseQuestionLogStatus)){
and t.teacher_open_course_question_log_status =#teacherOpenCourseQuestionLogStatus#
@}else if(!isEmpty(teacherOpenCourseQuestionLogStatusPlural)){
and find_in_set(t.teacher_open_course_question_log_status,#teacherOpenCourseQuestionLogStatusPlural#)
@}
@}
@if (!isEmpty(studentId)){
and t.student_id =#studentId#
@}
@if (!isEmpty(studentIdPlural)){
and find_in_set(t.student_id,#studentIdPlural#)
@}
@if (!isEmpty(isTuck)){
and t.is_tuck =#isTuck#
@}
@if (!isEmpty(isErrorFavorite)){
and (t.is_error_favorite =#isErrorFavorite# or t.student_score != t.question_score)
@}
@if (!isEmpty(orgId)){
and t.org_id =#orgId#
@}
@if (!isEmpty(orgIdPlural)){
and find_in_set(t.org_id,#orgIdPlural#)
@}
@if (!isEmpty(userId)){
and t.user_id =#userId#
@}
@if (!isEmpty(userIdPlural)){
and find_in_set(t.user_id,#userIdPlural#)
@}