|
|
|
|
queryByCondition
|
|
|
|
|
===
|
|
|
|
|
* 根据不为空的参数进行分页查询
|
|
|
|
|
|
|
|
|
|
select
|
|
|
|
|
@pageTag(){
|
|
|
|
|
t.*
|
|
|
|
|
@}
|
|
|
|
|
from schools t
|
|
|
|
|
where 1=1
|
|
|
|
|
@//数据权限,该sql语句功能点,如果不考虑数据权限,可以删除此行
|
|
|
|
|
and #function("schools.query")#
|
|
|
|
|
@if(!isEmpty(id)){
|
|
|
|
|
and t.id =#id#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(createdAt)){
|
|
|
|
|
and t.created_at =#createdAt#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(updatedAt)){
|
|
|
|
|
and t.updated_at =#updatedAt#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(data)){
|
|
|
|
|
and t.data =#data#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(name)){
|
|
|
|
|
and t.name =#name#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(status)){
|
|
|
|
|
and t.status =#status#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(description)){
|
|
|
|
|
and t.description =#description#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(code)){
|
|
|
|
|
and t.code =#code#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(college)){
|
|
|
|
|
and t.college =#college#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(major)){
|
|
|
|
|
and t.major =#major#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(coreOrgId)){
|
|
|
|
|
and t.core_org_id =#coreOrgId#
|
|
|
|
|
@}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
deleteSchoolsByIds
|
|
|
|
|
===
|
|
|
|
|
|
|
|
|
|
* 批量删除
|
|
|
|
|
|
|
|
|
|
delete from schools where find_in_set(id,#ids#)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getSchoolsValues
|
|
|
|
|
===
|
|
|
|
|
|
|
|
|
|
* 根据不为空的参数进行查询
|
|
|
|
|
|
|
|
|
|
select t.*
|
|
|
|
|
from schools t
|
|
|
|
|
where 1=1
|
|
|
|
|
@if(!isEmpty(id)){
|
|
|
|
|
and t.id =#id#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(createdAt)){
|
|
|
|
|
and t.created_at =#createdAt#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(updatedAt)){
|
|
|
|
|
and t.updated_at =#updatedAt#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(data)){
|
|
|
|
|
and t.data =#data#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(name)){
|
|
|
|
|
and t.name =#name#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(status)){
|
|
|
|
|
and t.status =#status#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(description)){
|
|
|
|
|
and t.description =#description#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(code)){
|
|
|
|
|
and t.code =#code#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(college)){
|
|
|
|
|
and t.college =#college#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(major)){
|
|
|
|
|
and t.major =#major#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(coreOrgId)){
|
|
|
|
|
and t.core_org_id =#coreOrgId#
|
|
|
|
|
@}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getValuesByQuery
|
|
|
|
|
===
|
|
|
|
|
|
|
|
|
|
* 根据不为空的参数进行查询
|
|
|
|
|
|
|
|
|
|
select t.*
|
|
|
|
|
from schools t
|
|
|
|
|
where 1=1
|
|
|
|
|
@if(!isEmpty(id)){
|
|
|
|
|
and t.id =#id#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(createdAt)){
|
|
|
|
|
and t.created_at =#createdAt#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(updatedAt)){
|
|
|
|
|
and t.updated_at =#updatedAt#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(data)){
|
|
|
|
|
and t.data =#data#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(name)){
|
|
|
|
|
and t.name =#name#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(status)){
|
|
|
|
|
and t.status =#status#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(description)){
|
|
|
|
|
and t.description =#description#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(code)){
|
|
|
|
|
and t.code =#code#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(college)){
|
|
|
|
|
and t.college =#college#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(major)){
|
|
|
|
|
and t.major =#major#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(coreOrgId)){
|
|
|
|
|
and t.core_org_id =#coreOrgId#
|
|
|
|
|
@}
|