You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tianze-pro/web/src/main/resources/sql/jlw/teacherOpenCourseScheduleSe...

21 KiB

queryByCondition

  • 根据不为空的参数进行分页查询 select @pageTag(){ t.* @} from teacher_open_course_schedule_session t where 1=1
    @//数据权限该sql语句功能点,如果不考虑数据权限,可以删除此行
    and #function("teacherOpenCourseScheduleSession.query")# @if(!isEmpty(teacherOpenCourseScheduleSessionId)){ and t.teacher_open_course_schedule_session_id =#teacherOpenCourseScheduleSessionId# @} @if(!isEmpty(teacherOpenCourseScheduleSessionIdPlural)){ and find_in_set(t.teacher_open_course_schedule_session_id,#teacherOpenCourseScheduleSessionIdPlural#) @} @if(!isEmpty(teacherOpenCourseScheduleSessionDayTime)){ and t.teacher_open_course_schedule_session_day_time =#teacherOpenCourseScheduleSessionDayTime# @} @if(!isEmpty(teacherOpenCourseScheduleSessionAddTime)){ and t.teacher_open_course_schedule_session_add_time =#teacherOpenCourseScheduleSessionAddTime# @} @if(isEmpty(teacherOpenCourseScheduleSessionStatus) && isEmpty(teacherOpenCourseScheduleSessionStatusPlural)){ and t.teacher_open_course_schedule_session_status != 2 @}else{ @if(!isEmpty(teacherOpenCourseScheduleSessionStatus)){ and t.teacher_open_course_schedule_session_status =#teacherOpenCourseScheduleSessionStatus# @}else if(!isEmpty(teacherOpenCourseScheduleSessionStatusPlural)){ and find_in_set(t.teacher_open_course_schedule_session_status,#teacherOpenCourseScheduleSessionStatusPlural#) @} @} @if(!isEmpty(teacherOpenCourseId)){ and t.teacher_open_course_id =#teacherOpenCourseId# @} @if(!isEmpty(teacherOpenCourseIdPlural)){ and find_in_set(t.teacher_open_course_id,#teacherOpenCourseIdPlural#) @} @if(!isEmpty(teacherId)){ and t.teacher_id =#teacherId# @} @if(!isEmpty(teacherIdPlural)){ and find_in_set(t.teacher_id,#teacherIdPlural#) @} @if(!isEmpty(schoolClassIds)){ and t.school_class_Ids =#schoolClassIds# @} @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#) @} @if(!isEmpty(teacherOpenCourseScheduleSessionTagName)){ and t.teacher_open_course_schedule_session_tag_name =#teacherOpenCourseScheduleSessionTagName# @} @if(!isEmpty(teacherOpenCourseScheduleSessionTagDuration)){ and t.teacher_open_course_schedule_session_tag_duration =#teacherOpenCourseScheduleSessionTagDuration# @} @if(!isEmpty(teacherOpenCourseScheduleSessionTagStartTime)){ and t.teacher_open_course_schedule_session_tag_start_time =#teacherOpenCourseScheduleSessionTagStartTime# @} @if(!isEmpty(teacherOpenCourseScheduleSessionTagEndTime)){ and t.teacher_open_course_schedule_session_tag_end_time =#teacherOpenCourseScheduleSessionTagEndTime# @} @if(!isEmpty(teacherOpenCourseScheduleSessionStartDate)){ and t.teacher_open_course_schedule_session_start_date =#teacherOpenCourseScheduleSessionStartDate# @} @if(!isEmpty(teacherOpenCourseScheduleSessionEndDate)){ and t.teacher_open_course_schedule_session_end_date =#teacherOpenCourseScheduleSessionEndDate# @} @if(!isEmpty(teacherOpenCourseScheduleSessionWeekNum)){ and t.teacher_open_course_schedule_session_week_num =#teacherOpenCourseScheduleSessionWeekNum# @}

