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.
|
|
|
|
queryByCondition
|
|
|
|
|
===
|
|
|
|
|
* 根据不为空的参数进行分页查询
|
|
|
|
|
|
|
|
|
|
select
|
|
|
|
|
@pageTag(){
|
|
|
|
|
t.*
|
|
|
|
|
@}
|
|
|
|
|
from examination_classes t
|
|
|
|
|
where 1=1
|
|
|
|
|
@//数据权限,该sql语句功能点,如果不考虑数据权限,可以删除此行
|
|
|
|
|
and #function("examinationClasses.query")#
|
|
|
|
|
@if(!isEmpty(examinationId)){
|
|
|
|
|
and t.examination_id =#examinationId#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(classId)){
|
|
|
|
|
and t.class_id =#classId#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(status)){
|
|
|
|
|
and t.status =#status#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(data)){
|
|
|
|
|
and t.data =#data#
|
|
|
|
|
@}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
deleteExaminationClassesByIds
|
|
|
|
|
===
|
|
|
|
|
|
|
|
|
|
* 批量删除
|
|
|
|
|
|
|
|
|
|
delete from examination_classes where find_in_set(class_id,#ids#)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
deleteExaminationClassesByExaminationId
|
|
|
|
|
===
|
|
|
|
|
|
|
|
|
|
* 批量删除
|
|
|
|
|
|
|
|
|
|
delete from examination_classes where examination_id = #examinationId#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getExaminationClassesValues
|
|
|
|
|
===
|
|
|
|
|
|
|
|
|
|
* 根据不为空的参数进行查询
|
|
|
|
|
|
|
|
|
|
select t.*
|
|
|
|
|
from examination_classes t
|
|
|
|
|
where 1=1
|
|
|
|
|
@if(!isEmpty(examinationId)){
|
|
|
|
|
and t.examination_id =#examinationId#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(classId)){
|
|
|
|
|
and t.class_id =#classId#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(status)){
|
|
|
|
|
and t.status =#status#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(data)){
|
|
|
|
|
and t.data =#data#
|
|
|
|
|
@}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getValuesByQuery
|
|
|
|
|
===
|
|
|
|
|
|
|
|
|
|
* 根据不为空的参数进行查询
|
|
|
|
|
|
|
|
|
|
select t.*
|
|
|
|
|
from examination_classes t
|
|
|
|
|
where 1=1
|
|
|
|
|
@if(!isEmpty(examinationId)){
|
|
|
|
|
and t.examination_id =#examinationId#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(classId)){
|
|
|
|
|
and t.class_id =#classId#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(status)){
|
|
|
|
|
and t.status =#status#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(data)){
|
|
|
|
|
and t.data =#data#
|
|
|
|
|
@}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getClassesName
|
|
|
|
|
===
|
|
|
|
|
|
|
|
|
|
* 根据不为空的参数进行查询
|
|
|
|
|
|
|
|
|
|
SELECT
|
|
|
|
|
c.name class_name, ec.class_id
|
|
|
|
|
FROM
|
|
|
|
|
examination_classes ec
|
|
|
|
|
LEFT JOIN classes c ON ec.class_id = c.classes_id
|
|
|
|
|
WHERE ec.examination_id = #examinationId#
|
|
|
|
|
|