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.

107 lines
2.5 KiB
Markdown

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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#)
@}