9.4 KiB
queryByCondition
-
根据不为空的参数进行分页查询
select @pageTag(){ t.* @} from hands_on_simulation_tasks t where 1=1
@//数据权限,该sql语句功能点,如果不考虑数据权限,可以删除此行
and #function("handsOnSimulationTasks.query")# @if(!isEmpty(taskId)){ and t.task_id =#taskId# @} @if(!isEmpty(taskIdPlural)){ and find_in_set(t.task_id,#taskIdPlural#) @} @if(!isEmpty(handsOnId)){ and t.hands_on_id =#handsOnId# @} @if(!isEmpty(handsOnIdPlural)){ and find_in_set(t.hands_on_id,#handsOnIdPlural#) @} @if(!isEmpty(taskType)){ and t.task_type =#taskType# @} @if(!isEmpty(taskTitle)){ and t.task_title =#taskTitle# @} @if(!isEmpty(taskScore)){ and t.task_score =#taskScore# @} @if(!isEmpty(taskOrder)){ and t.task_order =#taskOrder# @} @if(!isEmpty(taskStatus)){ and t.task_status =#taskStatus# @} @if(!isEmpty(assessmentRequirements)){ and t.assessment_requirements =#assessmentRequirements# @} @if(!isEmpty(assessmentTime)){ and t.assessment_time =#assessmentTime# @} @if(!isEmpty(assessmentContent)){ and t.assessment_content =#assessmentContent# @} @if(!isEmpty(fileUrl)){ and t.file_url =#fileUrl# @} @if(!isEmpty(taskList)){ and t.task_list =#taskList# @} @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(addTime)){ and t.add_time =#addTime# @}
queryByConditionQuery
-
根据不为空的参数进行分页查询(无权限)
select @pageTag(){ t.* @} from hands_on_simulation_tasks t where 1=1
@if(!isEmpty(taskId)){ and t.task_id =#taskId# @} @if(!isEmpty(taskIdPlural)){ and find_in_set(t.task_id,#taskIdPlural#) @} @if(!isEmpty(handsOnId)){ and t.hands_on_id =#handsOnId# @} @if(!isEmpty(handsOnIdPlural)){ and find_in_set(t.hands_on_id,#handsOnIdPlural#) @} @if(!isEmpty(taskType)){ and t.task_type =#taskType# @} @if(!isEmpty(taskTitle)){ and t.task_title =#taskTitle# @} @if(!isEmpty(taskScore)){ and t.task_score =#taskScore# @} @if(!isEmpty(taskOrder)){ and t.task_order =#taskOrder# @} @if(!isEmpty(taskStatus)){ and t.task_status =#taskStatus# @} @if(!isEmpty(assessmentRequirements)){ and t.assessment_requirements =#assessmentRequirements# @} @if(!isEmpty(assessmentTime)){ and t.assessment_time =#assessmentTime# @} @if(!isEmpty(assessmentContent)){ and t.assessment_content =#assessmentContent# @} @if(!isEmpty(fileUrl)){ and t.file_url =#fileUrl# @} @if(!isEmpty(taskList)){ and t.task_list =#taskList# @} @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(addTime)){ and t.add_time =#addTime# @}
deleteHandsOnSimulationTasksByIds
-
批量删除
delete from hands_on_simulation_tasks where find_in_set(task_id,#ids#)
getByIds
select * from hands_on_simulation_tasks where find_in_set(task_id,#ids#)
updateGivenByIds
-
批量更新指定字段,无论此字段是否有值
update hands_on_simulation_tasks set @if(contain("handsOnId",_given)){ @if(isEmpty(handsOnId)){ hands_on_id = null , @}else{ hands_on_id = #handsOnId# , @} @} @if(contain("taskType",_given)){ @if(isEmpty(taskType)){ task_type = null , @}else{ task_type = #taskType# , @} @} @if(contain("taskTitle",_given)){ @if(isEmpty(taskTitle)){ task_title = null , @}else{ task_title = #taskTitle# , @} @} @if(contain("taskScore",_given)){ @if(isEmpty(taskScore)){ task_score = null , @}else{ task_score = #taskScore# , @} @} @if(contain("taskOrder",_given)){ @if(isEmpty(taskOrder)){ task_order = null , @}else{ task_order = #taskOrder# , @} @} @if(contain("taskStatus",_given)){ @if(isEmpty(taskStatus)){ task_status = null , @}else{ task_status = #taskStatus# , @} @} @if(contain("assessmentRequirements",_given)){ @if(isEmpty(assessmentRequirements)){ assessment_requirements = null , @}else{ assessment_requirements = #assessmentRequirements# , @} @} @if(contain("assessmentTime",_given)){ @if(isEmpty(assessmentTime)){ assessment_time = null , @}else{ assessment_time = #assessmentTime# , @} @} @if(contain("assessmentContent",_given)){ @if(isEmpty(assessmentContent)){ assessment_content = null , @}else{ assessment_content = #assessmentContent# , @} @} @if(contain("fileUrl",_given)){ @if(isEmpty(fileUrl)){ file_url = null , @}else{ file_url = #fileUrl# , @} @} @if(contain("taskList",_given)){ @if(isEmpty(taskList)){ task_list = null , @}else{ tas_list = #taskList# , @} @} @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("addTime",_given)){ @if(isEmpty(addTime)){ add_time = null , @}else{ add_time = #addTime# , @} @} task_id = task_id where find_in_set(task_id,#taskIdPlural#)
getHandsOnSimulationTasksValues
-
根据不为空的参数进行查询
select t.* from hands_on_simulation_tasks t where 1=1
@if(!isEmpty(taskId)){ and t.task_id =#taskId# @} @if(!isEmpty(handsOnId)){ and t.hands_on_id =#handsOnId# @} @if(!isEmpty(taskType)){ and t.task_type =#taskType# @} @if(!isEmpty(taskTitle)){ and t.task_title =#taskTitle# @} @if(!isEmpty(taskScore)){ and t.task_score =#taskScore# @} @if(!isEmpty(taskOrder)){ and t.task_order =#taskOrder# @} @if(!isEmpty(taskStatus)){ and t.task_status =#taskStatus# @} @if(!isEmpty(assessmentRequirements)){ and t.assessment_requirements =#assessmentRequirements# @} @if(!isEmpty(assessmentTime)){ and t.assessment_time =#assessmentTime# @} @if(!isEmpty(assessmentContent)){ and t.assessment_content =#assessmentContent# @} @if(!isEmpty(fileUrl)){ and t.file_url =#fileUrl# @} @if(!isEmpty(taskList)){ and t.task_list =#taskList# @} @if(!isEmpty(orgId)){ and t.org_id =#orgId# @} @if(!isEmpty(userId)){ and t.user_id =#userId# @} @if(!isEmpty(addTime)){ and t.add_time =#addTime# @}
getValuesByQuery
-
根据不为空的参数进行查询
select t.* from hands_on_simulation_tasks t where 1=1 and #function("handsOnSimulationTasks.query")# @if(!isEmpty(taskId)){ and t.task_id =#taskId# @} @if(!isEmpty(taskIdPlural)){ and find_in_set(t.task_id,#taskIdPlural#) @} @if(!isEmpty(handsOnId)){ and t.hands_on_id =#handsOnId# @} @if(!isEmpty(handsOnIdPlural)){ and t.hands_on_id in (#text(handsOnIdPlural)#) @} @if(!isEmpty(taskType)){ and t.task_type =#taskType# @} @if(!isEmpty(taskTitle)){ and t.task_title =#taskTitle# @} @if(!isEmpty(taskScore)){ and t.task_score =#taskScore# @} @if(!isEmpty(taskOrder)){ and t.task_order =#taskOrder# @} @if(!isEmpty(taskStatus)){ and t.task_status =#taskStatus# @} @if(!isEmpty(assessmentRequirements)){ and t.assessment_requirements =#assessmentRequirements# @} @if(!isEmpty(assessmentTime)){ and t.assessment_time =#assessmentTime# @} @if(!isEmpty(assessmentContent)){ and t.assessment_content =#assessmentContent# @} @if(!isEmpty(fileUrl)){ and t.file_url =#fileUrl# @} @if(!isEmpty(taskList)){ and t.task_list =#taskList# @} @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(addTime)){ and t.add_time =#addTime# @}
getValuesByQueryNotPermission
-
根据不为空的参数进行查询
select t.* from hands_on_simulation_tasks t where 1=1 @if(!isEmpty(taskId)){ and t.task_id =#taskId# @} @if(!isEmpty(taskIdPlural)){ and find_in_set(t.task_id,#taskIdPlural#) @} @if(!isEmpty(handsOnId)){ and t.hands_on_id =#handsOnId# @} @if(!isEmpty(handsOnIdPlural)){ and t.hands_on_id in (#text(handsOnIdPlural)#) @} @if(!isEmpty(taskType)){ and t.task_type =#taskType# @} @if(!isEmpty(taskTitle)){ and t.task_title =#taskTitle# @} @if(!isEmpty(taskScore)){ and t.task_score =#taskScore# @} @if(!isEmpty(taskOrder)){ and t.task_order =#taskOrder# @} @if(!isEmpty(taskStatus)){ and t.task_status =#taskStatus# @} @if(!isEmpty(assessmentRequirements)){ and t.assessment_requirements =#assessmentRequirements# @} @if(!isEmpty(assessmentTime)){ and t.assessment_time =#assessmentTime# @} @if(!isEmpty(assessmentContent)){ and t.assessment_content =#assessmentContent# @} @if(!isEmpty(fileUrl)){ and t.file_url =#fileUrl# @} @if(!isEmpty(taskList)){ and t.task_list =#taskList# @} @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(addTime)){ and t.add_time =#addTime# @}