验证生成工具

beetlsql3-dev
Mlxa0324 3 years ago
parent 6678ab7511
commit 7fa118e856

@ -0,0 +1,390 @@
queryByCondition
===
* 根据不为空的参数进行分页查询
select
@pageTag(){
t.*
@}
from teacher_open_course_score_dashboard t
where 1=1
@//数据权限该sql语句功能点,如果不考虑数据权限,可以删除此行
and #function("teacherOpenCourseScoreDashboard.query")#
@if(!isEmpty(teacherOpenCourseScoreDashboardId)){
and t.teacher_open_course_score_dashboard_id =#teacherOpenCourseScoreDashboardId#
@}
@if(!isEmpty(teacherOpenCourseScoreDashboardIdPlural)){
and find_in_set(t.teacher_open_course_score_dashboard_id,#teacherOpenCourseScoreDashboardIdPlural#)
@}
@if(!isEmpty(studentId)){
and t.student_id =#studentId#
@}
@if(!isEmpty(studentIdPlural)){
and find_in_set(t.student_id,#studentIdPlural#)
@}
@if(!isEmpty(signinScore)){
and t.signin_score =#signinScore#
@}
@if(!isEmpty(courseScore)){
and t.course_score =#courseScore#
@}
@if(!isEmpty(realOperationScore)){
and t.real_operation_score =#realOperationScore#
@}
@if(!isEmpty(questionHomeworkScore)){
and t.question_homework_score =#questionHomeworkScore#
@}
@if(!isEmpty(examScore)){
and t.exam_score =#examScore#
@}
@if(!isEmpty(chatScore)){
and t.chat_score =#chatScore#
@}
@if(!isEmpty(totalScore)){
and t.total_score =#totalScore#
@}
@if(!isEmpty(manualScore)){
and t.manual_score =#manualScore#
@}
@if(!isEmpty(lastScore)){
and t.last_score =#lastScore#
@}
@if(!isEmpty(lastStatus)){
and t.last_status =#lastStatus#
@}
@if(!isEmpty(orgId)){
and t.org_id =#orgId#
@}
@if(!isEmpty(orgIdPlural)){
and find_in_set(t.org_id,#orgIdPlural#)
@}
@if(!isEmpty(userId)){
and t.user_id =#userId#
@}
@if(!isEmpty(userIdPlural)){
and find_in_set(t.user_id,#userIdPlural#)
@}
@if(!isEmpty(createTime)){
and t.create_time =#createTime#
@}
queryByConditionQuery
===
* 根据不为空的参数进行分页查询(无权限)
select
@pageTag(){
t.*
@}
from teacher_open_course_score_dashboard t
where 1=1
@if(!isEmpty(teacherOpenCourseScoreDashboardId)){
and t.teacher_open_course_score_dashboard_id =#teacherOpenCourseScoreDashboardId#
@}
@if(!isEmpty(teacherOpenCourseScoreDashboardIdPlural)){
and find_in_set(t.teacher_open_course_score_dashboard_id,#teacherOpenCourseScoreDashboardIdPlural#)
@}
@if(!isEmpty(studentId)){
and t.student_id =#studentId#
@}
@if(!isEmpty(studentIdPlural)){
and find_in_set(t.student_id,#studentIdPlural#)
@}
@if(!isEmpty(signinScore)){
and t.signin_score =#signinScore#
@}
@if(!isEmpty(courseScore)){
and t.course_score =#courseScore#
@}
@if(!isEmpty(realOperationScore)){
and t.real_operation_score =#realOperationScore#
@}
@if(!isEmpty(questionHomeworkScore)){
and t.question_homework_score =#questionHomeworkScore#
@}
@if(!isEmpty(examScore)){
and t.exam_score =#examScore#
@}
@if(!isEmpty(chatScore)){
and t.chat_score =#chatScore#
@}
@if(!isEmpty(totalScore)){
and t.total_score =#totalScore#
@}
@if(!isEmpty(manualScore)){
and t.manual_score =#manualScore#
@}
@if(!isEmpty(lastScore)){
and t.last_score =#lastScore#
@}
@if(!isEmpty(lastStatus)){
and t.last_status =#lastStatus#
@}
@if(!isEmpty(orgId)){
and t.org_id =#orgId#
@}
@if(!isEmpty(orgIdPlural)){
and find_in_set(t.org_id,#orgIdPlural#)
@}
@if(!isEmpty(userId)){
and t.user_id =#userId#
@}
@if(!isEmpty(userIdPlural)){
and find_in_set(t.user_id,#userIdPlural#)
@}
@if(!isEmpty(createTime)){
and t.create_time =#createTime#
@}
deleteTeacherOpenCourseScoreDashboardByIds
===
* 批量删除
delete from teacher_open_course_score_dashboard where find_in_set(teacher_open_course_score_dashboard_id,#ids#)
getByIds
===
select * from teacher_open_course_score_dashboard where find_in_set(teacher_open_course_score_dashboard_id,#ids#)
updateGivenByIds
===
* 批量更新指定字段,无论此字段是否有值
update teacher_open_course_score_dashboard
set
@if(contain("studentId",_given)){
@if(isEmpty(studentId)){
student_id = null ,
@}else{
student_id = #studentId# ,
@}
@}
@if(contain("signinScore",_given)){
@if(isEmpty(signinScore)){
signin_score = null ,
@}else{
signin_score = #signinScore# ,
@}
@}
@if(contain("courseScore",_given)){
@if(isEmpty(courseScore)){
course_score = null ,
@}else{
course_score = #courseScore# ,
@}
@}
@if(contain("realOperationScore",_given)){
@if(isEmpty(realOperationScore)){
real_operation_score = null ,
@}else{
real_operation_score = #realOperationScore# ,
@}
@}
@if(contain("questionHomeworkScore",_given)){
@if(isEmpty(questionHomeworkScore)){
question_homework_score = null ,
@}else{
question_homework_score = #questionHomeworkScore# ,
@}
@}
@if(contain("examScore",_given)){
@if(isEmpty(examScore)){
exam_score = null ,
@}else{
exam_score = #examScore# ,
@}
@}
@if(contain("chatScore",_given)){
@if(isEmpty(chatScore)){
chat_score = null ,
@}else{
chat_score = #chatScore# ,
@}
@}
@if(contain("totalScore",_given)){
@if(isEmpty(totalScore)){
total_score = null ,
@}else{
total_score = #totalScore# ,
@}
@}
@if(contain("manualScore",_given)){
@if(isEmpty(manualScore)){
manual_score = null ,
@}else{
manual_score = #manualScore# ,
@}
@}
@if(contain("lastScore",_given)){
@if(isEmpty(lastScore)){
last_score = null ,
@}else{
last_score = #lastScore# ,
@}
@}
@if(contain("lastStatus",_given)){
@if(isEmpty(lastStatus)){
last_status = null ,
@}else{
last_status = #lastStatus# ,
@}
@}
@if(contain("orgId",_given)){
@if(isEmpty(orgId)){
org_id = null ,
@}else{
org_id = #orgId# ,
@}
@}
@if(contain("userId",_given)){
@if(isEmpty(userId)){
user_id = null ,
@}else{
user_id = #userId# ,
@}
@}
@if(contain("createTime",_given)){
@if(isEmpty(createTime)){
create_time = null ,
@}else{
create_time = #createTime# ,
@}
@}
teacher_open_course_score_dashboard_id = teacher_open_course_score_dashboard_id
where find_in_set(teacher_open_course_score_dashboard_id,#teacherOpenCourseScoreDashboardIdPlural#)
getTeacherOpenCourseScoreDashboardValues
===
* 根据不为空的参数进行查询
select t.*
from teacher_open_course_score_dashboard t
where 1=1
@if(!isEmpty(teacherOpenCourseScoreDashboardId)){
and t.teacher_open_course_score_dashboard_id =#teacherOpenCourseScoreDashboardId#
@}
@if(!isEmpty(studentId)){
and t.student_id =#studentId#
@}
@if(!isEmpty(signinScore)){
and t.signin_score =#signinScore#
@}
@if(!isEmpty(courseScore)){
and t.course_score =#courseScore#
@}
@if(!isEmpty(realOperationScore)){
and t.real_operation_score =#realOperationScore#
@}
@if(!isEmpty(questionHomeworkScore)){
and t.question_homework_score =#questionHomeworkScore#
@}
@if(!isEmpty(examScore)){
and t.exam_score =#examScore#
@}
@if(!isEmpty(chatScore)){
and t.chat_score =#chatScore#
@}
@if(!isEmpty(totalScore)){
and t.total_score =#totalScore#
@}
@if(!isEmpty(manualScore)){
and t.manual_score =#manualScore#
@}
@if(!isEmpty(lastScore)){
and t.last_score =#lastScore#
@}
@if(!isEmpty(lastStatus)){
and t.last_status =#lastStatus#
@}
@if(!isEmpty(orgId)){
and t.org_id =#orgId#
@}
@if(!isEmpty(userId)){
and t.user_id =#userId#
@}
@if(!isEmpty(createTime)){
and t.create_time =#createTime#
@}
getValuesByQuery
===
* 根据不为空的参数进行查询
select t.*
from teacher_open_course_score_dashboard t
where 1=1 and #function("teacherOpenCourseScoreDashboard.query")#
@if(!isEmpty(teacherOpenCourseScoreDashboardId)){
and t.teacher_open_course_score_dashboard_id =#teacherOpenCourseScoreDashboardId#
@}
@if(!isEmpty(teacherOpenCourseScoreDashboardIdPlural)){
and find_in_set(t.teacher_open_course_score_dashboard_id,#teacherOpenCourseScoreDashboardIdPlural#)
@}
@if(!isEmpty(studentId)){
and t.student_id =#studentId#
@}
@if(!isEmpty(studentIdPlural)){
and find_in_set(t.student_id,#studentIdPlural#)
@}
@if(!isEmpty(signinScore)){
and t.signin_score =#signinScore#
@}
@if(!isEmpty(courseScore)){
and t.course_score =#courseScore#
@}
@if(!isEmpty(realOperationScore)){
and t.real_operation_score =#realOperationScore#
@}
@if(!isEmpty(questionHomeworkScore)){
and t.question_homework_score =#questionHomeworkScore#
@}
@if(!isEmpty(examScore)){
and t.exam_score =#examScore#
@}
@if(!isEmpty(chatScore)){
and t.chat_score =#chatScore#
@}
@if(!isEmpty(totalScore)){
and t.total_score =#totalScore#
@}
@if(!isEmpty(manualScore)){
and t.manual_score =#manualScore#
@}
@if(!isEmpty(lastScore)){
and t.last_score =#lastScore#
@}
@if(!isEmpty(lastStatus)){
and t.last_status =#lastStatus#
@}
@if(!isEmpty(orgId)){
and t.org_id =#orgId#
@}
@if(!isEmpty(orgIdPlural)){
and find_in_set(t.org_id,#orgIdPlural#)
@}
@if(!isEmpty(userId)){
and t.user_id =#userId#
@}
@if(!isEmpty(userIdPlural)){
and find_in_set(t.user_id,#userIdPlural#)
@}
@if(!isEmpty(createTime)){
and t.create_time =#createTime#
@}
Loading…
Cancel
Save