queryByConditionGroup

  • 根据不为空的参数进行分页查询 select @pageTag(){ tz.* @} from ( select t.teacher_open_course_schedule_session_id, t.teacher_open_course_schedule_session_add_time, t.teacher_open_course_schedule_session_status, GROUP_CONCAT(DISTINCT teacher_open_course_schedule_session_class_name) AS teacher_open_course_schedule_session_class_name, t.teacher_open_course_id, t.teacher_id, t.school_class_ids, t.org_id, t.user_id from teacher_open_course_schedule_session t where 1=1
    @//数据权限该sql语句功能点,如果不考虑数据权限,可以删除此行
    and #function("teacherOpenCourseScheduleSession.query")# @if(!isEmpty(teacherOpenCourseScheduleSessionId)){ and t.teacher_open_course_schedule_session_id =#teacherOpenCourseScheduleSessionId# @} @if(!isEmpty(teacherOpenCourseScheduleSessionIdPlural)){ and find_in_set(t.teacher_open_course_schedule_session_id,#teacherOpenCourseScheduleSessionIdPlural#) @} @if(!isEmpty(teacherOpenCourseScheduleSessionDayTime)){ and t.teacher_open_course_schedule_session_day_time =#teacherOpenCourseScheduleSessionDayTime# @} @if(!isEmpty(teacherOpenCourseScheduleSessionAddTime)){ and t.teacher_open_course_schedule_session_add_time =#teacherOpenCourseScheduleSessionAddTime# @} @if(isEmpty(teacherOpenCourseScheduleSessionStatus) && isEmpty(teacherOpenCourseScheduleSessionStatusPlural)){ and t.teacher_open_course_schedule_session_status != 2 @}else{ @if(!isEmpty(teacherOpenCourseScheduleSessionStatus)){ and t.teacher_open_course_schedule_session_status =#teacherOpenCourseScheduleSessionStatus# @}else if(!isEmpty(teacherOpenCourseScheduleSessionStatusPlural)){ and find_in_set(t.teacher_open_course_schedule_session_status,#teacherOpenCourseScheduleSessionStatusPlural#) @} @} @if(!isEmpty(teacherOpenCourseId)){ and t.teacher_open_course_id =#teacherOpenCourseId# @} @if(!isEmpty(teacherOpenCourseIdPlural)){ and find_in_set(t.teacher_open_course_id,#teacherOpenCourseIdPlural#) @} @if(!isEmpty(teacherId)){ and t.teacher_id =#teacherId# @} @if(!isEmpty(teacherIdPlural)){ and find_in_set(t.teacher_id,#teacherIdPlural#) @} @if(!isEmpty(schoolClassIds)){ and t.school_class_Ids =#schoolClassIds# @} @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#) @} @if(!isEmpty(teacherOpenCourseScheduleSessionTagName)){ and t.teacher_open_course_schedule_session_tag_name =#teacherOpenCourseScheduleSessionTagName# @} @if(!isEmpty(teacherOpenCourseScheduleSessionTagDuration)){ and t.teacher_open_course_schedule_session_tag_duration =#teacherOpenCourseScheduleSessionTagDuration# @} @if(!isEmpty(teacherOpenCourseScheduleSessionTagStartTime)){ and t.teacher_open_course_schedule_session_tag_start_time =#teacherOpenCourseScheduleSessionTagStartTime# @} @if(!isEmpty(teacherOpenCourseScheduleSessionTagEndTime)){ and t.teacher_open_course_schedule_session_tag_end_time =#teacherOpenCourseScheduleSessionTagEndTime# @} @if(!isEmpty(teacherOpenCourseScheduleSessionStartDate)){ and t.teacher_open_course_schedule_session_start_date =#teacherOpenCourseScheduleSessionStartDate# @} @if(!isEmpty(teacherOpenCourseScheduleSessionEndDate)){ and t.teacher_open_course_schedule_session_end_date =#teacherOpenCourseScheduleSessionEndDate# @} @if(!isEmpty(teacherOpenCourseScheduleSessionWeekNum)){ and t.teacher_open_course_schedule_session_week_num =#teacherOpenCourseScheduleSessionWeekNum# @} group by t.teacher_open_course_schedule_session_status, t.teacher_id, t.teacher_open_course_id ) tz

queryByConditionQuery

  • 根据不为空的参数进行分页查询(无权限) select @pageTag(){ t.* @} from teacher_open_course_schedule_session t where 1=1
    @if(!isEmpty(teacherOpenCourseScheduleSessionId)){ and t.teacher_open_course_schedule_session_id =#teacherOpenCourseScheduleSessionId# @} @if(!isEmpty(teacherOpenCourseScheduleSessionIdPlural)){ and find_in_set(t.teacher_open_course_schedule_session_id,#teacherOpenCourseScheduleSessionIdPlural#) @} @if(!isEmpty(teacherOpenCourseScheduleSessionDayTime)){ and t.teacher_open_course_schedule_session_day_time =#teacherOpenCourseScheduleSessionDayTime# @} @if(!isEmpty(teacherOpenCourseScheduleSessionAddTime)){ and t.teacher_open_course_schedule_session_add_time =#teacherOpenCourseScheduleSessionAddTime# @} @if(isEmpty(teacherOpenCourseScheduleSessionStatus) && isEmpty(teacherOpenCourseScheduleSessionStatusPlural)){ and t.teacher_open_course_schedule_session_status != 2 @}else{ @if(!isEmpty(teacherOpenCourseScheduleSessionStatus)){ and t.teacher_open_course_schedule_session_status =#teacherOpenCourseScheduleSessionStatus# @}else if(!isEmpty(teacherOpenCourseScheduleSessionStatusPlural)){ and find_in_set(t.teacher_open_course_schedule_session_status,#teacherOpenCourseScheduleSessionStatusPlural#) @} @} @if(!isEmpty(teacherOpenCourseId)){ and t.teacher_open_course_id =#teacherOpenCourseId# @} @if(!isEmpty(teacherOpenCourseIdPlural)){ and find_in_set(t.teacher_open_course_id,#teacherOpenCourseIdPlural#) @} @if(!isEmpty(teacherId)){ and t.teacher_id =#teacherId# @} @if(!isEmpty(teacherIdPlural)){ and find_in_set(t.teacher_id,#teacherIdPlural#) @} @if(!isEmpty(schoolClassIds)){ and t.school_class_Ids =#schoolClassIds# @} @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#) @} @if(!isEmpty(teacherOpenCourseScheduleSessionTagName)){ and t.teacher_open_course_schedule_session_tag_name =#teacherOpenCourseScheduleSessionTagName# @} @if(!isEmpty(teacherOpenCourseScheduleSessionTagDuration)){ and t.teacher_open_course_schedule_session_tag_duration =#teacherOpenCourseScheduleSessionTagDuration# @} @if(!isEmpty(teacherOpenCourseScheduleSessionTagStartTime)){ and t.teacher_open_course_schedule_session_tag_start_time =#teacherOpenCourseScheduleSessionTagStartTime# @} @if(!isEmpty(teacherOpenCourseScheduleSessionTagEndTime)){ and t.teacher_open_course_schedule_session_tag_end_time =#teacherOpenCourseScheduleSessionTagEndTime# @} @if(!isEmpty(teacherOpenCourseScheduleSessionStartDate)){ and t.teacher_open_course_schedule_session_start_date =#teacherOpenCourseScheduleSessionStartDate# @} @if(!isEmpty(teacherOpenCourseScheduleSessionEndDate)){ and t.teacher_open_course_schedule_session_end_date =#teacherOpenCourseScheduleSessionEndDate# @} @if(!isEmpty(teacherOpenCourseScheduleSessionWeekNum)){ and t.teacher_open_course_schedule_session_week_num =#teacherOpenCourseScheduleSessionWeekNum# @}

deleteTeacherOpenCourseScheduleSessionByIds

  • 批量删除(假删除) update teacher_open_course_schedule_session set teacher_open_course_schedule_session_status = 2 where find_in_set(teacher_open_course_schedule_session_id,#ids#)

deleteByIds

  • 批量删除(真删除)

    delete from teacher_open_course_schedule_session where find_in_set(teacher_open_course_schedule_session_id,#ids#)

getByIds

select * from teacher_open_course_schedule_session where find_in_set(teacher_open_course_schedule_session_id,#ids#) updateGivenByIds

  • 批量更新指定字段,无论此字段是否有值 update teacher_open_course_schedule_session set @if(contain("teacherOpenCourseScheduleSessionDayTime",_given)){ @if(isEmpty(teacherOpenCourseScheduleSessionDayTime)){ teacher_open_course_schedule_session_day_time = null , @}else{ teacher_open_course_schedule_session_day_time = #teacherOpenCourseScheduleSessionDayTime# , @} @} @if(contain("teacherOpenCourseScheduleSessionAddTime",_given)){ @if(isEmpty(teacherOpenCourseScheduleSessionAddTime)){ teacher_open_course_schedule_session_add_time = null , @}else{ teacher_open_course_schedule_session_add_time = #teacherOpenCourseScheduleSessionAddTime# , @} @} @if(contain("teacherOpenCourseScheduleSessionStatus",_given)){ @if(isEmpty(teacherOpenCourseScheduleSessionStatus)){ teacher_open_course_schedule_session_status = null , @}else{ teacher_open_course_schedule_session_status = #teacherOpenCourseScheduleSessionStatus# , @} @} @if(contain("teacherOpenCourseId",_given)){ @if(isEmpty(teacherOpenCourseId)){ teacher_open_course_id = null , @}else{ teacher_open_course_id = #teacherOpenCourseId# , @} @} @if(contain("teacherId",_given)){ @if(isEmpty(teacherId)){ teacher_id = null , @}else{ teacher_id = #teacherId# , @} @} @if(contain("schoolClassIds",_given)){ @if(isEmpty(schoolClassIds)){ school_class_Ids = null , @}else{ school_class_Ids = #schoolClassIds# , @} @} @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# , @} @} @if(contain("teacherOpenCourseScheduleSessionTagName",_given)){ @if(isEmpty(teacherOpenCourseScheduleSessionTagName)){ teacher_open_course_schedule_session_tag_name = null , @}else{ teacher_open_course_schedule_session_tag_name = #teacherOpenCourseScheduleSessionTagName# , @} @} @if(contain("teacherOpenCourseScheduleSessionTagDuration",_given)){ @if(isEmpty(teacherOpenCourseScheduleSessionTagDuration)){ teacher_open_course_schedule_session_tag_duration = null , @}else{ teacher_open_course_schedule_session_tag_duration = #teacherOpenCourseScheduleSessionTagDuration# , @} @} @if(contain("teacherOpenCourseScheduleSessionTagStartTime",_given)){ @if(isEmpty(teacherOpenCourseScheduleSessionTagStartTime)){ teacher_open_course_schedule_session_tag_start_time = null , @}else{ teacher_open_course_schedule_session_tag_start_time = #teacherOpenCourseScheduleSessionTagStartTime# , @} @} @if(contain("teacherOpenCourseScheduleSessionTagEndTime",_given)){ @if(isEmpty(teacherOpenCourseScheduleSessionTagEndTime)){ teacher_open_course_schedule_session_tag_end_time = null , @}else{ teacher_open_course_schedule_session_tag_end_time = #teacherOpenCourseScheduleSessionTagEndTime# , @} @} @if(contain("teacherOpenCourseScheduleSessionStartDate",_given)){ @if(isEmpty(teacherOpenCourseScheduleSessionStartDate)){ teacher_open_course_schedule_session_start_date = null , @}else{ teacher_open_course_schedule_session_start_date = #teacherOpenCourseScheduleSessionStartDate# , @} @} @if(contain("teacherOpenCourseScheduleSessionEndDate",_given)){ @if(isEmpty(teacherOpenCourseScheduleSessionEndDate)){ teacher_open_course_schedule_session_end_date = null , @}else{ teacher_open_course_schedule_session_end_date = #teacherOpenCourseScheduleSessionEndDate# , @} @} @if(contain("teacherOpenCourseScheduleSessionWeekNum",_given)){ @if(isEmpty(teacherOpenCourseScheduleSessionWeekNum)){ teacher_open_course_schedule_session_week_num = null , @}else{ teacher_open_course_schedule_session_week_num = #teacherOpenCourseScheduleSessionWeekNum# , @} @} teacher_open_course_schedule_session_id = teacher_open_course_schedule_session_id where find_in_set(teacher_open_course_schedule_session_id,#teacherOpenCourseScheduleSessionIdPlural#)

getTeacherOpenCourseScheduleSessionValues

  • 根据不为空的参数进行查询 select t.* from teacher_open_course_schedule_session t where 1=1
    @if(!isEmpty(teacherOpenCourseScheduleSessionId)){ and t.teacher_open_course_schedule_session_id =#teacherOpenCourseScheduleSessionId# @} @if(!isEmpty(teacherOpenCourseScheduleSessionDayTime)){ and t.teacher_open_course_schedule_session_day_time =#teacherOpenCourseScheduleSessionDayTime# @} @if(!isEmpty(teacherOpenCourseScheduleSessionAddTime)){ and t.teacher_open_course_schedule_session_add_time =#teacherOpenCourseScheduleSessionAddTime# @} @if(!isEmpty(teacherOpenCourseScheduleSessionStatus)){ and t.teacher_open_course_schedule_session_status =#teacherOpenCourseScheduleSessionStatus# @}else{ and t.teacher_open_course_schedule_session_status != 2 @} @if(!isEmpty(teacherOpenCourseId)){ and t.teacher_open_course_id =#teacherOpenCourseId# @} @if(!isEmpty(teacherId)){ and t.teacher_id =#teacherId# @} @if(!isEmpty(schoolClassIds)){ and t.school_class_Ids =#schoolClassIds# @} @if(!isEmpty(orgId)){ and t.org_id =#orgId# @} @if(!isEmpty(userId)){ and t.user_id =#userId# @} @if(!isEmpty(teacherOpenCourseScheduleSessionTagName)){ and t.teacher_open_course_schedule_session_tag_name =#teacherOpenCourseScheduleSessionTagName# @} @if(!isEmpty(teacherOpenCourseScheduleSessionTagDuration)){ and t.teacher_open_course_schedule_session_tag_duration =#teacherOpenCourseScheduleSessionTagDuration# @} @if(!isEmpty(teacherOpenCourseScheduleSessionTagStartTime)){ and t.teacher_open_course_schedule_session_tag_start_time =#teacherOpenCourseScheduleSessionTagStartTime# @} @if(!isEmpty(teacherOpenCourseScheduleSessionTagEndTime)){ and t.teacher_open_course_schedule_session_tag_end_time =#teacherOpenCourseScheduleSessionTagEndTime# @} @if(!isEmpty(teacherOpenCourseScheduleSessionStartDate)){ and t.teacher_open_course_schedule_session_start_date =#teacherOpenCourseScheduleSessionStartDate# @} @if(!isEmpty(teacherOpenCourseScheduleSessionEndDate)){ and t.teacher_open_course_schedule_session_end_date =#teacherOpenCourseScheduleSessionEndDate# @} @if(!isEmpty(teacherOpenCourseScheduleSessionWeekNum)){ and t.teacher_open_course_schedule_session_week_num =#teacherOpenCourseScheduleSessionWeekNum# @}

getValuesByQuery

  • 根据不为空的参数进行查询 select t.* from teacher_open_course_schedule_session t where 1=1 and #function("teacherOpenCourseScheduleSession.query")# @if(!isEmpty(teacherOpenCourseScheduleSessionId)){ and t.teacher_open_course_schedule_session_id =#teacherOpenCourseScheduleSessionId# @} @if(!isEmpty(teacherOpenCourseScheduleSessionIdPlural)){ and find_in_set(t.teacher_open_course_schedule_session_id,#teacherOpenCourseScheduleSessionIdPlural#) @} @if(!isEmpty(teacherOpenCourseScheduleSessionDayTime)){ and t.teacher_open_course_schedule_session_day_time =#teacherOpenCourseScheduleSessionDayTime# @} @if(!isEmpty(teacherOpenCourseScheduleSessionAddTime)){ and t.teacher_open_course_schedule_session_add_time =#teacherOpenCourseScheduleSessionAddTime# @} @if(isEmpty(teacherOpenCourseScheduleSessionStatus) && isEmpty(teacherOpenCourseScheduleSessionStatusPlural)){ and t.teacher_open_course_schedule_session_status != 2 @}else{ @if(!isEmpty(teacherOpenCourseScheduleSessionStatus)){ and t.teacher_open_course_schedule_session_status =#teacherOpenCourseScheduleSessionStatus# @}else if(!isEmpty(teacherOpenCourseScheduleSessionStatusPlural)){ and find_in_set(t.teacher_open_course_schedule_session_status,#teacherOpenCourseScheduleSessionStatusPlural#) @} @} @if(!isEmpty(teacherOpenCourseId)){ and t.teacher_open_course_id =#teacherOpenCourseId# @} @if(!isEmpty(teacherOpenCourseIdPlural)){ and find_in_set(t.teacher_open_course_id,#teacherOpenCourseIdPlural#) @} @if(!isEmpty(teacherId)){ and t.teacher_id =#teacherId# @} @if(!isEmpty(teacherIdPlural)){ and find_in_set(t.teacher_id,#teacherIdPlural#) @} @if(!isEmpty(schoolClassIds)){ and t.school_class_Ids =#schoolClassIds# @} @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#) @} @if(!isEmpty(teacherOpenCourseScheduleSessionTagName)){ and t.teacher_open_course_schedule_session_tag_name =#teacherOpenCourseScheduleSessionTagName# @} @if(!isEmpty(teacherOpenCourseScheduleSessionTagDuration)){ and t.teacher_open_course_schedule_session_tag_duration =#teacherOpenCourseScheduleSessionTagDuration# @} @if(!isEmpty(teacherOpenCourseScheduleSessionTagStartTime)){ and t.teacher_open_course_schedule_session_tag_start_time =#teacherOpenCourseScheduleSessionTagStartTime# @} @if(!isEmpty(teacherOpenCourseScheduleSessionTagEndTime)){ and t.teacher_open_course_schedule_session_tag_end_time =#teacherOpenCourseScheduleSessionTagEndTime# @} @if(!isEmpty(teacherOpenCourseScheduleSessionStartDate)){ and t.teacher_open_course_schedule_session_start_date =#teacherOpenCourseScheduleSessionStartDate# @} @if(!isEmpty(teacherOpenCourseScheduleSessionEndDate)){ and t.teacher_open_course_schedule_session_end_date =#teacherOpenCourseScheduleSessionEndDate# @} @if(!isEmpty(teacherOpenCourseScheduleSessionWeekNum)){ and t.teacher_open_course_schedule_session_week_num =#teacherOpenCourseScheduleSessionWeekNum# @}