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

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