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/teacherOpenCourseHandsOn.md

10 KiB

queryByCondition

  • 根据不为空的参数进行分页查询

    select @pageTag(){ t.* @} from teacher_open_course_hands_on t where 1=1
    @//数据权限该sql语句功能点,如果不考虑数据权限,可以删除此行
    and #function("teacherOpenCourseHandsOn.query")# @if(!isEmpty(handsOnId)){ and t.hands_on_id =#handsOnId# @} @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(courseInfoId)){ and t.course_info_id =#courseInfoId# @} @if(!isEmpty(courseChildNode)){ and t.course_child_node =#courseChildNode# @} @if(!isEmpty(handsOnName)){ and t.hands_on_name =#handsOnName# @} @if(!isEmpty(handsOnRecommend)){ and t.hands_on_recommend =#handsOnRecommend# @} @if(!isEmpty(addTime)){ and t.add_time =#addTime# @} @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(trainingData)){ and t.training_data =#trainingData# @}

queryByConditionQuery

  • 根据不为空的参数进行分页查询(无权限)

    select @pageTag(){ t.* @} from teacher_open_course_hands_on t where 1=1
    @if(!isEmpty(handsOnId)){ and t.hands_on_id =#handsOnId# @} @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(courseInfoId)){ and t.course_info_id =#courseInfoId# @} @if(!isEmpty(courseChildNode)){ and t.course_child_node =#courseChildNode# @} @if(!isEmpty(handsOnName)){ and t.hands_on_name =#handsOnName# @} @if(!isEmpty(handsOnRecommend)){ and t.hands_on_recommend =#handsOnRecommend# @} @if(!isEmpty(addTime)){ and t.add_time =#addTime# @} @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(trainingData)){ and t.training_data =#trainingData# @}

deleteTeacherOpenCourseHandsOnByIds

  • 批量删除

    delete from teacher_open_course_hands_on where find_in_set(hands_on_id,#ids#)

getByIds

select * from teacher_open_course_hands_on where find_in_set(hands_on_id,#ids#)

updateGivenByIds

  • 批量更新指定字段,无论此字段是否有值

    update teacher_open_course_hands_on set @if(contain("teacherOpenCourseId",_given)){ @if(isEmpty(teacherOpenCourseId)){ teacher_open_course_id = null , @}else{ teacher_open_course_id = #teacherOpenCourseId# , @} @} @if(contain("courseInfoId",_given)){ @if(isEmpty(courseInfoId)){ course_info_id = null , @}else{ course_info_id = #courseInfoId# , @} @} @if(contain("courseChildNode",_given)){ @if(isEmpty(courseChildNode)){ course_child_node = null , @}else{ course_child_node = #courseChildNode# , @} @} @if(contain("handsOnName",_given)){ @if(isEmpty(handsOnName)){ hands_on_name = null , @}else{ hands_on_name = #handsOnName# , @} @} @if(contain("handsOnRecommend",_given)){ @if(isEmpty(handsOnRecommend)){ hands_on_recommend = null , @}else{ hands_on_recommend = #handsOnRecommend# , @} @} @if(contain("addTime",_given)){ @if(isEmpty(addTime)){ add_time = null , @}else{ add_time = #addTime# , @} @} @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("trainingData",_given)){ @if(isEmpty(trainingData)){ training_data = null , @}else{ training_data = #trainingData# , @} @} hands_on_id = hands_on_id where find_in_set(hands_on_id,#handsOnIdPlural#)

getTeacherOpenCourseHandsOnValues

  • 根据不为空的参数进行查询

    select t.* from teacher_open_course_hands_on t where 1=1
    @if(!isEmpty(handsOnId)){ and t.hands_on_id =#handsOnId# @} @if(!isEmpty(teacherOpenCourseId)){ and t.teacher_open_course_id =#teacherOpenCourseId# @} @if(!isEmpty(courseInfoId)){ and t.course_info_id =#courseInfoId# @} @if(!isEmpty(courseChildNode)){ and t.course_child_node =#courseChildNode# @} @if(!isEmpty(handsOnName)){ and t.hands_on_name =#handsOnName# @} @if(!isEmpty(handsOnRecommend)){ and t.hands_on_recommend =#handsOnRecommend# @} @if(!isEmpty(addTime)){ and t.add_time =#addTime# @} @if(!isEmpty(orgId)){ and t.org_id =#orgId# @} @if(!isEmpty(userId)){ and t.user_id =#userId# @} @if(!isEmpty(trainingData)){ and t.training_data =#trainingData# @}

getValuesByQuery

  • 根据不为空的参数进行查询

    select t.* from teacher_open_course_hands_on t where 1=1 and #function("teacherOpenCourseHandsOn.query")# @if(!isEmpty(handsOnId)){ and t.hands_on_id =#handsOnId# @} @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(courseInfoId)){ and t.course_info_id =#courseInfoId# @} @if(!isEmpty(courseChildNode)){ and t.course_child_node =#courseChildNode# @} @if(!isEmpty(handsOnName)){ and t.hands_on_name =#handsOnName# @} @if(!isEmpty(handsOnRecommend)){ and t.hands_on_recommend =#handsOnRecommend# @} @if(!isEmpty(addTime)){ and t.add_time =#addTime# @} @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(trainingData)){ and t.training_data =#trainingData# @}

getValuesByQueryNotWithPermission

  • 根据不为空的参数进行查询(不包含权限)

    select t.* from teacher_open_course_hands_on t where 1=1 @if(!isEmpty(handsOnId)){ and t.hands_on_id =#handsOnId# @} @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(courseInfoId)){ and t.course_info_id =#courseInfoId# @} @if(!isEmpty(courseChildNode)){ and t.course_child_node =#courseChildNode# @} @if(!isEmpty(handsOnName)){ and t.hands_on_name =#handsOnName# @} @if(!isEmpty(handsOnRecommend)){ and t.hands_on_recommend =#handsOnRecommend# @} @if(!isEmpty(addTime)){ and t.add_time =#addTime# @} @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(trainingData)){ and t.training_data =#trainingData# @}

getHandsOnList

  • 查询参数

    select @pageTag(){ t.* @} from teacher_open_course_hands_on t where t.teacher_open_course_id =#teacherOpenCourseId#

getExcelValues

  • 根据不为空的参数进行查询导入需要的参数 SELECT * FROM ( ( select MAX(LENGTH(t.teacher_open_course_id)) teacher_open_course_id, MAX(LENGTH(t.course_info_id)) course_info_id, MAX(LENGTH(t.course_child_node)) course_child_node, MAX(LENGTH(t.hands_on_name)) hands_on_name, MAX(LENGTH(t.hands_on_recommend)) hands_on_recommend, MAX(LENGTH(t.add_time)) add_time, MAX(LENGTH(t.training_data)) training_data from teacher_open_course_hands_on t where 1=1 and #function("teacherOpenCourseHandsOn.query")# @if(!isEmpty(handsOnId)){ and t.hands_on_id =#handsOnId# @} @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(courseInfoId)){ and t.course_info_id =#courseInfoId# @} @if(!isEmpty(courseChildNode)){ and t.course_child_node =#courseChildNode# @} @if(!isEmpty(handsOnName)){ and t.hands_on_name =#handsOnName# @} @if(!isEmpty(handsOnRecommend)){ and t.hands_on_recommend =#handsOnRecommend# @} @if(!isEmpty(addTime)){ and t.add_time =#addTime# @} @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(trainingData)){ and t.training_data =#trainingData# @} ) UNION ALL ( select t.teacher_open_course_id , t.course_info_id , t.course_child_node , t.hands_on_name , t.hands_on_recommend , t.add_time , t.training_data from teacher_open_course_hands_on t where 1=1 and #function("teacherOpenCourseHandsOn.query")#
    @if(!isEmpty(handsOnId)){ and t.hands_on_id =#handsOnId# @} @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(courseInfoId)){ and t.course_info_id =#courseInfoId# @} @if(!isEmpty(courseChildNode)){ and t.course_child_node =#courseChildNode# @} @if(!isEmpty(handsOnName)){ and t.hands_on_name =#handsOnName# @} @if(!isEmpty(handsOnRecommend)){ and t.hands_on_recommend =#handsOnRecommend# @} @if(!isEmpty(addTime)){ and t.add_time =#addTime# @} @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(trainingData)){ and t.training_data =#trainingData# @} ) )t