2.5 KiB
queryByCondition
-
根据不为空的参数进行分页查询
select @pageTag(){ t.* @} from course_label t where 1=1
@//数据权限,该sql语句功能点,如果不考虑数据权限,可以删除此行
and #function("courseLabel.query")# @if(!isEmpty(courseLabelId)){ and t.course_label_id =#courseLabelId# @} @if(!isEmpty(courseLabelType)){ and t.course_label_type =#courseLabelType# @} @if(!isEmpty(courseLabelName)){ and t.course_label_name =#courseLabelName# @} @if(!isEmpty(courseLabelStatus)){ and t.course_label_status =#courseLabelStatus# @} @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#) @}
deleteCourseLabelByIds
-
批量删除
delete from course_label where find_in_set(course_label_id,#ids#)
getCourseLabelValues
-
根据不为空的参数进行查询
select t.* from course_label t where 1=1
@if(!isEmpty(courseLabelId)){ and t.course_label_id =#courseLabelId# @} @if(!isEmpty(courseLabelType)){ and t.course_label_type =#courseLabelType# @} @if(!isEmpty(courseLabelName)){ and t.course_label_name =#courseLabelName# @} @if(!isEmpty(courseLabelStatus)){ and t.course_label_status =#courseLabelStatus# @} @if(!isEmpty(orgId)){ and t.org_id =#orgId# @} @if(!isEmpty(userId)){ and t.user_id =#userId# @}
getValuesByQueryNotWithPermission
- 无权限查询课程类别
select
t.*
from course_label t
where 1=1
@if(!isEmpty(courseLabelId)){ and t.course_label_id =#courseLabelId# @} @if(!isEmpty(courseLabelType)){ and t.course_label_type =#courseLabelType# @} @if(!isEmpty(courseLabelName)){ and t.course_label_name =#courseLabelName# @} @if(!isEmpty(courseLabelStatus)){ and t.course_label_status =#courseLabelStatus# @} @if(!isEmpty(orgId)){ and t.org_id =#orgId# @} @if(isEmpty(seeSelf) && !isEmpty(userId)){ and t.user_id =#userId# @} @if(!isEmpty(addType)){ and t.add_type =#addType# @} @if(!isEmpty(seeSelf) && seeSelf && !isEmpty(userId)){ and (t.add_type = 'ADMIN_ADD' or t.user_id = #userId#) @}