【feat】基于若水,整合datax-web
This commit is contained in:
parent
adae3e447d
commit
daf01f5f3b
@ -194,3 +194,8 @@ xss:
|
||||
excludes: /system/notice
|
||||
# 匹配链接
|
||||
urlPatterns: /system/*,/monitor/*,/tool/*
|
||||
|
||||
datasource:
|
||||
aes:
|
||||
key: AD42F6697B035B75
|
||||
|
||||
|
274
czsj-admin/src/main/resources/i18n/message.properties
Normal file
274
czsj-admin/src/main/resources/i18n/message.properties
Normal file
@ -0,0 +1,274 @@
|
||||
admin_name=任务调度中心
|
||||
admin_name_full=分布式任务调度平台XXL-JOB
|
||||
admin_version=2.1.1
|
||||
admin_i18n=
|
||||
|
||||
## system
|
||||
system_tips=系统提示
|
||||
system_ok=确定
|
||||
system_close=关闭
|
||||
system_save=保存
|
||||
system_cancel=取消
|
||||
system_search=搜索
|
||||
system_status=状态
|
||||
system_opt=操作
|
||||
system_please_input=请输入
|
||||
system_please_choose=请选择
|
||||
system_success=成功
|
||||
system_fail=失败
|
||||
system_add_suc=新增成功
|
||||
system_add_fail=新增失败
|
||||
system_update_suc=更新成功
|
||||
system_update_fail=更新失败
|
||||
system_all=全部
|
||||
system_api_error=接口异常
|
||||
system_show=查看
|
||||
system_empty=无
|
||||
system_opt_suc=操作成功
|
||||
system_opt_fail=操作失败
|
||||
system_opt_edit=编辑
|
||||
system_opt_del=删除
|
||||
system_invalid=非法
|
||||
system_not_found=不存在
|
||||
system_nav=导航
|
||||
system_digits=整数
|
||||
system_length_limit=长度限制
|
||||
system_no_blank=不能为空
|
||||
system_type_error=类型错误
|
||||
system_permission_limit=权限拦截
|
||||
system_welcome=欢迎
|
||||
|
||||
## daterangepicker
|
||||
daterangepicker_ranges_recent_hour=最近一小时
|
||||
daterangepicker_ranges_today=今日
|
||||
daterangepicker_ranges_yesterday=昨日
|
||||
daterangepicker_ranges_this_month=本月
|
||||
daterangepicker_ranges_last_month=上个月
|
||||
daterangepicker_ranges_recent_week=最近一周
|
||||
daterangepicker_ranges_recent_month=最近一月
|
||||
daterangepicker_custom_name=自定义
|
||||
daterangepicker_custom_starttime=起始时间
|
||||
daterangepicker_custom_endtime=结束时间
|
||||
daterangepicker_custom_daysofweek=日,一,二,三,四,五,六
|
||||
daterangepicker_custom_monthnames=一月,二月,三月,四月,五月,六月,七月,八月,九月,十月,十一月,十二月
|
||||
|
||||
## dataTable
|
||||
dataTable_sProcessing=处理中...
|
||||
dataTable_sLengthMenu=每页 _MENU_ 条记录
|
||||
dataTable_sZeroRecords=没有匹配结果
|
||||
dataTable_sInfo=第 _PAGE_ 页 ( 总共 _PAGES_ 页,_TOTAL_ 条记录 )
|
||||
dataTable_sInfoEmpty=无记录
|
||||
dataTable_sInfoFiltered=(由 _MAX_ 项结果过滤)
|
||||
dataTable_sSearch=搜索
|
||||
dataTable_sEmptyTable=表中数据为空
|
||||
dataTable_sLoadingRecords=载入中...
|
||||
dataTable_sFirst=首页
|
||||
dataTable_sPrevious=上页
|
||||
dataTable_sNext=下页
|
||||
dataTable_sLast=末页
|
||||
dataTable_sSortAscending=: 以升序排列此列
|
||||
dataTable_sSortDescending=: 以降序排列此列
|
||||
|
||||
## login
|
||||
login_btn=登录
|
||||
login_remember_me=记住密码
|
||||
login_username_placeholder=请输入登录账号
|
||||
login_password_placeholder=请输入登录密码
|
||||
login_username_empty=请输入登录账号
|
||||
login_username_lt_4=登录账号不应低于4位
|
||||
login_password_empty=请输入登录密码
|
||||
login_password_lt_4=登录密码不应低于4位
|
||||
login_success=登录成功
|
||||
login_fail=登录失败
|
||||
login_param_empty=账号或密码为空
|
||||
login_param_invalid=账号或密码错误
|
||||
|
||||
## logout
|
||||
logout_btn=注销
|
||||
logout_confirm=确认注销登录?
|
||||
logout_success=注销成功
|
||||
logout_fail=注销失败
|
||||
|
||||
## change pwd
|
||||
change_pwd=修改密码
|
||||
change_pwd_suc_to_logout=修改密码成功,即将注销登陆
|
||||
change_pwd_field_newpwd=新密码
|
||||
|
||||
## dashboard
|
||||
job_dashboard_name=运行报表
|
||||
job_dashboard_job_num=任务数量
|
||||
job_dashboard_job_num_tip=调度中心运行的任务数量
|
||||
job_dashboard_trigger_num=调度次数
|
||||
job_dashboard_trigger_num_tip=调度中心触发的调度次数
|
||||
job_dashboard_jobgroup_num=执行器数量
|
||||
job_dashboard_jobgroup_num_tip=调度中心在线的执行器机器数量
|
||||
job_dashboard_report=调度报表
|
||||
job_dashboard_report_loaddata_fail=调度报表数据加载异常
|
||||
job_dashboard_date_report=日期分布图
|
||||
job_dashboard_rate_report=成功比例图
|
||||
|
||||
## job info
|
||||
jobinfo_name=任务管理
|
||||
jobinfo_job=任务
|
||||
jobinfo_field_add=新增
|
||||
jobinfo_field_update=更新任务
|
||||
jobinfo_field_id=任务ID
|
||||
jobinfo_field_jobgroup=执行器
|
||||
jobinfo_field_jobgproject=所属项目
|
||||
jobinfo_field_temp=模板
|
||||
jobinfo_field_jobdesc=任务描述
|
||||
jobinfo_field_jobjson=任务JSON
|
||||
jobinfo_field_readerDataSource=Reader数据源
|
||||
jobinfo_field_writerDataSource=Writer数据源
|
||||
jobinfo_field_readerColumns=Reader Column
|
||||
jobinfo_field_writerColumns=Writer Column
|
||||
jobinfo_field_gluetype=运行模式
|
||||
jobinfo_field_executorparam=任务参数
|
||||
jobinfo_field_cron_invalid=Cron格式非法
|
||||
jobinfo_field_cron_never_fire=Cron非法,永远不会触发
|
||||
jobinfo_field_author=负责人
|
||||
jobinfo_field_timeout=任务超时时间
|
||||
jobinfo_field_alarmemail=报警邮件
|
||||
jobinfo_field_alarmemail_placeholder=请输入报警邮件,多个邮件地址则逗号分隔
|
||||
jobinfo_field_executorRouteStrategy=路由策略
|
||||
jobinfo_field_childJobId=子任务ID
|
||||
jobinfo_field_childJobId_placeholder=请输入子任务的任务ID,如存在多个则逗号分隔
|
||||
jobinfo_field_executorBlockStrategy=阻塞处理策略
|
||||
jobinfo_field_executorFailRetryCount=失败重试次数
|
||||
jobinfo_field_executorFailRetryCount_placeholder=失败重试次数,大于零时生效
|
||||
jobinfo_script_location=脚本位置
|
||||
jobinfo_shard_index=分片序号
|
||||
jobinfo_shard_total=分片总数
|
||||
jobinfo_opt_stop=停止
|
||||
jobinfo_opt_start=启动
|
||||
jobinfo_opt_log=查询日志
|
||||
jobinfo_opt_run=执行一次
|
||||
jobinfo_opt_registryinfo=注册节点
|
||||
jobinfo_opt_next_time=下次执行时间
|
||||
jobinfo_glue_remark=源码备注
|
||||
jobinfo_glue_remark_limit=源码备注长度限制为4~100
|
||||
jobinfo_glue_rollback=版本回溯
|
||||
jobinfo_glue_jobid_invalid=任务ID非法
|
||||
jobinfo_glue_gluetype_invalid=该任务非GLUE模式
|
||||
jobinfo_field_executorTimeout_placeholder=任务超时时间,单位秒,大于零时生效
|
||||
|
||||
## job log
|
||||
joblog_name=调度日志
|
||||
joblog_status=状态
|
||||
joblog_status_all=全部
|
||||
joblog_status_suc=成功
|
||||
joblog_status_fail=失败
|
||||
joblog_status_running=进行中
|
||||
joblog_field_triggerTime=调度时间
|
||||
joblog_field_triggerCode=调度结果
|
||||
joblog_field_triggerMsg=调度备注
|
||||
joblog_field_handleTime=执行时间
|
||||
joblog_field_handleCode=执行结果
|
||||
joblog_field_handleMsg=执行备注
|
||||
joblog_field_executorAddress=执行器地址
|
||||
joblog_clean=清理
|
||||
joblog_clean_log=日志清理
|
||||
joblog_clean_type=清理方式
|
||||
joblog_clean_type_1=清理一个月之前日志数据
|
||||
joblog_clean_type_2=清理三个月之前日志数据
|
||||
joblog_clean_type_3=清理六个月之前日志数据
|
||||
joblog_clean_type_4=清理一年之前日志数据
|
||||
joblog_clean_type_5=清理一千条以前日志数据
|
||||
joblog_clean_type_6=清理一万条以前日志数据
|
||||
joblog_clean_type_7=清理三万条以前日志数据
|
||||
joblog_clean_type_8=清理十万条以前日志数据
|
||||
joblog_clean_type_9=清理所有日志数据
|
||||
joblog_clean_type_invalid=清理类型参数异常
|
||||
joblog_handleCode_200=成功
|
||||
joblog_handleCode_500=失败
|
||||
joblog_handleCode_502=失败(超时)
|
||||
joblog_kill_log=终止任务
|
||||
joblog_kill_log_limit=调度失败,无法终止日志
|
||||
joblog_kill_log_byman=人为操作主动终止
|
||||
joblog_rolling_log=执行日志
|
||||
joblog_rolling_log_refresh=刷新
|
||||
joblog_rolling_log_triggerfail=任务发起调度失败,无法查看执行日志
|
||||
joblog_rolling_log_failoften=终止请求Rolling日志,请求失败次数超上限,可刷新页面重新加载日志
|
||||
joblog_logid_invalid=日志ID非法
|
||||
|
||||
## job group
|
||||
jobgroup_name=执行器管理
|
||||
jobgroup_list=执行器列表
|
||||
jobgroup_add=新增执行器
|
||||
jobgroup_edit=编辑执行器
|
||||
jobgroup_del=删除执行器
|
||||
jobgroup_field_order=排序
|
||||
jobgroup_field_title=名称
|
||||
jobgroup_field_addressType=注册方式
|
||||
jobgroup_field_addressType_0=自动注册
|
||||
jobgroup_field_addressType_1=手动录入
|
||||
jobgroup_field_addressType_limit=手动录入注册方式,机器地址不可为空
|
||||
jobgroup_field_registryList=机器地址
|
||||
jobgroup_field_registryList_invalid=机器地址格式非法
|
||||
jobgroup_field_registryList_placeholder=请输入执行器地址列表,多地址逗号分隔
|
||||
jobgroup_field_appName_limit=限制以小写字母开头,由小写字母、数字和中划线组成
|
||||
jobgroup_field_appName_length=AppName长度限制为4~64
|
||||
jobgroup_field_title_length=名称长度限制为4~12
|
||||
jobgroup_field_order_digits=请输入整数
|
||||
jobgroup_field_orderrange=取值范围为1~1000
|
||||
jobgroup_del_limit_0=拒绝删除,该执行器使用中
|
||||
jobgroup_del_limit_1=拒绝删除, 系统至少保留一个执行器
|
||||
jobgroup_empty=不存在有效执行器,请联系管理员
|
||||
|
||||
## job conf
|
||||
jobconf_block_SERIAL_EXECUTION=单机串行
|
||||
jobconf_block_DISCARD_LATER=丢弃后续调度
|
||||
jobconf_block_COVER_EARLY=覆盖之前调度
|
||||
jobconf_route_first=第一个
|
||||
jobconf_route_last=最后一个
|
||||
jobconf_route_round=轮询
|
||||
jobconf_route_random=随机
|
||||
jobconf_route_consistenthash=一致性HASH
|
||||
jobconf_route_lfu=最不经常使用
|
||||
jobconf_route_lru=最近最久未使用
|
||||
jobconf_route_failover=故障转移
|
||||
jobconf_route_busyover=忙碌转移
|
||||
jobconf_route_shard=分片广播
|
||||
jobconf_idleBeat=空闲检测
|
||||
jobconf_beat=心跳检测
|
||||
jobconf_monitor=任务调度中心监控报警
|
||||
jobconf_monitor_detail=监控告警明细
|
||||
jobconf_monitor_alarm_title=告警类型
|
||||
jobconf_monitor_alarm_type=调度失败
|
||||
jobconf_monitor_alarm_content=告警内容
|
||||
jobconf_trigger_admin_adress=调度机器
|
||||
jobconf_trigger_exe_regtype=执行器-注册方式
|
||||
jobconf_trigger_exe_regaddress=执行器-地址列表
|
||||
jobconf_trigger_address_empty=调度失败:执行器地址为空
|
||||
jobconf_trigger_run=触发调度
|
||||
jobconf_trigger_child_run=触发子任务
|
||||
jobconf_callback_child_msg1={0}/{1} [任务ID={2}], 触发{3}, 触发备注: {4} <br>
|
||||
jobconf_callback_child_msg2={0}/{1} [任务ID={2}], 触发失败, 触发备注: 任务ID格式错误 <br>
|
||||
jobconf_trigger_type=任务触发类型
|
||||
jobconf_trigger_type_cron=Cron触发
|
||||
jobconf_trigger_type_manual=手动触发
|
||||
jobconf_trigger_type_parent=父任务触发
|
||||
jobconf_trigger_type_api=API触发
|
||||
jobconf_trigger_type_retry=失败重试触发
|
||||
|
||||
## user
|
||||
user_manage=用户管理
|
||||
user_username=账号
|
||||
user_password=密码
|
||||
user_role=角色
|
||||
user_role_admin=管理员
|
||||
user_role_normal=普通用户
|
||||
user_permission=权限
|
||||
user_add=新增用户
|
||||
user_update=更新用户
|
||||
user_username_repeat=账号重复
|
||||
user_username_valid=限制以小写字母开头,由小写字母、数字组成
|
||||
user_password_update_placeholder=请输入新密码,为空则不更新密码
|
||||
user_update_loginuser_limit=禁止操作当前登录账号
|
||||
|
||||
## help
|
||||
job_help=使用教程
|
||||
job_help_document=官方文档
|
||||
|
||||
##json build
|
||||
json_build_inconsistent_number_r_w_tables=读写表数量不一致
|
264
czsj-admin/src/main/resources/i18n/message_en.properties
Normal file
264
czsj-admin/src/main/resources/i18n/message_en.properties
Normal file
@ -0,0 +1,264 @@
|
||||
admin_name=Scheduling Center
|
||||
admin_name_full=Distributed Task Scheduling Platform XXL-JOB
|
||||
admin_version=2.1.1
|
||||
admin_i18n=en
|
||||
|
||||
## system
|
||||
system_tips=System message
|
||||
system_ok=Confirm
|
||||
system_close=Close
|
||||
system_save=Save
|
||||
system_cancel=Cancel
|
||||
system_search=Search
|
||||
system_status=Status
|
||||
system_opt=Operate
|
||||
system_please_input=please input
|
||||
system_please_choose=please choose
|
||||
system_success=success
|
||||
system_fail=fail
|
||||
system_add_suc=add success
|
||||
system_add_fail=add fail
|
||||
system_update_suc=update success
|
||||
system_update_fail=update fail
|
||||
system_all=All
|
||||
system_api_error=net error
|
||||
system_show=Show
|
||||
system_empty=Empty
|
||||
system_opt_suc=operate success
|
||||
system_opt_fail=operate fail
|
||||
system_opt_edit=Edit
|
||||
system_opt_del=Delete
|
||||
system_invalid=illegal
|
||||
system_not_found=not exist
|
||||
system_nav=Navigation
|
||||
system_digits=digits
|
||||
system_length_limit=Length limit
|
||||
system_permission_limit=Permission limit
|
||||
system_welcome=Welcome
|
||||
|
||||
## daterangepicker
|
||||
daterangepicker_ranges_recent_hour=recent one hour
|
||||
daterangepicker_ranges_today=today
|
||||
daterangepicker_ranges_yesterday=yesterday
|
||||
daterangepicker_ranges_this_month=this month
|
||||
daterangepicker_ranges_last_month=last month
|
||||
daterangepicker_ranges_recent_week=recent one week
|
||||
daterangepicker_ranges_recent_month=recent one month
|
||||
daterangepicker_custom_name=custom
|
||||
daterangepicker_custom_starttime=start time
|
||||
daterangepicker_custom_endtime=end time
|
||||
daterangepicker_custom_daysofweek=Sun,Mon,Tue,Wed,Thu,Fri,Sat
|
||||
daterangepicker_custom_monthnames=Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec
|
||||
|
||||
## dataTable
|
||||
dataTable_sProcessing=processing...
|
||||
dataTable_sLengthMenu= _MENU_ records per page
|
||||
dataTable_sZeroRecords=No matching results
|
||||
dataTable_sInfo=page _PAGE_ ( Total _PAGES_ pages,_TOTAL_ records )
|
||||
dataTable_sInfoEmpty=No Record
|
||||
dataTable_sInfoFiltered=(Filtered by _MAX_ results)
|
||||
dataTable_sSearch=Search
|
||||
dataTable_sEmptyTable=Table data is empty
|
||||
dataTable_sLoadingRecords=Loading...
|
||||
dataTable_sFirst=FIRST PAGE
|
||||
dataTable_sPrevious=Previous Page
|
||||
dataTable_sNext=Next Page
|
||||
dataTable_sLast=LAST PAGE
|
||||
dataTable_sSortAscending=: Rank this column in ascending order
|
||||
dataTable_sSortDescending=: Rank this column in descending order
|
||||
|
||||
## login
|
||||
login_btn=Login
|
||||
login_remember_me=Remember Me
|
||||
login_username_placeholder=Please enter username
|
||||
login_password_placeholder=Please enter password
|
||||
login_username_empty=Please enter username
|
||||
login_username_lt_4=Username length should not be less than 4
|
||||
login_password_empty=Please enter password
|
||||
login_password_lt_4=Password length should not be less than 4
|
||||
login_success=Login success
|
||||
login_fail=Login fail
|
||||
login_param_empty=Username or password is empty
|
||||
login_param_invalid=Username or password error
|
||||
|
||||
## logout
|
||||
logout_btn=Logout
|
||||
logout_confirm=Confirm logout?
|
||||
logout_success=Logout success
|
||||
logout_fail=Logout fail
|
||||
|
||||
## change pwd
|
||||
change_pwd=Change password
|
||||
change_pwd_suc_to_logout=Change password successful, about to log out login
|
||||
change_pwd_field_newpwd=new password
|
||||
|
||||
## dashboard
|
||||
job_dashboard_name=Run report
|
||||
job_dashboard_job_num=Job number
|
||||
job_dashboard_job_num_tip=The number of tasks running in the scheduling center
|
||||
job_dashboard_trigger_num=trigger number
|
||||
job_dashboard_trigger_num_tip=The number of trigger record scheduled by the scheduling center
|
||||
job_dashboard_jobgroup_num=Executor number
|
||||
job_dashboard_jobgroup_num_tip=The number of online executor machines perceived by the scheduling center
|
||||
job_dashboard_report=Scheduling report
|
||||
job_dashboard_report_loaddata_fail=Scheduling report load data error
|
||||
job_dashboard_date_report=Date distribution
|
||||
job_dashboard_rate_report=Percentage distribution
|
||||
|
||||
## job info
|
||||
jobinfo_name=Job Manage
|
||||
jobinfo_job=Job
|
||||
jobinfo_field_add=Add Job
|
||||
jobinfo_field_update=Edit Job
|
||||
jobinfo_field_id=Job ID
|
||||
jobinfo_field_jobgroup=Executor
|
||||
jobinfo_field_jobproject=job Project
|
||||
jobinfo_field_jobdesc=Job description
|
||||
jobinfo_field_jobJSON=Job JSON
|
||||
jobinfo_field_timeout=Job timeout period
|
||||
jobinfo_field_gluetype=GLUE Type
|
||||
jobinfo_field_executorparam=Param
|
||||
jobinfo_field_cron_invalid=The Cron is illegal
|
||||
jobinfo_field_cron_never_fire=The Cron will never fire
|
||||
jobinfo_field_author=Author
|
||||
jobinfo_field_alarmemail=Alarm email
|
||||
jobinfo_field_alarmemail_placeholder=Please enter alarm mail, if there are more than one comma separated
|
||||
jobinfo_field_executorRouteStrategy=Route Strategy
|
||||
jobinfo_field_childJobId=Child Job ID
|
||||
jobinfo_field_childJobId_placeholder=Please enter the Child job ID, if there are more than one comma separated
|
||||
jobinfo_field_executorBlockStrategy=Block Strategy
|
||||
jobinfo_field_executorFailRetryCount=Fail Retry Count
|
||||
jobinfo_field_executorFailRetryCount_placeholder=Fail Retry Count. effect if greater than zero
|
||||
jobinfo_script_location=Script location
|
||||
jobinfo_shard_index=Shard index
|
||||
jobinfo_shard_total=Shard total
|
||||
jobinfo_opt_stop=Stop
|
||||
jobinfo_opt_start=Start
|
||||
jobinfo_opt_log=Query Log
|
||||
jobinfo_opt_run=Run Once
|
||||
jobinfo_opt_registryinfo=Registry Info
|
||||
jobinfo_opt_next_time=Next trigger time
|
||||
jobinfo_glue_remark=Resource Remark
|
||||
jobinfo_glue_remark_limit=Resource Remark length is limited to 4~100
|
||||
jobinfo_glue_rollback=Version Backtrack
|
||||
jobinfo_glue_jobid_invalid=Job ID is illegal
|
||||
jobinfo_glue_gluetype_invalid=The job is not GLUE Type
|
||||
jobinfo_field_executorTimeout_placeholder=Job Timeout period,in seconds. effect if greater than zero
|
||||
|
||||
## job log
|
||||
joblog_name=Trigger Log
|
||||
joblog_status=Status
|
||||
joblog_status_all=All
|
||||
joblog_status_suc=Success
|
||||
joblog_status_fail=Fail
|
||||
joblog_status_running=Running
|
||||
joblog_field_triggerTime=Trigger Time
|
||||
joblog_field_triggerCode=Trigger Result
|
||||
joblog_field_triggerMsg=Trigger Msg
|
||||
joblog_field_handleTime=Handle Time
|
||||
joblog_field_handleCode=Handle Result
|
||||
joblog_field_handleMsg=Trigger Msg
|
||||
joblog_field_executorAddress=Executor Address
|
||||
joblog_clean=Clean
|
||||
joblog_clean_log=Clean Log
|
||||
joblog_clean_type=Clean Type
|
||||
joblog_clean_type_1=Clean up log data a month ago
|
||||
joblog_clean_type_2=Clean up log data three month ago
|
||||
joblog_clean_type_3=Clean up log data six month ago
|
||||
joblog_clean_type_4=Clean up log data a year ago
|
||||
joblog_clean_type_5=Clean up log data a thousand record ago
|
||||
joblog_clean_type_6=Clean up log data ten thousand record ago
|
||||
joblog_clean_type_7=Clean up log data thirty thousand record ago
|
||||
joblog_clean_type_8=Clean up log data hundred thousand record ago
|
||||
joblog_clean_type_9=Clean up all log data
|
||||
joblog_clean_type_invalid=Clean type is illegal
|
||||
joblog_handleCode_200=Success
|
||||
joblog_handleCode_500=Fail
|
||||
joblog_handleCode_502=Timeout
|
||||
joblog_kill_log=Kill Job
|
||||
joblog_kill_log_limit=Trigger Fail, can not kill job
|
||||
joblog_kill_log_byman=Manual operation to active kill job
|
||||
joblog_rolling_log=Rolling log
|
||||
joblog_rolling_log_refresh=Refresh
|
||||
joblog_rolling_log_triggerfail=The job trigger fail, can not view the rolling log
|
||||
joblog_rolling_log_failoften=The request for the Rolling log is terminated, the number of failed requests exceeds the limit, Reload the log on the refresh page
|
||||
joblog_logid_invalid=Log ID is illegal
|
||||
|
||||
## job group
|
||||
jobgroup_name=Executor Manage
|
||||
jobgroup_list=Executor List
|
||||
jobgroup_add=Add Executor
|
||||
jobgroup_edit=Edit Executor
|
||||
jobgroup_del=Delete Executor
|
||||
jobgroup_field_order=Order
|
||||
jobgroup_field_title=Title
|
||||
jobgroup_field_addressType=Registry Type
|
||||
jobgroup_field_addressType_0=Automatic registration
|
||||
jobgroup_field_addressType_1=Manual registration
|
||||
jobgroup_field_addressType_limit=Manually registration type, the machine address must not be empty
|
||||
jobgroup_field_registryList=machine address
|
||||
jobgroup_field_registryList_invalid=registry machine address is illegal
|
||||
jobgroup_field_registryList_placeholder=Please enter the machine address, if there are more than one comma separated
|
||||
jobgroup_field_appName_limit=Limit the beginning of a lowercase letter, consists of lowercase letters、number and hyphen.
|
||||
jobgroup_field_appName_length=AppName length is limited to 4~64
|
||||
jobgroup_field_title_length=Title length is limited to 4~12
|
||||
jobgroup_field_order_digits=Please enter a positive integer
|
||||
jobgroup_field_orderrange=Order is limited to 1~1000
|
||||
jobgroup_del_limit_0=Refuse to delete, the executor is being used
|
||||
jobgroup_del_limit_1=Refuses to delete, the system retains at least one executor
|
||||
jobgroup_empty=There is no valid executor. Please contact the administrator
|
||||
|
||||
## job conf
|
||||
jobconf_block_SERIAL_EXECUTION=Serial execution
|
||||
jobconf_block_DISCARD_LATER=Discard Later
|
||||
jobconf_block_COVER_EARLY=Cover Early
|
||||
jobconf_route_first=First
|
||||
jobconf_route_last=Last
|
||||
jobconf_route_round=Round
|
||||
jobconf_route_random=Random
|
||||
jobconf_route_consistenthash=Consistent Hash
|
||||
jobconf_route_lfu=Least Frequently Used
|
||||
jobconf_route_lru=Least Recently Used
|
||||
jobconf_route_failover=Failover
|
||||
jobconf_route_busyover=Busyover
|
||||
jobconf_route_shard=Sharding Broadcast
|
||||
jobconf_idleBeat=Idle check
|
||||
jobconf_beat=Heartbeats
|
||||
jobconf_monitor=Task Scheduling Center monitor alarm
|
||||
jobconf_monitor_detail=monitor alarm details
|
||||
jobconf_monitor_alarm_title=Alarm Type
|
||||
jobconf_monitor_alarm_type=Trigger Fail
|
||||
jobconf_monitor_alarm_content=Alarm Content
|
||||
jobconf_trigger_admin_adress=Trigger machine address
|
||||
jobconf_trigger_exe_regtype=Execotor-Registry Type
|
||||
jobconf_trigger_exe_regaddress=Execotor-Registry Address
|
||||
jobconf_trigger_address_empty=Trigger Fail:registry address is empty
|
||||
jobconf_trigger_run=Trigger Job
|
||||
jobconf_trigger_child_run=Trigger child job
|
||||
jobconf_callback_child_msg1={0}/{1} [Job ID={2}], Trigger {3}, Trigger msg: {4} <br>
|
||||
jobconf_callback_child_msg2={0}/{1} [Job ID={2}], Trigger Fail, Trigger msg: Job ID is illegal <br>
|
||||
jobconf_trigger_type=Job trigger type
|
||||
jobconf_trigger_type_cron=Cron trigger
|
||||
jobconf_trigger_type_manual=Manual trigger
|
||||
jobconf_trigger_type_parent=Parent job trigger
|
||||
jobconf_trigger_type_api=Api trigger
|
||||
jobconf_trigger_type_retry=Fail retry trigger
|
||||
|
||||
## user
|
||||
user_manage=User Manage
|
||||
user_username=Username
|
||||
user_password=Password
|
||||
user_role=Role
|
||||
user_role_admin=Admin User
|
||||
user_role_normal=Normal User
|
||||
user_permission=Permission
|
||||
user_add=Add User
|
||||
user_update=Edit User
|
||||
user_username_repeat=Username Repeat
|
||||
user_username_valid=Restrictions start with a lowercase letter and consist of lowercase letters and Numbers
|
||||
user_password_update_placeholder=Please input password, empty means not update
|
||||
user_update_loginuser_limit=Operation of current login account is not allowed
|
||||
|
||||
## help
|
||||
job_help=Tutorial
|
||||
job_help_document=Official Document
|
@ -0,0 +1,18 @@
|
||||
package com.czsj.common.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.mail.javamail.JavaMailSenderImpl;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class MailConfig {
|
||||
@Bean
|
||||
public JavaMailSenderImpl mailSender() {
|
||||
JavaMailSenderImpl javaMailSender = new JavaMailSenderImpl();
|
||||
|
||||
javaMailSender.setProtocol("SMTP");
|
||||
javaMailSender.setHost("smtp.qq.com");
|
||||
javaMailSender.setPort(465);
|
||||
return javaMailSender;
|
||||
}
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
package com.czsj.common.config;
|
||||
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.lang.reflect.InvocationHandler;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Proxy;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.Socket;
|
||||
|
||||
public class RPCClient<T> {
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <T> T getRemoteProxyObj(final Class<?> serviceInterface, final InetSocketAddress addr) {
|
||||
// 1.将本地的接口调用转换成JDK的动态代理,在动态代理中实现接口的远程调用
|
||||
return (T) Proxy.newProxyInstance(serviceInterface.getClassLoader(), new Class<?>[]{serviceInterface},
|
||||
new InvocationHandler() {
|
||||
@Override
|
||||
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
|
||||
Socket socket = null;
|
||||
ObjectOutputStream output = null;
|
||||
ObjectInputStream input = null;
|
||||
try {
|
||||
// 2.创建Socket客户端,根据指定地址连接远程服务提供者
|
||||
socket = new Socket();
|
||||
socket.connect(addr);
|
||||
|
||||
// 3.将远程服务调用所需的接口类、方法名、参数列表等编码后发送给服务提供者
|
||||
output = new ObjectOutputStream(socket.getOutputStream());
|
||||
output.writeUTF(serviceInterface.getName());
|
||||
output.writeUTF(method.getName());
|
||||
output.writeObject(method.getParameterTypes());
|
||||
output.writeObject(args);
|
||||
|
||||
// 4.同步阻塞等待服务器返回应答,获取应答后返回
|
||||
input = new ObjectInputStream(socket.getInputStream());
|
||||
return input.readObject();
|
||||
} finally {
|
||||
if (socket != null){
|
||||
socket.close();}
|
||||
if (output != null){
|
||||
output.close();}
|
||||
if (input != null){
|
||||
input.close();}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -111,8 +111,9 @@ public class SecurityConfig
|
||||
.authorizeHttpRequests((requests) -> {
|
||||
permitAllUrl.getUrls().forEach(url -> requests.antMatchers(url).permitAll());
|
||||
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
|
||||
requests.antMatchers("/login", "/register", "/captchaImage").permitAll()
|
||||
// 静态资源,可匿名访问
|
||||
requests.antMatchers("/login", "/register", "/captchaImage","/log/*","/alarmCallback","/flink/uploadJar/upload").permitAll()
|
||||
.antMatchers("/api/callback","/api/processCallback","/api/registry","/api/registryRemove","/inner/**").permitAll()
|
||||
// 静态资源,可匿名访问
|
||||
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
|
||||
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
|
||||
// 除上面外的所有请求全部需要鉴权认证
|
||||
|
@ -61,11 +61,6 @@ public class DruidProperties
|
||||
/** 配置获取连接等待超时的时间 */
|
||||
datasource.setMaxWait(maxWait);
|
||||
|
||||
/** 配置驱动连接超时时间,检测数据库建立连接的超时时间,单位是毫秒 */
|
||||
datasource.setConnectTimeout(connectTimeout);
|
||||
|
||||
/** 配置网络超时时间,等待数据库操作完成的网络超时时间,单位是毫秒 */
|
||||
datasource.setSocketTimeout(socketTimeout);
|
||||
|
||||
/** 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 */
|
||||
datasource.setTimeBetweenEvictionRunsMillis(timeBetweenEvictionRunsMillis);
|
||||
|
@ -1,13 +1,12 @@
|
||||
package com.czsj.bigdata.core.util;
|
||||
|
||||
import com.sun.mail.util.MailSSLSocketFactory;
|
||||
|
||||
import javax.mail.*;
|
||||
import javax.mail.internet.InternetAddress;
|
||||
import javax.mail.internet.MimeMessage;
|
||||
import java.util.Properties;
|
||||
|
||||
|
||||
|
||||
public class EmailUtil {
|
||||
|
||||
public static void send(String emailUserName,String emailPassword,String emailAuthorization,String SJemailUserName,String title,String msg) throws Exception{
|
||||
|
@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.czsj.bigdata.mapper.APIAuthMapper">
|
||||
|
||||
<resultMap id="APIAuth" type="com.czsj.bigdata.entity.APIAuth">
|
||||
<result column="id" property="id"/>
|
||||
<result column="token_id" property="token_id"/>
|
||||
<result column="group_id" property="group_id"/>
|
||||
<result column="updatetime" property="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Show_Column_List">
|
||||
t.id,
|
||||
t.token_id,
|
||||
t.group_id,
|
||||
t.update_time
|
||||
</sql>
|
||||
|
||||
<delete id="delete" parameterType="java.util.HashMap">
|
||||
DELETE
|
||||
FROM lark_api_auth
|
||||
WHERE id = #{id}
|
||||
</delete>
|
||||
|
||||
<select id="findAll" resultMap="APIAuth">
|
||||
SELECT <include refid="Show_Column_List" />
|
||||
FROM lark_api_auth AS t
|
||||
ORDER BY t.id ASC
|
||||
</select>
|
||||
|
||||
<select id="getById" parameterType="java.util.HashMap" resultMap="APIAuth">
|
||||
SELECT <include refid="Show_Column_List" />
|
||||
FROM lark_api_auth AS t
|
||||
WHERE t.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="save" parameterType="com.czsj.bigdata.entity.APIAuth" useGeneratedKeys="true" keyProperty="id" >
|
||||
INSERT INTO lark_api_auth (
|
||||
token_id,
|
||||
group_id,
|
||||
update_time
|
||||
) VALUES (
|
||||
#{token_id},
|
||||
#{group_id},
|
||||
#{update_time}
|
||||
);
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="com.czsj.bigdata.entity.APIAuth" >
|
||||
UPDATE lark_api_auth
|
||||
SET
|
||||
token_id = #{token_id},
|
||||
group_id = #{group_id},
|
||||
update_time = #{update_time}
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
</mapper>
|
@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.czsj.bigdata.mapper.BaseResourceMapper">
|
||||
|
||||
<resultMap id="BaseResource" type="com.czsj.bigdata.entity.BaseResource">
|
||||
<result column="id" property="id"/>
|
||||
<result column="name" property="name"/>
|
||||
<result column="resource_address" property="resource_address"/>
|
||||
<result column="updatetime" property="update_time" />
|
||||
<result column="serverIp" property="serverIp" />
|
||||
<result column="serverUser" property="serverUser" />
|
||||
<result column="serverPassword" property="serverPassword" />
|
||||
<result column="type" property="type" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
<sql id="Show_Column_List">
|
||||
t.id,
|
||||
t.name,
|
||||
t.resource_address,
|
||||
t.update_time,
|
||||
t.serverIp,
|
||||
t.serverUser,
|
||||
t.serverPassword,
|
||||
t.type
|
||||
</sql>
|
||||
|
||||
<delete id="delete" parameterType="java.util.HashMap">
|
||||
DELETE
|
||||
FROM lark_base_resource
|
||||
WHERE id = #{id}
|
||||
</delete>
|
||||
|
||||
<select id="findList" parameterType="java.util.HashMap" resultMap="BaseResource">
|
||||
SELECT <include refid="Show_Column_List" />
|
||||
FROM lark_base_resource AS t
|
||||
<trim prefix="WHERE" prefixOverrides="AND | OR">
|
||||
<if test="name != null and name != ''">
|
||||
AND t.name like CONCAT(CONCAT('%', #{name}), '%')
|
||||
</if>
|
||||
</trim>
|
||||
ORDER BY t.id ASC
|
||||
LIMIT #{offset}, #{pagesize}
|
||||
</select>
|
||||
|
||||
<select id="getResource" parameterType="java.util.HashMap" resultMap="BaseResource">
|
||||
SELECT <include refid="Show_Column_List" />
|
||||
FROM lark_base_resource AS t
|
||||
where type = '1'
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getById" parameterType="java.util.HashMap" resultMap="BaseResource">
|
||||
SELECT <include refid="Show_Column_List" />
|
||||
FROM lark_base_resource AS t
|
||||
WHERE t.id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="getFileResource" parameterType="java.util.HashMap" resultType="com.czsj.bigdata.entity.BaseResource">
|
||||
SELECT <include refid="Show_Column_List" />
|
||||
FROM lark_base_resource AS t
|
||||
where type = '2'
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="save" parameterType="com.czsj.bigdata.entity.BaseResource" useGeneratedKeys="true" keyProperty="id" >
|
||||
INSERT INTO lark_base_resource (
|
||||
`name`,
|
||||
resource_address,
|
||||
update_time,
|
||||
serverIp,
|
||||
serverUser,
|
||||
serverPassword,
|
||||
type
|
||||
) VALUES (
|
||||
#{name},
|
||||
#{resource_address},
|
||||
#{update_time},
|
||||
#{serverIp},
|
||||
#{serverUser},
|
||||
#{serverPassword},
|
||||
#{type}
|
||||
);
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="com.czsj.bigdata.entity.BaseResource" >
|
||||
UPDATE lark_base_resource
|
||||
SET
|
||||
`name` = #{name},
|
||||
resource_address = #{resource_address},
|
||||
update_time = #{update_time},
|
||||
serverIp = #{serverIp},
|
||||
serverUser = #{serverUser},
|
||||
serverPassword = #{serverPassword},
|
||||
type = #{type}
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
</mapper>
|
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.czsj.bigdata.mapper.DevEnvSettingMapper">
|
||||
|
||||
<select id="getDevEnvSettingListPaging" resultType="com.czsj.bigdata.entity.DevEnvSetting">
|
||||
select
|
||||
p.*,u.username
|
||||
from dev_env_setting p
|
||||
join user u on p.user_id = u.id
|
||||
where p.flag=1
|
||||
<if test="searchName!=null and searchName != ''">
|
||||
and p.name like concat('%', #{searchName}, '%')
|
||||
</if>
|
||||
order by p.create_time desc
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,72 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.czsj.bigdata.mapper.DevJarMapper">
|
||||
|
||||
|
||||
<resultMap id="DevTask" type="com.czsj.bigdata.entity.DevTask">
|
||||
<result column="id" property="id"/>
|
||||
<result column="name" property="name"/>
|
||||
<result column="tasktype" property="tasktype"/>
|
||||
<result column="runtype" property="runtype" />
|
||||
<result column="sql_text" property="sql_text" />
|
||||
<result column="run_param" property="run_param" />
|
||||
<result column="jarpath" property="jarpath" />
|
||||
<result column="task_describe" property="task_describe" />
|
||||
<result column="create_time" property="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Show_Column_List">
|
||||
t.id,
|
||||
t.name,
|
||||
t.tasktype,
|
||||
t.runtype,
|
||||
t.sql_text,
|
||||
t.run_param,
|
||||
t.jarpath,
|
||||
t.task_describe,
|
||||
t.create_time
|
||||
</sql>
|
||||
|
||||
<insert id="save" parameterType="com.czsj.bigdata.entity.DevTask" useGeneratedKeys="true" keyProperty="id" >
|
||||
INSERT INTO lark_dev_tasklist (
|
||||
`name`,
|
||||
tasktype,
|
||||
runtype,
|
||||
run_param,
|
||||
jarpath,
|
||||
task_describe,
|
||||
create_time,
|
||||
`type`,
|
||||
sql_text
|
||||
) VALUES (
|
||||
#{name},
|
||||
#{tasktype},
|
||||
#{runtype},
|
||||
#{run_param},
|
||||
#{jarpath},
|
||||
#{task_describe},
|
||||
#{create_time},
|
||||
#{type},
|
||||
#{sql_text}
|
||||
);
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="com.czsj.bigdata.entity.DevTask" >
|
||||
UPDATE lark_dev_tasklist
|
||||
SET
|
||||
`name` = #{name},
|
||||
tasktype = #{tasktype},
|
||||
runtype = #{runtype},
|
||||
run_param = #{run_param},
|
||||
jarpath = #{jarpath},
|
||||
task_describe = #{task_describe},
|
||||
create_time = #{create_time},
|
||||
sql_text= #{sql_text}
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
<select id="getById" parameterType="java.util.HashMap" resultMap="DevTask">
|
||||
SELECT <include refid="Show_Column_List" />
|
||||
FROM lark_dev_tasklist AS t
|
||||
WHERE t.id = #{id}
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.czsj.bigdata.mapper.DevSQLMapper">
|
||||
|
||||
|
||||
<resultMap id="DevTask" type="com.czsj.bigdata.entity.DevTask">
|
||||
<result column="id" property="id"/>
|
||||
<result column="name" property="name"/>
|
||||
<result column="tasktype" property="tasktype"/>
|
||||
<result column="runtype" property="runtype" />
|
||||
<result column="sql_text" property="sql_text" />
|
||||
<result column="run_param" property="run_param" />
|
||||
<result column="jarpath" property="jarpath" />
|
||||
<result column="task_describe" property="task_describe" />
|
||||
<result column="create_time" property="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Show_Column_List">
|
||||
t.id,
|
||||
t.name,
|
||||
t.tasktype,
|
||||
t.runtype,
|
||||
t.sql_text,
|
||||
t.run_param,
|
||||
t.jarpath,
|
||||
t.task_describe,
|
||||
t.create_time
|
||||
</sql>
|
||||
|
||||
<insert id="save" parameterType="com.czsj.bigdata.entity.DevTask" useGeneratedKeys="true" keyProperty="id" >
|
||||
INSERT INTO lark_dev_tasklist (
|
||||
`name`,
|
||||
tasktype,
|
||||
runtype,
|
||||
run_param,
|
||||
sql_text,
|
||||
task_describe,
|
||||
create_time
|
||||
) VALUES (
|
||||
#{name},
|
||||
#{tasktype},
|
||||
#{runtype},
|
||||
#{run_param},
|
||||
#{sql_text},
|
||||
#{task_describe},
|
||||
#{create_time}
|
||||
);
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="com.czsj.bigdata.entity.DevTask" >
|
||||
UPDATE lark_dev_tasklist
|
||||
SET
|
||||
`name` = #{name},
|
||||
tasktype = #{tasktype},
|
||||
runtype = #{runtype},
|
||||
run_param = #{run_param},
|
||||
sql_text = #{sql_text},
|
||||
task_describe = #{task_describe},
|
||||
create_time = #{create_time}
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
<select id="getById" parameterType="java.util.HashMap" resultMap="DevTask">
|
||||
SELECT <include refid="Show_Column_List" />
|
||||
FROM lark_dev_tasklist AS t
|
||||
WHERE t.id = #{id}
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.czsj.bigdata.mapper.DevTaskMapper">
|
||||
|
||||
<resultMap id="DevTask" type="com.czsj.bigdata.entity.DevTask">
|
||||
<result column="id" property="id"/>
|
||||
<result column="name" property="name"/>
|
||||
<result column="tasktype" property="tasktype"/>
|
||||
<result column="runtype" property="runtype" />
|
||||
<result column="sql_text" property="sql_text" />
|
||||
<result column="run_param" property="run_param" />
|
||||
<result column="jarpath" property="jarpath" />
|
||||
<result column="task_describe" property="task_describe" />
|
||||
<result column="create_time" property="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Show_Column_List">
|
||||
t.id,
|
||||
t.name,
|
||||
t.tasktype,
|
||||
t.runtype,
|
||||
t.sql_text,
|
||||
t.run_param,
|
||||
t.jarpath,
|
||||
t.task_describe,
|
||||
t.create_time
|
||||
</sql>
|
||||
|
||||
<delete id="delete" parameterType="java.util.HashMap">
|
||||
DELETE
|
||||
FROM lark_dev_tasklist
|
||||
WHERE id = #{id}
|
||||
</delete>
|
||||
|
||||
<select id="findList" parameterType="java.util.HashMap" resultMap="DevTask">
|
||||
SELECT <include refid="Show_Column_List" />
|
||||
FROM lark_dev_tasklist AS t
|
||||
<trim prefix="WHERE" prefixOverrides="AND | OR">
|
||||
<if test="type != null and type != ''">
|
||||
AND t.type = #{type}
|
||||
</if>
|
||||
</trim>
|
||||
ORDER BY t.id ASC
|
||||
LIMIT #{offset}, #{pagesize}
|
||||
</select>
|
||||
|
||||
<select id="findPath" parameterType="java.util.HashMap" resultType="java.lang.String">
|
||||
select prop_value from dev_env_setting where name = #{tasktype}
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.czsj.bigdata.mapper.JobDatasourceMapper">
|
||||
|
||||
<update id="update" parameterType="com.czsj.bigdata.entity.JobDatasource">
|
||||
UPDATE job_jdbc_datasource
|
||||
<set>
|
||||
<if test="datasourceName!=null">datasource_name = #{datasourceName},</if>
|
||||
<if test="datasource!=null">datasource = #{datasource},</if>
|
||||
<if test="datasourceGroup!=null">datasource_group = #{datasourceGroup},</if>
|
||||
<if test="jdbcUsername!=null">jdbc_username = #{jdbcUsername},</if>
|
||||
<if test="jdbcPassword!=null">jdbc_password = #{jdbcPassword},</if>
|
||||
<if test="jdbcUrl!=null">jdbc_url = #{jdbcUrl},</if>
|
||||
<if test="jdbcDriverClass!=null">jdbc_driver_class = #{jdbcDriverClass},</if>
|
||||
<if test="status!=null">status = #{status},</if>
|
||||
<if test="comments!=null">comments = #{comments},</if>
|
||||
<if test="databaseName!=null">database_name = #{databaseName},</if>
|
||||
</set>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<sql id="Show_Column_List">
|
||||
t.id,
|
||||
t.datasource_name,
|
||||
t.datasource,
|
||||
t.datasource_group,
|
||||
t.jdbc_username,
|
||||
t.jdbc_password,
|
||||
t.jdbc_url,
|
||||
t.jdbc_driver_class,
|
||||
t.status,
|
||||
t.create_by,
|
||||
t.create_date,
|
||||
t.update_date,
|
||||
t.comments,
|
||||
t.zk_adress,
|
||||
t.database_name,
|
||||
t.orcschema
|
||||
</sql>
|
||||
|
||||
<select id="getDataSourceById" parameterType="java.util.HashMap"
|
||||
resultType="com.czsj.bigdata.entity.JobDatasource">
|
||||
SELECT <include refid="Show_Column_List" />
|
||||
FROM job_jdbc_datasource AS t
|
||||
WHERE t.id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="findDataSourceName" resultType="com.czsj.bigdata.entity.JobDatasource">
|
||||
SELECT datasource_name,id,datasource
|
||||
FROM job_jdbc_datasource
|
||||
where datasource_group = 'warehouse_building'
|
||||
AND (database_name is null or database_name = '')
|
||||
ORDER BY id ASC
|
||||
</select>
|
||||
<select id="getdataSourceAll" resultType="com.czsj.bigdata.entity.JobDatasource">
|
||||
SELECT datasource_name,id,datasource
|
||||
FROM job_jdbc_datasource
|
||||
where datasource_group = 'warehouse_building'
|
||||
AND database_name is not null
|
||||
ORDER BY id ASC
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.czsj.bigdata.mapper.JobGroupMapper">
|
||||
|
||||
<resultMap id="JobGroup" type="com.czsj.bigdata.entity.JobGroup">
|
||||
<result column="id" property="id"/>
|
||||
<result column="app_name" property="appName"/>
|
||||
<result column="title" property="title"/>
|
||||
<result column="order" property="order"/>
|
||||
<result column="address_type" property="addressType"/>
|
||||
<result column="address_list" property="addressList"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
t.id,
|
||||
t.app_name,
|
||||
t.title,
|
||||
t.`order`,
|
||||
t.address_type,
|
||||
t.address_list
|
||||
</sql>
|
||||
|
||||
<select id="findAll" resultMap="JobGroup">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"/>
|
||||
FROM job_group AS t
|
||||
ORDER BY t.order ASC
|
||||
</select>
|
||||
|
||||
<select id="find" resultMap="JobGroup">
|
||||
select
|
||||
id,app_name,title,`order`,address_type,address_list
|
||||
from job_group
|
||||
<where>
|
||||
<if test="appName != null and appName != ''">
|
||||
and app_name like concat('%',#{appName,jdbcType=VARCHAR},'%')
|
||||
</if>
|
||||
<if test="title != null and title != ''">
|
||||
and title like concat('%',#{title,jdbcType=VARCHAR},'%')
|
||||
</if>
|
||||
<if test="addressList != null and addressList != ''">
|
||||
and address_list like concat('%',#{addressList,jdbcType=VARCHAR},'%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="findByAddressType" parameterType="java.lang.Integer" resultMap="JobGroup">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"/>
|
||||
FROM job_group AS t
|
||||
WHERE t.address_type = #{addressType}
|
||||
ORDER BY t.order ASC
|
||||
</select>
|
||||
|
||||
<insert id="save" parameterType="com.czsj.bigdata.entity.JobGroup" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO job_group ( `app_name`, `title`, `order`, `address_type`, `address_list`)
|
||||
values ( #{appName}, #{title}, #{order}, #{addressType}, #{addressList});
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="com.czsj.bigdata.entity.JobGroup">
|
||||
UPDATE job_group
|
||||
SET `app_name` = #{appName},
|
||||
`title` = #{title},
|
||||
`order` = #{order},
|
||||
`address_type` = #{addressType},
|
||||
`address_list` = #{addressList}
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="remove" parameterType="java.lang.Integer">
|
||||
DELETE FROM job_group
|
||||
WHERE id = #{id}
|
||||
</delete>
|
||||
|
||||
<select id="load" parameterType="java.lang.Integer" resultMap="JobGroup">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"/>
|
||||
FROM job_group AS t
|
||||
WHERE t.id = #{id}
|
||||
</select>
|
||||
|
||||
</mapper>
|
343
czsj-system/src/main/resources/mapper/bigdata/JobInfoMapper.xml
Normal file
343
czsj-system/src/main/resources/mapper/bigdata/JobInfoMapper.xml
Normal file
@ -0,0 +1,343 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.czsj.bigdata.mapper.JobInfoMapper">
|
||||
|
||||
<resultMap id="JobProject" type="com.czsj.bigdata.entity.JobInfo">
|
||||
<result column="project_id" property="projectId"/>
|
||||
</resultMap>
|
||||
<resultMap id="JobInfo" type="com.czsj.bigdata.entity.JobInfo" >
|
||||
<result column="id" property="id" />
|
||||
|
||||
<result column="job_group" property="jobGroup" />
|
||||
<result column="job_cron" property="jobCron" />
|
||||
<result column="job_desc" property="jobDesc" />
|
||||
|
||||
<result column="add_time" property="addTime" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
|
||||
<result column="user_id" property="userId" />
|
||||
<result column="alarm_email" property="alarmEmail" />
|
||||
|
||||
<result column="executor_route_strategy" property="executorRouteStrategy" />
|
||||
<result column="executor_handler" property="executorHandler" />
|
||||
<result column="executor_param" property="executorParam" />
|
||||
<result column="executor_block_strategy" property="executorBlockStrategy" />
|
||||
<result column="executor_timeout" property="executorTimeout" />
|
||||
<result column="executor_fail_retry_count" property="executorFailRetryCount" />
|
||||
|
||||
<result column="glue_type" property="glueType" />
|
||||
<result column="glue_source" property="glueSource" />
|
||||
<result column="glue_remark" property="glueRemark" />
|
||||
<result column="glue_updatetime" property="glueUpdatetime" />
|
||||
|
||||
<result column="child_jobid" property="childJobId" />
|
||||
|
||||
<result column="trigger_status" property="triggerStatus" />
|
||||
<result column="trigger_last_time" property="triggerLastTime" />
|
||||
<result column="trigger_next_time" property="triggerNextTime" />
|
||||
<result column="job_json" property="jobJson" />
|
||||
|
||||
<result column="replace_param" property="replaceParam" />
|
||||
<result column="jvm_param" property="jvmParam" />
|
||||
<result column="inc_start_time" property="incStartTime" />
|
||||
<result column="partition_info" property="partitionInfo" />
|
||||
|
||||
<result column="last_handle_code" property="lastHandleCode" />
|
||||
<result column="replace_param_type" property="replaceParamType" />
|
||||
<result column="project_id" property="projectId"/>
|
||||
|
||||
<result column="reader_table" property="readerTable" />
|
||||
<result column="primary_key" property="primaryKey" />
|
||||
<result column="inc_start_id" property="incStartId" />
|
||||
<result column="increment_type" property="incrementType" />
|
||||
<result column="datasource_id" property="datasourceId" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
t.id,
|
||||
t.job_group,
|
||||
t.job_cron,
|
||||
t.job_desc,
|
||||
t.add_time,
|
||||
t.update_time,
|
||||
t.user_id,
|
||||
t.alarm_email,
|
||||
t.executor_route_strategy,
|
||||
t.executor_handler,
|
||||
t.executor_param,
|
||||
t.executor_block_strategy,
|
||||
t.executor_timeout,
|
||||
t.executor_fail_retry_count,
|
||||
t.glue_type,
|
||||
t.glue_source,
|
||||
t.glue_remark,
|
||||
t.glue_updatetime,
|
||||
t.child_jobid,
|
||||
t.trigger_status,
|
||||
t.trigger_last_time,
|
||||
t.trigger_next_time,
|
||||
t.job_json,
|
||||
t.replace_param,
|
||||
t.jvm_param,
|
||||
t.inc_start_time,
|
||||
t.partition_info,
|
||||
t.last_handle_code,
|
||||
t.replace_param_type,
|
||||
t.project_id,
|
||||
t.reader_table,
|
||||
t.primary_key,
|
||||
t.inc_start_id,
|
||||
t.increment_type,
|
||||
t.datasource_id
|
||||
</sql>
|
||||
|
||||
<sql id="Project_Column_List">
|
||||
p.name as project_name
|
||||
</sql>
|
||||
<select id="pageList" parameterType="java.util.HashMap" resultMap="JobInfo">
|
||||
SELECT <include refid="Base_Column_List" />,<include refid="Project_Column_List" />
|
||||
FROM job_info AS t
|
||||
INNER JOIN job_project p on t.project_id=p.id
|
||||
<trim prefix="WHERE" prefixOverrides="AND | OR" >
|
||||
<if test="jobGroup gt 0">
|
||||
AND t.job_group = #{jobGroup}
|
||||
</if>
|
||||
<if test="triggerStatus gte 0">
|
||||
AND t.trigger_status = #{triggerStatus}
|
||||
</if>
|
||||
<if test="jobDesc != null and jobDesc != ''">
|
||||
AND t.job_desc like CONCAT(CONCAT('%', #{jobDesc}), '%')
|
||||
</if>
|
||||
<if test="glueType != null and glueType != ''">
|
||||
AND t.glue_type like CONCAT(CONCAT('%', #{glueType}), '%')
|
||||
</if>
|
||||
<if test="userId gt 0">
|
||||
AND t.user_id = #{userId}
|
||||
</if>
|
||||
<if test="projectIds != null and projectIds.length != 0">
|
||||
AND t.project_id IN
|
||||
<foreach collection="projectIds" item="projectId" index="index" open="(" close=")" separator=",">
|
||||
#{projectId}
|
||||
</foreach>
|
||||
</if>
|
||||
</trim>
|
||||
ORDER BY id DESC
|
||||
LIMIT #{offset}, #{pagesize}
|
||||
</select>
|
||||
|
||||
<select id="findAll" parameterType="java.util.HashMap" resultMap="JobInfo">
|
||||
SELECT <include refid="Base_Column_List" />
|
||||
FROM job_info AS t
|
||||
ORDER BY job_desc ASC
|
||||
</select>
|
||||
|
||||
<select id="pageListCount" parameterType="java.util.HashMap" resultType="int">
|
||||
SELECT count(1)
|
||||
FROM job_info AS t
|
||||
INNER JOIN job_project p on t.project_id=p.id
|
||||
<trim prefix="WHERE" prefixOverrides="AND | OR" >
|
||||
<if test="jobGroup gt 0">
|
||||
AND t.job_group = #{jobGroup}
|
||||
</if>
|
||||
<if test="triggerStatus gte 0">
|
||||
AND t.trigger_status = #{triggerStatus}
|
||||
</if>
|
||||
<if test="jobDesc != null and jobDesc != ''">
|
||||
AND t.job_desc like CONCAT(CONCAT('%', #{jobDesc}), '%')
|
||||
</if>
|
||||
<if test="glueType != null and glueType != ''">
|
||||
AND t.glue_type like CONCAT(CONCAT('%', #{glueType}), '%')
|
||||
</if>
|
||||
<if test="userId gt 0">
|
||||
AND t.user_id =#{userId}
|
||||
</if>
|
||||
<if test="projectIds != null and projectIds.length != 0">
|
||||
AND t.project_id IN
|
||||
<foreach collection="projectIds" item="projectId" index="index" open="(" close=")" separator=",">
|
||||
#{projectId}
|
||||
</foreach>
|
||||
</if>
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
<insert id="save" parameterType="com.czsj.bigdata.entity.JobInfo" useGeneratedKeys="true" keyProperty="id" >
|
||||
INSERT INTO job_info (
|
||||
job_group,
|
||||
job_cron,
|
||||
job_desc,
|
||||
add_time,
|
||||
update_time,
|
||||
user_id,
|
||||
alarm_email,
|
||||
executor_route_strategy,
|
||||
executor_handler,
|
||||
executor_param,
|
||||
executor_block_strategy,
|
||||
executor_timeout,
|
||||
executor_fail_retry_count,
|
||||
glue_type,
|
||||
glue_source,
|
||||
glue_remark,
|
||||
glue_updatetime,
|
||||
child_jobid,
|
||||
trigger_status,
|
||||
trigger_last_time,
|
||||
trigger_next_time,
|
||||
job_json,
|
||||
replace_param,
|
||||
jvm_param,
|
||||
inc_start_time,
|
||||
partition_info,
|
||||
last_handle_code,
|
||||
replace_param_type,
|
||||
project_id,
|
||||
reader_table,
|
||||
primary_key,
|
||||
inc_start_id,
|
||||
increment_type,
|
||||
datasource_id
|
||||
) VALUES (
|
||||
#{jobGroup},
|
||||
#{jobCron},
|
||||
#{jobDesc},
|
||||
#{addTime},
|
||||
#{updateTime},
|
||||
#{userId},
|
||||
#{alarmEmail},
|
||||
#{executorRouteStrategy},
|
||||
#{executorHandler},
|
||||
#{executorParam},
|
||||
#{executorBlockStrategy},
|
||||
#{executorTimeout},
|
||||
#{executorFailRetryCount},
|
||||
#{glueType},
|
||||
#{glueSource},
|
||||
#{glueRemark},
|
||||
#{glueUpdatetime},
|
||||
#{childJobId},
|
||||
#{triggerStatus},
|
||||
#{triggerLastTime},
|
||||
#{triggerNextTime},
|
||||
#{jobJson},
|
||||
#{replaceParam},
|
||||
#{jvmParam},
|
||||
#{incStartTime},
|
||||
#{partitionInfo},
|
||||
#{lastHandleCode},
|
||||
#{replaceParamType},
|
||||
#{projectId},
|
||||
#{readerTable},
|
||||
#{primaryKey},
|
||||
#{incStartId},
|
||||
#{incrementType},
|
||||
#{datasourceId}
|
||||
);
|
||||
<!--<selectKey resultType="java.lang.Integer" order="AFTER" keyProperty="id">
|
||||
SELECT LAST_INSERT_ID()
|
||||
/*SELECT @@IDENTITY AS id*/
|
||||
</selectKey>-->
|
||||
</insert>
|
||||
|
||||
<select id="loadById" parameterType="java.util.HashMap" resultMap="JobInfo">
|
||||
SELECT <include refid="Base_Column_List" />
|
||||
FROM job_info AS t
|
||||
WHERE t.id = #{id}
|
||||
</select>
|
||||
|
||||
<update id="update" parameterType="com.czsj.bigdata.entity.JobInfo" >
|
||||
UPDATE job_info
|
||||
SET
|
||||
job_group = #{jobGroup},
|
||||
job_cron = #{jobCron},
|
||||
job_desc = #{jobDesc},
|
||||
update_time = #{updateTime},
|
||||
user_id = #{userId},
|
||||
alarm_email = #{alarmEmail},
|
||||
executor_route_strategy = #{executorRouteStrategy},
|
||||
executor_handler = #{executorHandler},
|
||||
executor_param = #{executorParam},
|
||||
executor_block_strategy = #{executorBlockStrategy},
|
||||
executor_timeout = ${executorTimeout},
|
||||
executor_fail_retry_count = ${executorFailRetryCount},
|
||||
glue_type = #{glueType},
|
||||
glue_source = #{glueSource},
|
||||
glue_remark = #{glueRemark},
|
||||
glue_updatetime = #{glueUpdatetime},
|
||||
child_jobid = #{childJobId},
|
||||
trigger_status = #{triggerStatus},
|
||||
trigger_last_time = #{triggerLastTime},
|
||||
trigger_next_time = #{triggerNextTime},
|
||||
job_json=#{jobJson},
|
||||
replace_param=#{replaceParam},
|
||||
jvm_param=#{jvmParam},
|
||||
inc_start_time=#{incStartTime},
|
||||
partition_info=#{partitionInfo},
|
||||
last_handle_code=#{lastHandleCode},
|
||||
replace_param_type=#{replaceParamType},
|
||||
project_id=#{projectId},
|
||||
reader_table = #{readerTable},
|
||||
primary_key = #{primaryKey},
|
||||
inc_start_id = #{incStartId},
|
||||
increment_type = #{incrementType},
|
||||
datasource_id= #{datasourceId}
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="delete" parameterType="java.util.HashMap">
|
||||
DELETE
|
||||
FROM job_info
|
||||
WHERE id = #{id}
|
||||
</delete>
|
||||
|
||||
<select id="getJobsByGroup" parameterType="java.util.HashMap" resultMap="JobInfo">
|
||||
SELECT <include refid="Base_Column_List" />
|
||||
FROM job_info AS t
|
||||
WHERE t.job_group = #{jobGroup}
|
||||
</select>
|
||||
|
||||
<select id="findAllCount" resultType="int">
|
||||
SELECT count(1)
|
||||
FROM job_info
|
||||
</select>
|
||||
|
||||
|
||||
<select id="scheduleJobQuery" parameterType="java.util.HashMap" resultMap="JobInfo">
|
||||
SELECT <include refid="Base_Column_List" />
|
||||
FROM job_info AS t
|
||||
WHERE t.trigger_status = 1
|
||||
and t.trigger_next_time <![CDATA[ <= ]]> #{maxNextTime}
|
||||
ORDER BY id ASC
|
||||
LIMIT #{pagesize}
|
||||
</select>
|
||||
|
||||
<update id="scheduleUpdate" parameterType="com.czsj.bigdata.entity.JobInfo" >
|
||||
UPDATE job_info
|
||||
SET
|
||||
trigger_last_time = #{triggerLastTime},
|
||||
trigger_next_time = #{triggerNextTime},
|
||||
trigger_status = #{triggerStatus}
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="incrementTimeUpdate" parameterType="java.util.HashMap">
|
||||
UPDATE job_info
|
||||
SET
|
||||
inc_start_time = #{incStartTime}
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateLastHandleCode" parameterType="java.util.HashMap">
|
||||
UPDATE job_info
|
||||
SET
|
||||
last_handle_code = #{lastHandleCode}
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="incrementIdUpdate" parameterType="java.util.HashMap">
|
||||
UPDATE job_info
|
||||
SET
|
||||
inc_start_id = #{incStartId}
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,71 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.czsj.bigdata.mapper.JobLogGlueMapper">
|
||||
|
||||
<resultMap id="JobLogGlue" type="com.czsj.bigdata.entity.JobLogGlue" >
|
||||
<result column="id" property="id" />
|
||||
<result column="job_id" property="jobId" />
|
||||
<result column="glue_type" property="glueType" />
|
||||
<result column="glue_source" property="glueSource" />
|
||||
<result column="glue_remark" property="glueRemark" />
|
||||
<result column="add_time" property="addTime" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
t.id,
|
||||
t.job_id,
|
||||
t.glue_type,
|
||||
t.glue_source,
|
||||
t.glue_remark,
|
||||
t.add_time,
|
||||
t.update_time
|
||||
</sql>
|
||||
|
||||
<insert id="save" parameterType="com.czsj.bigdata.entity.JobLogGlue" useGeneratedKeys="true" keyProperty="id" >
|
||||
INSERT INTO job_logglue (
|
||||
`job_id`,
|
||||
`glue_type`,
|
||||
`glue_source`,
|
||||
`glue_remark`,
|
||||
`add_time`,
|
||||
`update_time`
|
||||
) VALUES (
|
||||
#{jobId},
|
||||
#{glueType},
|
||||
#{glueSource},
|
||||
#{glueRemark},
|
||||
#{addTime},
|
||||
#{updateTime}
|
||||
);
|
||||
<!--<selectKey resultType="java.lang.Integer" order="AFTER" keyProperty="id">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>-->
|
||||
</insert>
|
||||
|
||||
<select id="findByJobId" parameterType="java.lang.Integer" resultMap="JobLogGlue">
|
||||
SELECT <include refid="Base_Column_List" />
|
||||
FROM job_logglue AS t
|
||||
WHERE t.job_id = #{jobId}
|
||||
ORDER BY id DESC
|
||||
</select>
|
||||
|
||||
<delete id="removeOld" >
|
||||
DELETE FROM job_logglue
|
||||
WHERE id NOT in(
|
||||
SELECT id FROM(
|
||||
SELECT id FROM job_logglue
|
||||
WHERE `job_id` = #{jobId}
|
||||
ORDER BY update_time desc
|
||||
LIMIT 0, #{limit}
|
||||
) t1
|
||||
) AND `job_id` = #{jobId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByJobId" parameterType="java.lang.Integer" >
|
||||
DELETE FROM job_logglue
|
||||
WHERE `job_id` = #{jobId}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
269
czsj-system/src/main/resources/mapper/bigdata/JobLogMapper.xml
Normal file
269
czsj-system/src/main/resources/mapper/bigdata/JobLogMapper.xml
Normal file
@ -0,0 +1,269 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.czsj.bigdata.mapper.JobLogMapper">
|
||||
|
||||
<resultMap id="JobLog" type="com.czsj.bigdata.entity.JobLog" >
|
||||
<result column="id" property="id" />
|
||||
|
||||
<result column="job_group" property="jobGroup" />
|
||||
<result column="job_id" property="jobId" />
|
||||
<result column="job_desc" property="jobDesc" />
|
||||
|
||||
|
||||
<result column="executor_address" property="executorAddress" />
|
||||
<result column="executor_handler" property="executorHandler" />
|
||||
<result column="executor_param" property="executorParam" />
|
||||
<result column="executor_sharding_param" property="executorShardingParam" />
|
||||
<result column="executor_fail_retry_count" property="executorFailRetryCount" />
|
||||
|
||||
<result column="trigger_time" property="triggerTime" />
|
||||
<result column="trigger_code" property="triggerCode" />
|
||||
<result column="trigger_msg" property="triggerMsg" />
|
||||
|
||||
<result column="handle_time" property="handleTime" />
|
||||
<result column="handle_code" property="handleCode" />
|
||||
<result column="handle_msg" property="handleMsg" />
|
||||
|
||||
<result column="alarm_status" property="alarmStatus" />
|
||||
|
||||
<result column="process_id" property="processId" />
|
||||
<result column="max_id" property="maxId" />
|
||||
|
||||
<result column="job_desc" property="jobDesc" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
t.id,
|
||||
t.job_group,
|
||||
t.job_id,
|
||||
t.executor_address,
|
||||
t.executor_handler,
|
||||
t.executor_param,
|
||||
t.executor_sharding_param,
|
||||
t.executor_fail_retry_count,
|
||||
t.trigger_time,
|
||||
t.trigger_code,
|
||||
t.trigger_msg,
|
||||
t.handle_time,
|
||||
t.handle_code,
|
||||
t.handle_msg,
|
||||
t.alarm_status,
|
||||
t.process_id,
|
||||
t.max_id,
|
||||
t.job_desc
|
||||
</sql>
|
||||
|
||||
<select id="pageList" resultMap="JobLog">
|
||||
SELECT <include refid="Base_Column_List" />
|
||||
FROM job_log AS t
|
||||
<trim prefix="WHERE" prefixOverrides="AND | OR" >
|
||||
<if test="jobId==0 and jobGroup gt 0">
|
||||
AND t.job_group = #{jobGroup}
|
||||
</if>
|
||||
<if test="jobId gt 0">
|
||||
AND t.job_id = #{jobId}
|
||||
</if>
|
||||
<if test="triggerTimeStart != null">
|
||||
AND t.trigger_time <![CDATA[ >= ]]> #{triggerTimeStart}
|
||||
</if>
|
||||
<if test="triggerTimeEnd != null">
|
||||
AND t.trigger_time <![CDATA[ <= ]]> #{triggerTimeEnd}
|
||||
</if>
|
||||
<if test="logStatus == 1" >
|
||||
AND t.handle_code = 200
|
||||
</if>
|
||||
<if test="logStatus == 2" >
|
||||
AND (
|
||||
t.trigger_code NOT IN (0, 200) OR
|
||||
t.handle_code NOT IN (0, 200)
|
||||
)
|
||||
</if>
|
||||
<if test="logStatus == 3" >
|
||||
AND t.trigger_code = 200
|
||||
AND t.handle_code = 0
|
||||
</if>
|
||||
</trim>
|
||||
ORDER BY t.trigger_time DESC
|
||||
LIMIT #{offset}, #{pagesize}
|
||||
</select>
|
||||
|
||||
<select id="pageListCount" resultType="int">
|
||||
SELECT count(1)
|
||||
FROM job_log AS t
|
||||
<trim prefix="WHERE" prefixOverrides="AND | OR" >
|
||||
<if test="jobId==0 and jobGroup gt 0">
|
||||
AND t.job_group = #{jobGroup}
|
||||
</if>
|
||||
<if test="jobId gt 0">
|
||||
AND t.job_id = #{jobId}
|
||||
</if>
|
||||
<if test="triggerTimeStart != null">
|
||||
AND t.trigger_time <![CDATA[ >= ]]> #{triggerTimeStart}
|
||||
</if>
|
||||
<if test="triggerTimeEnd != null">
|
||||
AND t.trigger_time <![CDATA[ <= ]]> #{triggerTimeEnd}
|
||||
</if>
|
||||
<if test="logStatus == 1" >
|
||||
AND t.handle_code = 200
|
||||
</if>
|
||||
<if test="logStatus == 2" >
|
||||
AND (
|
||||
t.trigger_code NOT IN (0, 200) OR
|
||||
t.handle_code NOT IN (0, 200)
|
||||
)
|
||||
</if>
|
||||
<if test="logStatus == 3" >
|
||||
AND t.trigger_code = 200
|
||||
AND t.handle_code = 0
|
||||
</if>
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
<select id="load" parameterType="java.lang.Long" resultMap="JobLog">
|
||||
SELECT <include refid="Base_Column_List" />
|
||||
FROM job_log AS t
|
||||
WHERE t.id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="save" parameterType="com.czsj.bigdata.entity.JobLog" useGeneratedKeys="true" keyProperty="id" >
|
||||
INSERT INTO job_log (
|
||||
`job_group`,
|
||||
`job_id`,
|
||||
`job_desc`,
|
||||
`trigger_time`,
|
||||
`trigger_code`,
|
||||
`handle_code`
|
||||
) VALUES (
|
||||
#{jobGroup},
|
||||
#{jobId},
|
||||
#{jobDesc},
|
||||
#{triggerTime},
|
||||
#{triggerCode},
|
||||
#{handleCode}
|
||||
);
|
||||
<!--<selectKey resultType="java.lang.Integer" order="AFTER" keyProperty="id">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>-->
|
||||
</insert>
|
||||
|
||||
<update id="updateTriggerInfo" >
|
||||
UPDATE job_log
|
||||
SET
|
||||
`trigger_time`= #{triggerTime},
|
||||
`trigger_code`= #{triggerCode},
|
||||
`trigger_msg`= #{triggerMsg},
|
||||
`executor_address`= #{executorAddress},
|
||||
`executor_handler`=#{executorHandler},
|
||||
`executor_param`= #{executorParam},
|
||||
`executor_sharding_param`= #{executorShardingParam},
|
||||
`executor_fail_retry_count`= #{executorFailRetryCount},
|
||||
`max_id` = #{maxId}
|
||||
WHERE `id`= #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateHandleInfo">
|
||||
UPDATE job_log
|
||||
SET
|
||||
`handle_time`= #{handleTime},
|
||||
`handle_code`= #{handleCode},
|
||||
`handle_msg`= #{handleMsg}
|
||||
WHERE `id`= #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateProcessId">
|
||||
UPDATE job_log
|
||||
SET
|
||||
`process_id`= #{processId}
|
||||
WHERE `id`= #{id}
|
||||
</update>
|
||||
|
||||
<delete id="delete" >
|
||||
delete from job_log
|
||||
WHERE job_id = #{jobId}
|
||||
</delete>
|
||||
|
||||
<!--<select id="triggerCountByDay" resultType="java.util.Map" >
|
||||
SELECT
|
||||
DATE_FORMAT(trigger_time,'%Y-%m-%d') triggerDay,
|
||||
COUNT(handle_code) triggerDayCount,
|
||||
SUM(CASE WHEN (trigger_code in (0, 200) and handle_code = 0) then 1 else 0 end) as triggerDayCountRunning,
|
||||
SUM(CASE WHEN handle_code = 200 then 1 else 0 end) as triggerDayCountSuc
|
||||
FROM job_log
|
||||
WHERE trigger_time BETWEEN #{from} and #{to}
|
||||
GROUP BY triggerDay
|
||||
ORDER BY triggerDay
|
||||
</select>-->
|
||||
|
||||
<select id="findLogReport" resultType="java.util.Map" >
|
||||
SELECT
|
||||
COUNT(handle_code) triggerDayCount,
|
||||
COALESCE(SUM(CASE WHEN (trigger_code in (0, 200) and handle_code = 0) then 1 else 0 end),0) as triggerDayCountRunning,
|
||||
COALESCE(SUM(CASE WHEN handle_code = 200 then 1 else 0 end),0) as triggerDayCountSuc
|
||||
FROM job_log
|
||||
WHERE trigger_time BETWEEN #{from} and #{to}
|
||||
</select>
|
||||
|
||||
<select id="findClearLogIds" resultType="long" >
|
||||
SELECT id FROM job_log
|
||||
<trim prefix="WHERE" prefixOverrides="AND | OR" >
|
||||
<if test="jobGroup gt 0">
|
||||
AND job_group = #{jobGroup}
|
||||
</if>
|
||||
<if test="jobId gt 0">
|
||||
AND job_id = #{jobId}
|
||||
</if>
|
||||
<if test="clearBeforeTime != null">
|
||||
AND trigger_time <![CDATA[ <= ]]> #{clearBeforeTime}
|
||||
</if>
|
||||
<if test="clearBeforeNum gt 0">
|
||||
AND id NOT in(
|
||||
SELECT id FROM(
|
||||
SELECT id FROM job_log AS t
|
||||
<trim prefix="WHERE" prefixOverrides="AND | OR" >
|
||||
<if test="jobGroup gt 0">
|
||||
AND t.job_group = #{jobGroup}
|
||||
</if>
|
||||
<if test="jobId gt 0">
|
||||
AND t.job_id = #{jobId}
|
||||
</if>
|
||||
</trim>
|
||||
ORDER BY t.trigger_time desc
|
||||
LIMIT 0, #{clearBeforeNum}
|
||||
) t1
|
||||
)
|
||||
</if>
|
||||
</trim>
|
||||
order by id asc
|
||||
LIMIT #{pagesize}
|
||||
</select>
|
||||
|
||||
<delete id="clearLog" >
|
||||
delete from job_log
|
||||
WHERE id in
|
||||
<foreach collection="logIds" item="item" open="(" close=")" separator="," >
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="findFailJobLogIds" resultType="long" >
|
||||
SELECT id FROM `job_log`
|
||||
WHERE !(
|
||||
(trigger_code in (0, 200) and handle_code = 0)
|
||||
OR
|
||||
(handle_code = 200)
|
||||
)
|
||||
AND `alarm_status` = 0
|
||||
ORDER BY id ASC
|
||||
LIMIT #{pagesize}
|
||||
</select>
|
||||
|
||||
<update id="updateAlarmStatus" >
|
||||
UPDATE job_log
|
||||
SET
|
||||
`alarm_status` = #{newAlarmStatus}
|
||||
WHERE `id`= #{logId} AND `alarm_status` = #{oldAlarmStatus}
|
||||
</update>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.czsj.bigdata.mapper.JobLogReportMapper">
|
||||
|
||||
<resultMap id="JobLogReport" type="com.czsj.bigdata.entity.JobLogReport" >
|
||||
<result column="id" property="id" />
|
||||
<result column="trigger_day" property="triggerDay" />
|
||||
<result column="running_count" property="runningCount" />
|
||||
<result column="suc_count" property="sucCount" />
|
||||
<result column="fail_count" property="failCount" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
t.id,
|
||||
t.trigger_day,
|
||||
t.running_count,
|
||||
t.suc_count,
|
||||
t.fail_count
|
||||
</sql>
|
||||
|
||||
<insert id="save" parameterType="com.czsj.bigdata.entity.JobLogReport" useGeneratedKeys="true" keyProperty="id" >
|
||||
INSERT INTO job_log_report (
|
||||
`trigger_day`,
|
||||
`running_count`,
|
||||
`suc_count`,
|
||||
`fail_count`
|
||||
) VALUES (
|
||||
#{triggerDay},
|
||||
#{runningCount},
|
||||
#{sucCount},
|
||||
#{failCount}
|
||||
);
|
||||
<!--<selectKey resultType="java.lang.Integer" order="AFTER" keyProperty="id">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>-->
|
||||
</insert>
|
||||
|
||||
<update id="update" >
|
||||
UPDATE job_log_report
|
||||
SET `running_count` = #{runningCount},
|
||||
`suc_count` = #{sucCount},
|
||||
`fail_count` = #{failCount}
|
||||
WHERE `trigger_day` = #{triggerDay}
|
||||
</update>
|
||||
|
||||
<select id="queryLogReport" resultMap="JobLogReport">
|
||||
SELECT <include refid="Base_Column_List" />
|
||||
FROM job_log_report AS t
|
||||
WHERE t.trigger_day between #{triggerDayFrom} and #{triggerDayTo}
|
||||
ORDER BY t.trigger_day ASC
|
||||
</select>
|
||||
|
||||
<select id="queryLogReportTotal" resultMap="JobLogReport">
|
||||
SELECT
|
||||
SUM(running_count) running_count,
|
||||
SUM(suc_count) suc_count,
|
||||
SUM(fail_count) fail_count
|
||||
FROM job_log_report AS t
|
||||
</select>
|
||||
|
||||
<select id="getInfoReportCount" resultType="com.czsj.bigdata.entity.InfoReport">
|
||||
select resultCount,countType from (
|
||||
select count(*) as resultCount,"dbCount" as countType from job_jdbc_datasource
|
||||
union all
|
||||
select count(*) as resultCount,"tCount" as countType from job_info
|
||||
union all
|
||||
select count(*) as resultCount,"devCount" as countType from lark_dev_tasklist
|
||||
union all
|
||||
select count(*) as resultCount,"apiCount" as countType from lark_api_config
|
||||
) tab
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,93 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.czsj.bigdata.mapper.JobLogSysMapper">
|
||||
|
||||
<resultMap type="com.czsj.bigdata.entity.SysJobLog" id="SysJobLogResult">
|
||||
<id property="jobLogId" column="job_log_id" />
|
||||
<result property="jobName" column="job_name" />
|
||||
<result property="jobGroup" column="job_group" />
|
||||
<result property="invokeTarget" column="invoke_target" />
|
||||
<result property="jobMessage" column="job_message" />
|
||||
<result property="status" column="status" />
|
||||
<result property="exceptionInfo" column="exception_info" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectJobLogVo">
|
||||
select job_log_id, job_name, job_group, invoke_target, job_message, status, exception_info, create_time
|
||||
from sys_job_log
|
||||
</sql>
|
||||
|
||||
<select id="selectJobLogList" parameterType="com.czsj.bigdata.entity.SysJobLog" resultMap="SysJobLogResult">
|
||||
<include refid="selectJobLogVo"/>
|
||||
<where>
|
||||
<if test="jobName != null and jobName != ''">
|
||||
AND job_name like concat('%', #{jobName}, '%')
|
||||
</if>
|
||||
<if test="jobGroup != null and jobGroup != ''">
|
||||
AND job_group = #{jobGroup}
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
<if test="invokeTarget != null and invokeTarget != ''">
|
||||
AND invoke_target like concat('%', #{invokeTarget}, '%')
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectJobLogAll" resultMap="SysJobLogResult">
|
||||
<include refid="selectJobLogVo"/>
|
||||
</select>
|
||||
|
||||
<select id="selectJobLogById" parameterType="Long" resultMap="SysJobLogResult">
|
||||
<include refid="selectJobLogVo"/>
|
||||
where job_log_id = #{jobLogId}
|
||||
</select>
|
||||
|
||||
<delete id="deleteJobLogById" parameterType="Long">
|
||||
delete from sys_job_log where job_log_id = #{jobLogId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteJobLogByIds" parameterType="Long">
|
||||
delete from sys_job_log where job_log_id in
|
||||
<foreach collection="array" item="jobLogId" open="(" separator="," close=")">
|
||||
#{jobLogId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<update id="cleanJobLog">
|
||||
truncate table sys_job_log
|
||||
</update>
|
||||
|
||||
<insert id="insertJobLog" parameterType="com.czsj.bigdata.entity.SysJobLog">
|
||||
insert into sys_job_log(
|
||||
<if test="jobLogId != null and jobLogId != 0">job_log_id,</if>
|
||||
<if test="jobName != null and jobName != ''">job_name,</if>
|
||||
<if test="jobGroup != null and jobGroup != ''">job_group,</if>
|
||||
<if test="invokeTarget != null and invokeTarget != ''">invoke_target,</if>
|
||||
<if test="jobMessage != null and jobMessage != ''">job_message,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="exceptionInfo != null and exceptionInfo != ''">exception_info,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="jobLogId != null and jobLogId != 0">#{jobLogId},</if>
|
||||
<if test="jobName != null and jobName != ''">#{jobName},</if>
|
||||
<if test="jobGroup != null and jobGroup != ''">#{jobGroup},</if>
|
||||
<if test="invokeTarget != null and invokeTarget != ''">#{invokeTarget},</if>
|
||||
<if test="jobMessage != null and jobMessage != ''">#{jobMessage},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="exceptionInfo != null and exceptionInfo != ''">#{exceptionInfo},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.czsj.bigdata.mapper.JobProjectMapper">
|
||||
|
||||
<select id="getProjectListPaging" resultType="com.czsj.bigdata.entity.JobProject">
|
||||
select
|
||||
p.*
|
||||
from job_project p
|
||||
where p.flag=1
|
||||
<if test="searchName!=null and searchName != ''">
|
||||
and p.name like concat('%', #{searchName}, '%')
|
||||
</if>
|
||||
order by p.create_time desc
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,72 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.czsj.bigdata.mapper.JobRegistryMapper">
|
||||
|
||||
<resultMap id="JobRegistry" type="com.czsj.bigdata.entity.JobRegistry">
|
||||
<result column="id" property="id"/>
|
||||
<result column="registry_group" property="registryGroup"/>
|
||||
<result column="registry_key" property="registryKey"/>
|
||||
<result column="registry_value" property="registryValue"/>
|
||||
<result column="cpu_usage" property="cpuUsage"/>
|
||||
<result column="memory_usage" property="memoryUsage"/>
|
||||
<result column="load_average" property="loadAverage"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
t.id,
|
||||
t.registry_group,
|
||||
t.registry_key,
|
||||
t.registry_value,
|
||||
t.cpu_usage,
|
||||
t.memory_usage,
|
||||
t.load_average,
|
||||
t.update_time
|
||||
</sql>
|
||||
|
||||
<select id="findDead" parameterType="java.util.HashMap" resultType="java.lang.Integer">
|
||||
SELECT t.id
|
||||
FROM job_registry AS t
|
||||
WHERE t.update_time <![CDATA[ < ]]> DATE_ADD(#{nowTime},INTERVAL -#{timeout} SECOND)
|
||||
</select>
|
||||
|
||||
<delete id="removeDead" parameterType="java.lang.Integer">
|
||||
DELETE FROM job_registry
|
||||
WHERE id in
|
||||
<foreach collection="ids" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="findAll" parameterType="java.util.HashMap" resultMap="JobRegistry">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"/>
|
||||
FROM job_registry AS t
|
||||
WHERE t.update_time <![CDATA[ > ]]> DATE_ADD(#{nowTime},INTERVAL -#{timeout} SECOND)
|
||||
</select>
|
||||
|
||||
<update id="registryUpdate">
|
||||
UPDATE job_registry
|
||||
SET `update_time` = #{updateTime},
|
||||
`cpu_usage`=#{cpuUsage},
|
||||
`memory_usage`=#{memoryUsage},
|
||||
`load_average`=#{loadAverage}
|
||||
WHERE `registry_group` = #{registryGroup}
|
||||
AND `registry_key` = #{registryKey}
|
||||
AND `registry_value` = #{registryValue}
|
||||
</update>
|
||||
|
||||
<insert id="registrySave">
|
||||
INSERT INTO job_registry( `registry_group` , `registry_key` , `registry_value`, `cpu_usage`,`memory_usage`,`load_average`,`update_time`)
|
||||
VALUES( #{registryGroup} , #{registryKey} , #{registryValue},#{cpuUsage}, #{memoryUsage},#{loadAverage},#{updateTime})
|
||||
</insert>
|
||||
|
||||
<delete id="registryDelete">
|
||||
DELETE FROM job_registry
|
||||
WHERE registry_group = #{registryGroup}
|
||||
AND registry_key = #{registryKey}
|
||||
AND registry_value = #{registryValue}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
114
czsj-system/src/main/resources/mapper/bigdata/JobSysMapper.xml
Normal file
114
czsj-system/src/main/resources/mapper/bigdata/JobSysMapper.xml
Normal file
@ -0,0 +1,114 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.czsj.bigdata.mapper.JobSysMapper">
|
||||
|
||||
<resultMap type="com.czsj.bigdata.entity.SysJob" id="SysJobResult">
|
||||
<id property="jobId" column="job_id" />
|
||||
<result property="jobName" column="job_name" />
|
||||
<result property="jobGroup" column="job_group" />
|
||||
<result property="invokeTarget" column="invoke_target" />
|
||||
<result property="cronExpression" column="cron_expression" />
|
||||
<result property="misfirePolicy" column="misfire_policy" />
|
||||
<result property="concurrent" column="concurrent" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectJobVo">
|
||||
select job_id, job_name, job_group, invoke_target, cron_expression, misfire_policy, concurrent, status, create_by, create_time, remark
|
||||
from sys_job
|
||||
</sql>
|
||||
|
||||
<select id="selectJobList" parameterType="com.czsj.bigdata.entity.SysJob" resultMap="SysJobResult">
|
||||
<include refid="selectJobVo"/>
|
||||
<where>
|
||||
<if test="jobName != null and jobName != ''">
|
||||
AND job_name like concat('%', #{jobName}, '%')
|
||||
</if>
|
||||
<if test="jobGroup != null and jobGroup != ''">
|
||||
AND job_group = #{jobGroup}
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
<if test="invokeTarget != null and invokeTarget != ''">
|
||||
AND invoke_target like concat('%', #{invokeTarget}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectJobAll" resultMap="SysJobResult">
|
||||
<include refid="selectJobVo"/>
|
||||
</select>
|
||||
|
||||
<select id="selectJobById" parameterType="Long" resultMap="SysJobResult">
|
||||
<include refid="selectJobVo"/>
|
||||
where job_id = #{jobId}
|
||||
</select>
|
||||
<select id="selectJobBytarget" resultType="java.lang.Integer">
|
||||
select job_id from sys_job where invoke_target = #{target}
|
||||
</select>
|
||||
|
||||
<delete id="deleteJobById" parameterType="Long">
|
||||
delete from sys_job where job_id = #{jobId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteJobByIds" parameterType="Long">
|
||||
delete from sys_job where job_id in
|
||||
<foreach collection="array" item="jobId" open="(" separator="," close=")">
|
||||
#{jobId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<update id="updateJob" parameterType="com.czsj.bigdata.entity.SysJob">
|
||||
update sys_job
|
||||
<set>
|
||||
<if test="jobName != null and jobName != ''">job_name = #{jobName},</if>
|
||||
<if test="jobGroup != null and jobGroup != ''">job_group = #{jobGroup},</if>
|
||||
<if test="invokeTarget != null and invokeTarget != ''">invoke_target = #{invokeTarget},</if>
|
||||
<if test="cronExpression != null and cronExpression != ''">cron_expression = #{cronExpression},</if>
|
||||
<if test="misfirePolicy != null and misfirePolicy != ''">misfire_policy = #{misfirePolicy},</if>
|
||||
<if test="concurrent != null and concurrent != ''">concurrent = #{concurrent},</if>
|
||||
<if test="status !=null">status = #{status},</if>
|
||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where job_id = #{jobId}
|
||||
</update>
|
||||
|
||||
<insert id="insertJob" parameterType="com.czsj.bigdata.entity.SysJob" useGeneratedKeys="true" keyProperty="jobId">
|
||||
insert into sys_job(
|
||||
<if test="jobId != null and jobId != 0">job_id,</if>
|
||||
<if test="jobName != null and jobName != ''">job_name,</if>
|
||||
<if test="jobGroup != null and jobGroup != ''">job_group,</if>
|
||||
<if test="invokeTarget != null and invokeTarget != ''">invoke_target,</if>
|
||||
<if test="cronExpression != null and cronExpression != ''">cron_expression,</if>
|
||||
<if test="misfirePolicy != null and misfirePolicy != ''">misfire_policy,</if>
|
||||
<if test="concurrent != null and concurrent != ''">concurrent,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="jobId != null and jobId != 0">#{jobId},</if>
|
||||
<if test="jobName != null and jobName != ''">#{jobName},</if>
|
||||
<if test="jobGroup != null and jobGroup != ''">#{jobGroup},</if>
|
||||
<if test="invokeTarget != null and invokeTarget != ''">#{invokeTarget},</if>
|
||||
<if test="cronExpression != null and cronExpression != ''">#{cronExpression},</if>
|
||||
<if test="misfirePolicy != null and misfirePolicy != ''">#{misfirePolicy},</if>
|
||||
<if test="concurrent != null and concurrent != ''">#{concurrent},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,221 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.czsj.bigdata.mapper.JobTemplateMapper">
|
||||
|
||||
<resultMap id="JobTemplate" type="com.czsj.bigdata.entity.JobTemplate" >
|
||||
<result column="id" property="id" />
|
||||
|
||||
<result column="job_group" property="jobGroup" />
|
||||
<result column="job_cron" property="jobCron" />
|
||||
<result column="job_desc" property="jobDesc" />
|
||||
|
||||
<result column="add_time" property="addTime" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
|
||||
<result column="user_id" property="userId" />
|
||||
<result column="alarm_email" property="alarmEmail" />
|
||||
|
||||
<result column="executor_route_strategy" property="executorRouteStrategy" />
|
||||
<result column="executor_handler" property="executorHandler" />
|
||||
<result column="executor_param" property="executorParam" />
|
||||
<result column="executor_block_strategy" property="executorBlockStrategy" />
|
||||
<result column="executor_timeout" property="executorTimeout" />
|
||||
<result column="executor_fail_retry_count" property="executorFailRetryCount" />
|
||||
|
||||
<result column="glue_type" property="glueType" />
|
||||
<result column="glue_source" property="glueSource" />
|
||||
<result column="glue_remark" property="glueRemark" />
|
||||
<result column="glue_updatetime" property="glueUpdatetime" />
|
||||
|
||||
<result column="child_jobid" property="childJobId" />
|
||||
|
||||
<result column="trigger_last_time" property="triggerLastTime" />
|
||||
<result column="trigger_next_time" property="triggerNextTime" />
|
||||
<result column="job_json" property="jobJson" />
|
||||
|
||||
<result column="jvm_param" property="jvmParam" />
|
||||
<result column="project_id" property="projectId"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
t.id,
|
||||
t.job_group,
|
||||
t.job_cron,
|
||||
t.job_desc,
|
||||
t.add_time,
|
||||
t.update_time,
|
||||
t.user_id,
|
||||
t.alarm_email,
|
||||
t.executor_route_strategy,
|
||||
t.executor_handler,
|
||||
t.executor_param,
|
||||
t.executor_block_strategy,
|
||||
t.executor_timeout,
|
||||
t.executor_fail_retry_count,
|
||||
t.glue_type,
|
||||
t.glue_source,
|
||||
t.glue_remark,
|
||||
t.glue_updatetime,
|
||||
t.child_jobid,
|
||||
t.trigger_last_time,
|
||||
t.trigger_next_time,
|
||||
t.job_json,
|
||||
t.jvm_param,
|
||||
t.project_id
|
||||
</sql>
|
||||
|
||||
<sql id="Project_Column_List">
|
||||
p.name as project_name
|
||||
</sql>
|
||||
|
||||
<select id="pageList" parameterType="java.util.HashMap" resultMap="JobTemplate">
|
||||
SELECT <include refid="Base_Column_List" />,<include refid="Project_Column_List" />
|
||||
FROM job_template AS t
|
||||
INNER JOIN job_project p on t.project_id=p.id
|
||||
<trim prefix="WHERE" prefixOverrides="AND | OR" >
|
||||
<if test="jobGroup gt 0">
|
||||
AND t.job_group = #{jobGroup}
|
||||
</if>
|
||||
<if test="jobDesc != null and jobDesc != ''">
|
||||
AND t.job_desc like CONCAT(CONCAT('%', #{jobDesc}), '%')
|
||||
</if>
|
||||
<if test="executorHandler != null and executorHandler != ''">
|
||||
AND t.executor_handler like CONCAT(CONCAT('%', #{executorHandler}), '%')
|
||||
</if>
|
||||
<if test="userId gt 0">
|
||||
AND t.user_id = #{userId}
|
||||
</if>
|
||||
<if test="projectIds != null and projectIds.length != 0">
|
||||
AND t.project_id IN
|
||||
<foreach collection="projectIds" item="projectId" index="index" open="(" close=")" separator=",">
|
||||
#{projectId}
|
||||
</foreach>
|
||||
</if>
|
||||
</trim>
|
||||
ORDER BY id DESC
|
||||
LIMIT #{offset}, #{pagesize}
|
||||
</select>
|
||||
|
||||
<select id="pageListCount" parameterType="java.util.HashMap" resultType="int">
|
||||
SELECT count(1)
|
||||
FROM job_template AS t
|
||||
<trim prefix="WHERE" prefixOverrides="AND | OR" >
|
||||
<if test="jobGroup gt 0">
|
||||
AND t.job_group = #{jobGroup}
|
||||
</if>
|
||||
<if test="jobDesc != null and jobDesc != ''">
|
||||
AND t.job_desc like CONCAT(CONCAT('%', #{jobDesc}), '%')
|
||||
</if>
|
||||
<if test="executorHandler != null and executorHandler != ''">
|
||||
AND t.executor_handler like CONCAT(CONCAT('%', #{executorHandler}), '%')
|
||||
</if>
|
||||
<if test="userId gt 0">
|
||||
AND t.user_id = #{userId})
|
||||
</if>
|
||||
<if test="projectIds != null and projectIds.length != 0">
|
||||
AND t.project_id IN
|
||||
<foreach collection="projectIds" item="projectId" index="index" open="(" close=")" separator=",">
|
||||
#{projectId}
|
||||
</foreach>
|
||||
</if>
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
<insert id="save" parameterType="com.czsj.bigdata.entity.JobTemplate" useGeneratedKeys="true" keyProperty="id" >
|
||||
INSERT INTO job_template (
|
||||
job_group,
|
||||
job_cron,
|
||||
job_desc,
|
||||
add_time,
|
||||
update_time,
|
||||
user_id,
|
||||
alarm_email,
|
||||
executor_route_strategy,
|
||||
executor_handler,
|
||||
executor_param,
|
||||
executor_block_strategy,
|
||||
executor_timeout,
|
||||
executor_fail_retry_count,
|
||||
glue_type,
|
||||
glue_source,
|
||||
glue_remark,
|
||||
glue_updatetime,
|
||||
child_jobid,
|
||||
trigger_last_time,
|
||||
trigger_next_time,
|
||||
job_json,
|
||||
jvm_param,
|
||||
project_id
|
||||
) VALUES (
|
||||
#{jobGroup},
|
||||
#{jobCron},
|
||||
#{jobDesc},
|
||||
#{addTime},
|
||||
#{updateTime},
|
||||
#{userId},
|
||||
#{alarmEmail},
|
||||
#{executorRouteStrategy},
|
||||
#{executorHandler},
|
||||
#{executorParam},
|
||||
#{executorBlockStrategy},
|
||||
#{executorTimeout},
|
||||
#{executorFailRetryCount},
|
||||
#{glueType},
|
||||
#{glueSource},
|
||||
#{glueRemark},
|
||||
#{glueUpdatetime},
|
||||
#{childJobId},
|
||||
#{triggerLastTime},
|
||||
#{triggerNextTime},
|
||||
#{jobJson},
|
||||
#{jvmParam},
|
||||
#{projectId}
|
||||
);
|
||||
<!--<selectKey resultType="java.lang.Integer" order="AFTER" keyProperty="id">
|
||||
SELECT LAST_INSERT_ID()
|
||||
/*SELECT @@IDENTITY AS id*/
|
||||
</selectKey>-->
|
||||
</insert>
|
||||
|
||||
<select id="loadById" parameterType="java.util.HashMap" resultMap="JobTemplate">
|
||||
SELECT <include refid="Base_Column_List" />
|
||||
FROM job_template AS t
|
||||
WHERE t.id = #{id}
|
||||
</select>
|
||||
|
||||
<update id="update" parameterType="com.czsj.bigdata.entity.JobTemplate" >
|
||||
UPDATE job_template
|
||||
SET
|
||||
job_group = #{jobGroup},
|
||||
job_cron = #{jobCron},
|
||||
job_desc = #{jobDesc},
|
||||
update_time = #{updateTime},
|
||||
user_id = #{userId},
|
||||
alarm_email = #{alarmEmail},
|
||||
executor_route_strategy = #{executorRouteStrategy},
|
||||
executor_handler = #{executorHandler},
|
||||
executor_param = #{executorParam},
|
||||
executor_block_strategy = #{executorBlockStrategy},
|
||||
executor_timeout = ${executorTimeout},
|
||||
executor_fail_retry_count = ${executorFailRetryCount},
|
||||
glue_type = #{glueType},
|
||||
glue_source = #{glueSource},
|
||||
glue_remark = #{glueRemark},
|
||||
glue_updatetime = #{glueUpdatetime},
|
||||
child_jobid = #{childJobId},
|
||||
trigger_last_time = #{triggerLastTime},
|
||||
trigger_next_time = #{triggerNextTime},
|
||||
job_json=#{jobJson},
|
||||
jvm_param=#{jvmParam},
|
||||
project_id=#{projectId}
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="delete" parameterType="java.util.HashMap">
|
||||
DELETE
|
||||
FROM job_template
|
||||
WHERE id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
118
czsj-system/src/main/resources/mapper/bigdata/JobUserMapper.xml
Normal file
118
czsj-system/src/main/resources/mapper/bigdata/JobUserMapper.xml
Normal file
@ -0,0 +1,118 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.czsj.bigdata.mapper.JobUserMapper">
|
||||
|
||||
<resultMap id="JobUser" type="com.czsj.bigdata.entity.JobUser">
|
||||
<result column="id" property="id"/>
|
||||
<result column="username" property="username"/>
|
||||
<result column="password" property="password"/>
|
||||
<result column="role" property="role" />
|
||||
<result column="permission" property="permission" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
t.id,
|
||||
t.username,
|
||||
t.password,
|
||||
t.role,
|
||||
t.permission
|
||||
</sql>
|
||||
|
||||
<sql id="Show_Column_List">
|
||||
t.id,
|
||||
t.username,
|
||||
t.role,
|
||||
t.permission
|
||||
</sql>
|
||||
|
||||
<select id="pageList" parameterType="java.util.HashMap" resultMap="JobUser">
|
||||
SELECT <include refid="Show_Column_List" />
|
||||
FROM job_user AS t
|
||||
<trim prefix="WHERE" prefixOverrides="AND | OR">
|
||||
<if test="username != null and username != ''">
|
||||
AND t.username like CONCAT(CONCAT('%', #{username}), '%')
|
||||
</if>
|
||||
</trim>
|
||||
ORDER BY username ASC
|
||||
LIMIT #{offset}, #{pagesize}
|
||||
</select>
|
||||
|
||||
<select id="findAll" parameterType="java.util.HashMap" resultMap="JobUser">
|
||||
SELECT <include refid="Show_Column_List" />
|
||||
FROM job_user AS t
|
||||
<trim prefix="WHERE" prefixOverrides="AND | OR" >
|
||||
<if test="username != null and username != ''">
|
||||
AND t.username like CONCAT(CONCAT('%', #{username}), '%')
|
||||
</if>
|
||||
</trim>
|
||||
ORDER BY id ASC
|
||||
</select>
|
||||
|
||||
<select id="pageListCount" parameterType="java.util.HashMap" resultType="int">
|
||||
SELECT count(1)
|
||||
FROM job_user AS t
|
||||
<trim prefix="WHERE" prefixOverrides="AND | OR">
|
||||
<if test="username != null and username != ''">
|
||||
AND t.username like CONCAT(CONCAT('%', #{username}), '%')
|
||||
</if>
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
<select id="loadByUserName" parameterType="java.util.HashMap" resultMap="JobUser">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"/>
|
||||
FROM job_user AS t
|
||||
WHERE t.username = #{username}
|
||||
</select>
|
||||
|
||||
<select id="getUsersByIds" parameterType="java.util.HashMap" resultMap="JobUser">
|
||||
SELECT <include refid="Base_Column_List" />
|
||||
FROM job_user AS t
|
||||
WHERE t.username = #{username}
|
||||
WHERE t.id in
|
||||
<foreach collection="ids" item="id" index="index" open="(" close=")" separator=",">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="getUserById" parameterType="java.util.HashMap" resultMap="JobUser">
|
||||
SELECT
|
||||
t.id,
|
||||
t.username
|
||||
FROM job_user AS t
|
||||
WHERE t.id = #{userId}
|
||||
</select>
|
||||
|
||||
<insert id="save" parameterType="com.czsj.bigdata.entity.JobUser" useGeneratedKeys="true" keyProperty="id" >
|
||||
INSERT INTO job_user (
|
||||
username,
|
||||
password,
|
||||
role,
|
||||
permission
|
||||
) VALUES (
|
||||
#{username},
|
||||
#{password},
|
||||
#{role},
|
||||
#{permission}
|
||||
);
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="com.czsj.bigdata.entity.JobUser" >
|
||||
UPDATE job_user
|
||||
SET
|
||||
<if test="password != null and password != ''">
|
||||
password = #{password},
|
||||
</if>
|
||||
role = #{role},
|
||||
permission = #{permission}
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="delete" parameterType="java.util.HashMap">
|
||||
DELETE
|
||||
FROM job_user
|
||||
WHERE id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.czsj.bigdata.mapper.PermissionMapper">
|
||||
|
||||
<select id="findAll" resultType="com.czsj.bigdata.entity.JobPermission">
|
||||
|
||||
SELECT * from job_permission ;
|
||||
</select>
|
||||
|
||||
<select id="findByAdminUserId" parameterType="int" resultType="com.czsj.bigdata.entity.JobPermission">
|
||||
select p.*
|
||||
from job_User u
|
||||
LEFT JOIN role_user sru on u.id= sru.job_User_id
|
||||
LEFT JOIN job_Role r on sru.job_Role_id=r.id
|
||||
LEFT JOIN job_permission_role spr on spr.role_id=r.id
|
||||
LEFT JOIN job_permission p on p.id =spr.permission_id
|
||||
where u.id=#{userId}
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,127 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.czsj.bigdata.mapper.SysServersMapper">
|
||||
|
||||
<resultMap type="com.czsj.bigdata.entity.SysServers" id="SysServersResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="groupname" column="groupName" />
|
||||
<result property="groupcode" column="groupCode" />
|
||||
<result property="serveraddress" column="serverAddress" />
|
||||
<result property="osname" column="osName" />
|
||||
<result property="starttime" column="startTime" />
|
||||
<result property="pid" column="pid" />
|
||||
<result property="cpucores" column="cpuCores" />
|
||||
<result property="cpuutilization" column="cpuUtilization" />
|
||||
<result property="cpurate" column="cpuRate" />
|
||||
<result property="jvminitialmemory" column="jvmInitialMemory" />
|
||||
<result property="jvmmaxmemory" column="jvmMaxMemory" />
|
||||
<result property="jvmusedmemory" column="jvmUsedMemory" />
|
||||
<result property="physicalmemory" column="physicalMemory" />
|
||||
<result property="surplusmemory" column="surplusMemory" />
|
||||
<result property="usedmemory" column="usedMemory" />
|
||||
<result property="diskstatus" column="diskStatus" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysServersVo">
|
||||
select id, groupName, groupCode, serverAddress, osName, startTime, pid, cpuCores, cpuUtilization, cpuRate, jvmInitialMemory, jvmMaxMemory, jvmUsedMemory, physicalMemory, surplusMemory, usedMemory, diskStatus, create_time, create_by from sys_servers
|
||||
</sql>
|
||||
|
||||
<select id="selectSysServersList" parameterType="com.czsj.bigdata.entity.SysServers" resultMap="SysServersResult">
|
||||
<include refid="selectSysServersVo"/>
|
||||
<where>
|
||||
<if test="groupname != null and groupname != ''"> and groupName like concat('%', #{groupname}, '%')</if>
|
||||
<if test="groupcode != null and groupcode != ''"> and groupCode = #{groupcode}</if>
|
||||
<if test="serveraddress != null and serveraddress != ''"> and serverAddress = #{serveraddress}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSysServersById" parameterType="Long" resultMap="SysServersResult">
|
||||
<include refid="selectSysServersVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSysServers" parameterType="com.czsj.bigdata.entity.SysServers" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sys_servers
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="groupname != null">groupName,</if>
|
||||
<if test="groupcode != null">groupCode,</if>
|
||||
<if test="serveraddress != null">serverAddress,</if>
|
||||
<if test="osname != null">osName,</if>
|
||||
<if test="starttime != null">startTime,</if>
|
||||
<if test="pid != null">pid,</if>
|
||||
<if test="cpucores != null">cpuCores,</if>
|
||||
<if test="cpuutilization != null">cpuUtilization,</if>
|
||||
<if test="cpurate != null">cpuRate,</if>
|
||||
<if test="jvminitialmemory != null">jvmInitialMemory,</if>
|
||||
<if test="jvmmaxmemory != null">jvmMaxMemory,</if>
|
||||
<if test="jvmusedmemory != null">jvmUsedMemory,</if>
|
||||
<if test="physicalmemory != null">physicalMemory,</if>
|
||||
<if test="surplusmemory != null">surplusMemory,</if>
|
||||
<if test="usedmemory != null">usedMemory,</if>
|
||||
<if test="diskstatus != null">diskStatus,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="groupname != null">#{groupname},</if>
|
||||
<if test="groupcode != null">#{groupcode},</if>
|
||||
<if test="serveraddress != null">#{serveraddress},</if>
|
||||
<if test="osname != null">#{osname},</if>
|
||||
<if test="starttime != null">#{starttime},</if>
|
||||
<if test="pid != null">#{pid},</if>
|
||||
<if test="cpucores != null">#{cpucores},</if>
|
||||
<if test="cpuutilization != null">#{cpuutilization},</if>
|
||||
<if test="cpurate != null">#{cpurate},</if>
|
||||
<if test="jvminitialmemory != null">#{jvminitialmemory},</if>
|
||||
<if test="jvmmaxmemory != null">#{jvmmaxmemory},</if>
|
||||
<if test="jvmusedmemory != null">#{jvmusedmemory},</if>
|
||||
<if test="physicalmemory != null">#{physicalmemory},</if>
|
||||
<if test="surplusmemory != null">#{surplusmemory},</if>
|
||||
<if test="usedmemory != null">#{usedmemory},</if>
|
||||
<if test="diskstatus != null">#{diskstatus},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysServers" parameterType="com.czsj.bigdata.entity.SysServers">
|
||||
update sys_servers
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="groupname != null">groupName = #{groupname},</if>
|
||||
<if test="groupcode != null">groupCode = #{groupcode},</if>
|
||||
<if test="serveraddress != null">serverAddress = #{serveraddress},</if>
|
||||
<if test="osname != null">osName = #{osname},</if>
|
||||
<if test="starttime != null">startTime = #{starttime},</if>
|
||||
<if test="pid != null">pid = #{pid},</if>
|
||||
<if test="cpucores != null">cpuCores = #{cpucores},</if>
|
||||
<if test="cpuutilization != null">cpuUtilization = #{cpuutilization},</if>
|
||||
<if test="cpurate != null">cpuRate = #{cpurate},</if>
|
||||
<if test="jvminitialmemory != null">jvmInitialMemory = #{jvminitialmemory},</if>
|
||||
<if test="jvmmaxmemory != null">jvmMaxMemory = #{jvmmaxmemory},</if>
|
||||
<if test="jvmusedmemory != null">jvmUsedMemory = #{jvmusedmemory},</if>
|
||||
<if test="physicalmemory != null">physicalMemory = #{physicalmemory},</if>
|
||||
<if test="surplusmemory != null">surplusMemory = #{surplusmemory},</if>
|
||||
<if test="usedmemory != null">usedMemory = #{usedmemory},</if>
|
||||
<if test="diskstatus != null">diskStatus = #{diskstatus},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSysServersById" parameterType="Long">
|
||||
delete from sys_servers where id = #{id} and serverAddress != 'localhost'
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSysServersByIds" parameterType="String">
|
||||
delete from sys_servers where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
and serverAddress != 'localhost'
|
||||
</delete>
|
||||
</mapper>
|
BIN
packages/czsj-datax-executor_3.8.8_1.tar.gz
Normal file
BIN
packages/czsj-datax-executor_3.8.8_1.tar.gz
Normal file
Binary file not shown.
4
pom.xml
4
pom.xml
@ -26,7 +26,7 @@
|
||||
<oshi.version>6.1.2</oshi.version>
|
||||
<commons.io.version>2.13.0</commons.io.version>
|
||||
<poi.version>4.1.2</poi.version>
|
||||
<lombok.version>1.18.16</lombok.version>
|
||||
|
||||
<hutool.version>5.4.1</hutool.version>
|
||||
<velocity.version>2.3</velocity.version>
|
||||
<jwt.version>0.9.1</jwt.version>
|
||||
@ -93,7 +93,7 @@
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>${lombok.version}</version>
|
||||
<version>1.18.24</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
Loading…
Reference in New Issue
Block a user