queryByCondition === * 根据不为空的参数进行分页查询 select @pageTag(){ t.*, a.course_info_name @} from resources_info t left join course_info a on a.course_info_id = t.course_info_id where 1=1 @//数据权限,该sql语句功能点,如果不考虑数据权限,可以删除此行 and #function("resourcesInfo.query")# @if(!isEmpty(resourcesInfoIds)){ and find_in_set(t.resources_info_id,#resourcesInfoIds#) @} @if(!isEmpty(resourcesInfoId)){ and t.resources_info_id =#resourcesInfoId# @} @if(!isEmpty(courseInfoIds)){ and find_in_set(t.course_info_id,#courseInfoIds#) @} @if(!isEmpty(courseInfoId)){ and t.course_info_id =#courseInfoId# @} @if(!isEmpty(resourcesInfoName)){ and t.resources_info_name like #'%'+resourcesInfoName+'%'# @} @if(!isEmpty(resourcesInfoType)){ and t.resources_info_type =#resourcesInfoType# @} @if(!isEmpty(resourcesInfoContent)){ and t.resources_info_content =#resourcesInfoContent# @} @if(!isEmpty(orgId)){ and t.org_id =#orgId# @} @if(!isEmpty(addType)){ and t.add_type =#addType# @} @if(isEmpty(seeSelf) && !isEmpty(userId)){ and t.user_id =#userId# @} @if(!isEmpty(seeSelf) && seeSelf && !isEmpty(userId)){ and (t.add_type = 'ADMIN_ADD' or t.user_id = #userId#) @} ORDER BY t.resources_info_id DESC deleteResourcesInfoByIds === * 批量删除 delete from resources_info where find_in_set(resources_info_id,#ids#) getValuesByQuery === * 根据不为空的参数进行查询 select t.* from resources_info t where 1=1 @if(!isEmpty(resourcesInfoIds)){ and find_in_set(t.resources_info_id,#resourcesInfoIds#) @} @if(!isEmpty(resourcesInfoId)){ and t.resources_info_id =#resourcesInfoId# @} @if(!isEmpty(courseInfoIds)){ and find_in_set(t.course_info_id,#courseInfoIds#) @} @if(!isEmpty(courseInfoId)){ and t.course_info_id =#courseInfoId# @} @if(!isEmpty(resourcesInfoName)){ and t.resources_info_name =#resourcesInfoName# @} @if(!isEmpty(resourcesInfoType)){ and t.resources_info_type =#resourcesInfoType# @} @if(!isEmpty(resourcesInfoContent)){ and t.resources_info_content =#resourcesInfoContent# @} @if(!isEmpty(orgId)){ and t.org_id =#orgId# @} @if(!isEmpty(addType)){ and t.add_type =#addType# @} @if(isEmpty(seeSelf) && !isEmpty(userId)){ and t.user_id =#userId# @} @if(!isEmpty(seeSelf) && seeSelf && !isEmpty(userId)){ and (t.add_type = 'ADMIN_ADD' or t.user_id = #userId#) @} getResourcesInfoValues === * 根据不为空的参数进行查询 select t.* from resources_info t where 1=1 @if(!isEmpty(resourcesInfoId)){ and t.resources_info_id =#resourcesInfoId# @} @if(!isEmpty(courseInfoId)){ and t.course_info_id =#courseInfoId# @} @if(!isEmpty(resourcesInfoName)){ and t.resources_info_name =#resourcesInfoName# @} @if(!isEmpty(resourcesInfoType)){ and t.resources_info_type =#resourcesInfoType# @} @if(!isEmpty(resourcesInfoContent)){ and t.resources_info_content =#resourcesInfoContent# @} @if(!isEmpty(orgId)){ and t.org_id =#orgId# @} @if(!isEmpty(addType)){ and t.add_type =#addType# @} @if(!isEmpty(userId)){ and t.user_id =#userId# @}