|
|
|
|
queryByCondition
|
|
|
|
|
===
|
|
|
|
|
* 根据不为空的参数进行分页查询
|
|
|
|
|
|
|
|
|
|
select
|
|
|
|
|
@pageTag(){
|
|
|
|
|
t.*
|
|
|
|
|
@}
|
|
|
|
|
from student t
|
|
|
|
|
where 1=1
|
|
|
|
|
@//数据权限,该sql语句功能点,如果不考虑数据权限,可以删除此行
|
|
|
|
|
and #function("student.query")#
|
|
|
|
|
@if(!isEmpty(studentId)){
|
|
|
|
|
and t.student_id =#studentId#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentNo)){
|
|
|
|
|
and t.student_no =#studentNo#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentName)){
|
|
|
|
|
and t.student_name =#studentName#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentPhone)){
|
|
|
|
|
and t.student_phone =#studentPhone#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentAccount)){
|
|
|
|
|
and t.student_account =#studentAccount#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentPassword)){
|
|
|
|
|
and t.student_password =#studentPassword#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentSex)){
|
|
|
|
|
and t.student_sex =#studentSex#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentIdCartType)){
|
|
|
|
|
and t.student_id_cart_type =#studentIdCartType#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentIdCard)){
|
|
|
|
|
and t.student_id_card =#studentIdCard#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(maxEducation)){
|
|
|
|
|
and t.max_education =#maxEducation#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentPoliticalOutlook)){
|
|
|
|
|
and t.student_political_outlook =#studentPoliticalOutlook#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentAddress)){
|
|
|
|
|
and t.student_address =#studentAddress#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentSource)){
|
|
|
|
|
and t.student_source =#studentSource#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentNation)){
|
|
|
|
|
and t.student_nation =#studentNation#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentBirthday)){
|
|
|
|
|
and t.student_birthday =#studentBirthday#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentTestNo)){
|
|
|
|
|
and t.student_test_no =#studentTestNo#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(postalCode)){
|
|
|
|
|
and t.postal_code =#postalCode#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentEmail)){
|
|
|
|
|
and t.student_email =#studentEmail#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentJobAddress)){
|
|
|
|
|
and t.student_job_address =#studentJobAddress#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(targetUniversityId)){
|
|
|
|
|
and t.target_university_id =#targetUniversityId#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentRemark)){
|
|
|
|
|
and t.student_remark =#studentRemark#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentStatus)){
|
|
|
|
|
and t.student_status =#studentStatus#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentAddTime)){
|
|
|
|
|
and t.student_add_time =#studentAddTime#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(orgId)){
|
|
|
|
|
and t.org_id =#orgId#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(userId)){
|
|
|
|
|
and t.user_id =#userId#
|
|
|
|
|
@}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
deleteStudentByIds
|
|
|
|
|
===
|
|
|
|
|
|
|
|
|
|
* 批量删除
|
|
|
|
|
|
|
|
|
|
delete from student where find_in_set(student_id,#ids#)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getStudentValues
|
|
|
|
|
===
|
|
|
|
|
|
|
|
|
|
* 根据不为空的参数进行查询
|
|
|
|
|
|
|
|
|
|
select t.*
|
|
|
|
|
from student t
|
|
|
|
|
where 1=1
|
|
|
|
|
@if(!isEmpty(studentId)){
|
|
|
|
|
and t.student_id =#studentId#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentNo)){
|
|
|
|
|
and t.student_no =#studentNo#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentName)){
|
|
|
|
|
and t.student_name =#studentName#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentPhone)){
|
|
|
|
|
and t.student_phone =#studentPhone#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentAccount)){
|
|
|
|
|
and t.student_account =#studentAccount#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentPassword)){
|
|
|
|
|
and t.student_password =#studentPassword#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentSex)){
|
|
|
|
|
and t.student_sex =#studentSex#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentIdCartType)){
|
|
|
|
|
and t.student_id_cart_type =#studentIdCartType#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentIdCard)){
|
|
|
|
|
and t.student_id_card =#studentIdCard#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(maxEducation)){
|
|
|
|
|
and t.max_education =#maxEducation#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentPoliticalOutlook)){
|
|
|
|
|
and t.student_political_outlook =#studentPoliticalOutlook#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentAddress)){
|
|
|
|
|
and t.student_address =#studentAddress#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentSource)){
|
|
|
|
|
and t.student_source =#studentSource#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentNation)){
|
|
|
|
|
and t.student_nation =#studentNation#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentBirthday)){
|
|
|
|
|
and t.student_birthday =#studentBirthday#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentTestNo)){
|
|
|
|
|
and t.student_test_no =#studentTestNo#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(postalCode)){
|
|
|
|
|
and t.postal_code =#postalCode#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentEmail)){
|
|
|
|
|
and t.student_email =#studentEmail#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentJobAddress)){
|
|
|
|
|
and t.student_job_address =#studentJobAddress#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(targetUniversityId)){
|
|
|
|
|
and t.target_university_id =#targetUniversityId#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentRemark)){
|
|
|
|
|
and t.student_remark =#studentRemark#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentStatus)){
|
|
|
|
|
and t.student_status =#studentStatus#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentAddTime)){
|
|
|
|
|
and t.student_add_time =#studentAddTime#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(orgId)){
|
|
|
|
|
and t.org_id =#orgId#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(userId)){
|
|
|
|
|
and t.user_id =#userId#
|
|
|
|
|
@}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getValuesByQuery
|
|
|
|
|
===
|
|
|
|
|
|
|
|
|
|
* 根据不为空的参数进行查询
|
|
|
|
|
|
|
|
|
|
select t.*
|
|
|
|
|
from student t
|
|
|
|
|
where 1=1
|
|
|
|
|
@if(!isEmpty(studentId)){
|
|
|
|
|
and t.student_id =#studentId#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentNo)){
|
|
|
|
|
and t.student_no =#studentNo#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentName)){
|
|
|
|
|
and t.student_name =#studentName#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentPhone)){
|
|
|
|
|
and t.student_phone =#studentPhone#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentAccount)){
|
|
|
|
|
and t.student_account =#studentAccount#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentPassword)){
|
|
|
|
|
and t.student_password =#studentPassword#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentSex)){
|
|
|
|
|
and t.student_sex =#studentSex#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentIdCartType)){
|
|
|
|
|
and t.student_id_cart_type =#studentIdCartType#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentIdCard)){
|
|
|
|
|
and t.student_id_card =#studentIdCard#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(maxEducation)){
|
|
|
|
|
and t.max_education =#maxEducation#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentPoliticalOutlook)){
|
|
|
|
|
and t.student_political_outlook =#studentPoliticalOutlook#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentAddress)){
|
|
|
|
|
and t.student_address =#studentAddress#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentSource)){
|
|
|
|
|
and t.student_source =#studentSource#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentNation)){
|
|
|
|
|
and t.student_nation =#studentNation#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentBirthday)){
|
|
|
|
|
and t.student_birthday =#studentBirthday#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentTestNo)){
|
|
|
|
|
and t.student_test_no =#studentTestNo#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(postalCode)){
|
|
|
|
|
and t.postal_code =#postalCode#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentEmail)){
|
|
|
|
|
and t.student_email =#studentEmail#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentJobAddress)){
|
|
|
|
|
and t.student_job_address =#studentJobAddress#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(targetUniversityId)){
|
|
|
|
|
and t.target_university_id =#targetUniversityId#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentRemark)){
|
|
|
|
|
and t.student_remark =#studentRemark#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentStatus)){
|
|
|
|
|
and t.student_status =#studentStatus#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentAddTime)){
|
|
|
|
|
and t.student_add_time =#studentAddTime#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(orgId)){
|
|
|
|
|
and t.org_id =#orgId#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(userId)){
|
|
|
|
|
and t.user_id =#userId#
|
|
|
|
|
@}
|