Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jz-dmp-cmdexectool
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
姚本章
jz-dmp-cmdexectool
Commits
25ec3bd8
Commit
25ec3bd8
authored
Feb 23, 2021
by
sml
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码提交
parent
44f4be8f
Changes
37
Show whitespace changes
Inline
Side-by-side
Showing
37 changed files
with
6109 additions
and
255 deletions
+6109
-255
CommConstant.java
.../com/jz/dmp/cmdexectool/common/constant/CommConstant.java
+8
-0
DmpComputEngineDto.java
...z/dmp/cmdexectool/controller/bean/DmpComputEngineDto.java
+35
-0
DmpComputEngineParamDto.java
.../cmdexectool/controller/bean/DmpComputEngineParamDto.java
+14
-0
DmpDevelopTaskDto.java
...jz/dmp/cmdexectool/controller/bean/DmpDevelopTaskDto.java
+20
-0
DmpProjectConfigEngineDto.java
...mdexectool/controller/bean/DmpProjectConfigEngineDto.java
+13
-0
DmpProjectConfigInfoDto.java
.../cmdexectool/controller/bean/DmpProjectConfigInfoDto.java
+36
-0
DmpProjectEngineParamDto.java
...cmdexectool/controller/bean/DmpProjectEngineParamDto.java
+13
-0
DmpPublicConfigInfoDto.java
...p/cmdexectool/controller/bean/DmpPublicConfigInfoDto.java
+13
-0
MyDmpDevelopTaskConverter.java
...mdexectool/controller/bean/MyDmpDevelopTaskConverter.java
+0
-59
DmpComputEngine.java
...n/java/com/jz/dmp/cmdexectool/entity/DmpComputEngine.java
+149
-0
DmpComputEngineParam.java
...a/com/jz/dmp/cmdexectool/entity/DmpComputEngineParam.java
+177
-0
DmpProjectConfigEngine.java
...com/jz/dmp/cmdexectool/entity/DmpProjectConfigEngine.java
+162
-0
DmpProjectConfigInfo.java
...a/com/jz/dmp/cmdexectool/entity/DmpProjectConfigInfo.java
+148
-0
DmpProjectEngineParam.java
.../com/jz/dmp/cmdexectool/entity/DmpProjectEngineParam.java
+178
-0
DmpPublicConfigInfo.java
...va/com/jz/dmp/cmdexectool/entity/DmpPublicConfigInfo.java
+512
-0
DmpSyncingDatasource.java
...a/com/jz/dmp/cmdexectool/entity/DmpSyncingDatasource.java
+494
-0
DmpComputEngineMapper.java
.../com/jz/dmp/cmdexectool/mapper/DmpComputEngineMapper.java
+120
-0
DmpComputEngineParamMapper.java
...jz/dmp/cmdexectool/mapper/DmpComputEngineParamMapper.java
+118
-0
DmpProjectConfigEngineMapper.java
.../dmp/cmdexectool/mapper/DmpProjectConfigEngineMapper.java
+120
-0
DmpProjectConfigInfoMapper.java
...jz/dmp/cmdexectool/mapper/DmpProjectConfigInfoMapper.java
+120
-0
DmpProjectEngineParamMapper.java
...z/dmp/cmdexectool/mapper/DmpProjectEngineParamMapper.java
+121
-0
DmpPublicConfigInfoMapper.java
.../jz/dmp/cmdexectool/mapper/DmpPublicConfigInfoMapper.java
+120
-0
DmpSyncingDatasourceDao.java
...om/jz/dmp/cmdexectool/mapper/DmpSyncingDatasourceDao.java
+21
-0
AbstractParameters.java
...cmdexectool/scheduler/common/task/AbstractParameters.java
+0
-3
ShellParameters.java
...exectool/scheduler/common/task/shell/ShellParameters.java
+14
-4
SqlParameters.java
.../cmdexectool/scheduler/common/task/sql/SqlParameters.java
+193
-186
TaskManager.java
...cmdexectool/scheduler/server/worker/task/TaskManager.java
+4
-2
SqlTask.java
...cmdexectool/scheduler/server/worker/task/sql/SqlTask.java
+184
-0
ProcessService.java
...cmdexectool/scheduler/service/process/ProcessService.java
+109
-1
DmpComputEngineMapper.xml
src/main/resources/mapperconf/DmpComputEngineMapper.xml
+364
-0
DmpComputEngineParamMapper.xml
src/main/resources/mapperconf/DmpComputEngineParamMapper.xml
+397
-0
DmpProjectConfigEngineMapper.xml
...ain/resources/mapperconf/DmpProjectConfigEngineMapper.xml
+352
-0
DmpProjectConfigInfoMapper.xml
src/main/resources/mapperconf/DmpProjectConfigInfoMapper.xml
+387
-0
DmpProjectEngineParamMapper.xml
...main/resources/mapperconf/DmpProjectEngineParamMapper.xml
+397
-0
DmpPublicConfigInfoMapper.xml
src/main/resources/mapperconf/DmpPublicConfigInfoMapper.xml
+876
-0
DmpSyncingDatasourceMapper.xml
src/main/resources/mapperconf/DmpSyncingDatasourceMapper.xml
+39
-0
SQLCommandExecutorTest.java
...z/cmdexectool/test/task/shell/SQLCommandExecutorTest.java
+81
-0
No files found.
src/main/java/com/jz/dmp/cmdexectool/common/constant/CommConstant.java
View file @
25ec3bd8
...
...
@@ -36,4 +36,12 @@ public class CommConstant {
public
static
final
String
TASK_TYPE_DEVSHELL
=
"3"
;
// SHELL任务
public
static
final
String
TASK_TYPE_DEVSQL
=
"4"
;
// SQL任务
/***************************************************/
//SQL任务输出类型
public
static
final
String
OUTPUT_TYPE_CONSOLE
=
"console"
;
//console
public
static
final
String
OUTPUT_TYPE_HDFS
=
"hdfs"
;
//hdfs
public
static
final
String
OUTPUT_TYPE_TABLE
=
"table"
;
//table
public
static
final
String
OUTPUT_TYPE_TOPIC
=
"topic"
;
//topic
public
static
final
String
OUTPUT_TYPE_API
=
"api"
;
//api
}
src/main/java/com/jz/dmp/cmdexectool/controller/bean/DmpComputEngineDto.java
0 → 100644
View file @
25ec3bd8
package
com
.
jz
.
dmp
.
cmdexectool
.
controller
.
bean
;
import
java.util.List
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
com.jz.dmp.cmdexectool.entity.DmpComputEngine
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
/**计算引擎表Dto
* @author ybz
*
*/
@ApiModel
(
value
=
"计算引擎表Dto"
,
description
=
"计算引擎表Dto"
)
@JsonIgnoreProperties
(
value
=
{
"handler"
})
public
class
DmpComputEngineDto
extends
DmpComputEngine
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"计算引擎参数列表"
)
private
List
<
DmpComputEngineParamDto
>
paramDtos
;
public
List
<
DmpComputEngineParamDto
>
getParamDtos
()
{
return
paramDtos
;
}
public
void
setParamDtos
(
List
<
DmpComputEngineParamDto
>
paramDtos
)
{
this
.
paramDtos
=
paramDtos
;
}
}
src/main/java/com/jz/dmp/cmdexectool/controller/bean/DmpComputEngineParamDto.java
0 → 100644
View file @
25ec3bd8
package
com
.
jz
.
dmp
.
cmdexectool
.
controller
.
bean
;
import
com.jz.dmp.cmdexectool.entity.DmpComputEngineParam
;
import
io.swagger.annotations.ApiModel
;
/**计算引擎参数表Dto
* @author ybz
*
*/
@ApiModel
(
value
=
"计算引擎参数表Dto"
,
description
=
"计算引擎参数表Dto"
)
public
class
DmpComputEngineParamDto
extends
DmpComputEngineParam
{
}
src/main/java/com/jz/dmp/cmdexectool/controller/bean/DmpDevelopTaskDto.java
View file @
25ec3bd8
...
...
@@ -11,4 +11,24 @@ import io.swagger.annotations.ApiModel;
@ApiModel
(
value
=
"任务开发Dto"
,
description
=
"任务开发Dto"
)
public
class
DmpDevelopTaskDto
extends
DmpDevelopTask
{
private
String
name
;
private
Integer
projectId
;
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
Integer
getProjectId
()
{
return
projectId
;
}
public
void
setProjectId
(
Integer
projectId
)
{
this
.
projectId
=
projectId
;
}
}
src/main/java/com/jz/dmp/cmdexectool/controller/bean/DmpProjectConfigEngineDto.java
0 → 100644
View file @
25ec3bd8
package
com
.
jz
.
dmp
.
cmdexectool
.
controller
.
bean
;
import
com.jz.dmp.cmdexectool.entity.DmpProjectConfigEngine
;
import
io.swagger.annotations.ApiModel
;
/**项目配置计算引擎关系表Dto
* @author ybz
*
*/
@ApiModel
(
value
=
"项目配置计算引擎关系表Dto"
,
description
=
"项目配置计算引擎关系表Dto"
)
public
class
DmpProjectConfigEngineDto
extends
DmpProjectConfigEngine
{
}
src/main/java/com/jz/dmp/cmdexectool/controller/bean/DmpProjectConfigInfoDto.java
0 → 100644
View file @
25ec3bd8
package
com
.
jz
.
dmp
.
cmdexectool
.
controller
.
bean
;
import
com.jz.dmp.cmdexectool.entity.DmpProjectConfigInfo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
/**项目配置表Dto
* @author ybz
*
*/
/**
* @ClassName: DmpProjectConfigInfoDto
* @Description: TODO(这里用一句话描述这个类的作用)
* @author ybz
* @date 2021年2月4日
*
*/
@ApiModel
(
value
=
"项目配置表Dto"
,
description
=
"项目配置表Dto"
)
public
class
DmpProjectConfigInfoDto
extends
DmpProjectConfigInfo
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"公共配置"
)
private
DmpPublicConfigInfoDto
dmpPublicConfigInfoDto
;
public
DmpPublicConfigInfoDto
getDmpPublicConfigInfoDto
()
{
return
dmpPublicConfigInfoDto
;
}
public
void
setDmpPublicConfigInfoDto
(
DmpPublicConfigInfoDto
dmpPublicConfigInfoDto
)
{
this
.
dmpPublicConfigInfoDto
=
dmpPublicConfigInfoDto
;
}
}
src/main/java/com/jz/dmp/cmdexectool/controller/bean/DmpProjectEngineParamDto.java
0 → 100644
View file @
25ec3bd8
package
com
.
jz
.
dmp
.
cmdexectool
.
controller
.
bean
;
import
com.jz.dmp.cmdexectool.entity.DmpProjectEngineParam
;
import
io.swagger.annotations.ApiModel
;
/**计算引擎项目参数表Dto
* @author ybz
*
*/
@ApiModel
(
value
=
"计算引擎项目参数表Dto"
,
description
=
"计算引擎项目参数表Dto"
)
public
class
DmpProjectEngineParamDto
extends
DmpProjectEngineParam
{
}
src/main/java/com/jz/dmp/cmdexectool/controller/bean/DmpPublicConfigInfoDto.java
0 → 100644
View file @
25ec3bd8
package
com
.
jz
.
dmp
.
cmdexectool
.
controller
.
bean
;
import
com.jz.dmp.cmdexectool.entity.DmpPublicConfigInfo
;
import
io.swagger.annotations.ApiModel
;
/**公共配置表Dto
* @author ybz
*
*/
@ApiModel
(
value
=
"公共配置表Dto"
,
description
=
"公共配置表Dto"
)
public
class
DmpPublicConfigInfoDto
extends
DmpPublicConfigInfo
{
}
src/main/java/com/jz/dmp/cmdexectool/controller/bean/MyDmpDevelopTaskConverter.java
View file @
25ec3bd8
...
...
@@ -74,63 +74,4 @@ public class MyDmpDevelopTaskConverter {
return
taskInstance
;
}
/**
* @Title: dto2execcontext
* @Description: TODO(将task的job转换成taskExecutionContext)
* @param @param dmpDevelopTaskDto
* @param @param jobId
* @param @return 参数
* @return TaskExecutionContext 返回类型
* @throws
*/
public
TaskExecutionContext
dto2execcontext
(
DmpDevelopTaskDto
dmpDevelopTaskDto
,
String
jobId
)
{
TaskExecutionContext
taskExecutionContext
=
new
TaskExecutionContext
();
JobType
jobType
=
null
;
if
(
StringUtils
.
isEmpty
(
jobId
))
{
jobType
=
JobType
.
valueOf
(
jobId
);
}
String
taskType
=
dmpDevelopTaskDto
.
getTaskType
();
if
(
taskType
.
equals
(
CommConstant
.
TASK_TYPE_DEVSHELL
))
{
jobType
=
JobType
.
SHELL
;
}
else
if
(
taskType
.
equals
(
CommConstant
.
TASK_TYPE_DEVSQL
))
{
jobType
=
JobType
.
SQL
;
}
else
if
(
taskType
.
equals
(
CommConstant
.
TASK_TYPE_OFFLINE
))
{
jobType
=
JobType
.
SYNC
;
}
switch
(
jobType
)
{
case
SHELL:
taskExecutionContext
=
ShellParameters
.
getTaskExecutionContext
(
dmpDevelopTaskDto
);
break
;
case
SQL:
break
;
case
SYNC:
break
;
case
SUBPROCESS:
break
;
case
FTP:
break
;
case
UNZIPFILE:
break
;
case
DOCTRANS:
break
;
case
HDFS:
break
;
default
:
break
;
}
return
taskExecutionContext
;
}
}
src/main/java/com/jz/dmp/cmdexectool/entity/DmpComputEngine.java
0 → 100644
View file @
25ec3bd8
package
com
.
jz
.
dmp
.
cmdexectool
.
entity
;
import
java.io.Serializable
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.util.Date
;
import
java.util.List
;
/**计算引擎表
* @author ybz
*
*/
@ApiModel
(
value
=
"计算引擎表"
,
description
=
"计算引擎表"
)
public
class
DmpComputEngine
implements
Serializable
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@ApiModelProperty
(
value
=
"主键"
)
private
Integer
engineId
;
/**
* 引擎名称
*/
@ApiModelProperty
(
value
=
"引擎名称"
)
private
String
engineName
;
/**
* 备注
*/
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
/**
* 数据状态(0:删除,1,未删除)
*/
@ApiModelProperty
(
value
=
"数据状态(0:删除,1,未删除)"
)
private
String
dataStatus
;
/**
* 创建用户ID
*/
@ApiModelProperty
(
value
=
"创建用户ID"
)
private
Integer
createUserId
;
/**
* 创建时间
*/
@ApiModelProperty
(
value
=
"创建时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createTime
;
/**
* 修改用户ID
*/
@ApiModelProperty
(
value
=
"修改用户ID"
)
private
Integer
updateUserId
;
/**
* 修改时间
*/
@ApiModelProperty
(
value
=
"修改时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
updateTime
;
@ApiModelProperty
(
value
=
"计算引擎参数"
)
private
List
<
DmpComputEngineParam
>
params
;
public
Integer
getEngineId
()
{
return
engineId
;
}
public
void
setEngineId
(
Integer
engineId
)
{
this
.
engineId
=
engineId
;
}
public
String
getEngineName
()
{
return
engineName
;
}
public
void
setEngineName
(
String
engineName
)
{
this
.
engineName
=
engineName
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
String
getDataStatus
()
{
return
dataStatus
;
}
public
void
setDataStatus
(
String
dataStatus
)
{
this
.
dataStatus
=
dataStatus
;
}
public
Integer
getCreateUserId
()
{
return
createUserId
;
}
public
void
setCreateUserId
(
Integer
createUserId
)
{
this
.
createUserId
=
createUserId
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Integer
getUpdateUserId
()
{
return
updateUserId
;
}
public
void
setUpdateUserId
(
Integer
updateUserId
)
{
this
.
updateUserId
=
updateUserId
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
List
<
DmpComputEngineParam
>
getParams
()
{
return
params
;
}
public
void
setParams
(
List
<
DmpComputEngineParam
>
params
)
{
this
.
params
=
params
;
}
}
src/main/java/com/jz/dmp/cmdexectool/entity/DmpComputEngineParam.java
0 → 100644
View file @
25ec3bd8
package
com
.
jz
.
dmp
.
cmdexectool
.
entity
;
import
java.io.Serializable
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.util.Date
;
/**计算引擎参数表
* @author ybz
*
*/
@ApiModel
(
value
=
"计算引擎参数表"
,
description
=
"计算引擎参数表"
)
public
class
DmpComputEngineParam
implements
Serializable
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@ApiModelProperty
(
value
=
"主键"
)
private
Integer
paramId
;
/**
* 引擎主键
*/
@ApiModelProperty
(
value
=
"引擎主键"
)
private
Integer
engineId
;
/**
* 参数名称
*/
@ApiModelProperty
(
value
=
"参数名称"
)
private
String
paramName
;
/**
* 类型(0:引擎公共参数,1:引擎私配置参数)
*/
@ApiModelProperty
(
value
=
"类型(0:引擎公共参数,1:引擎私配置参数)"
)
private
String
paramType
;
/**
* 参数值
*/
@ApiModelProperty
(
value
=
"参数值"
)
private
String
paramValue
;
/**
* 备注
*/
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
/**
* 数据状态(0:删除,1,未删除)
*/
@ApiModelProperty
(
value
=
"数据状态(0:删除,1,未删除)"
)
private
String
dataStatus
;
/**
* 创建用户ID
*/
@ApiModelProperty
(
value
=
"创建用户ID"
)
private
Integer
createUserId
;
/**
* 创建时间
*/
@ApiModelProperty
(
value
=
"创建时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createTime
;
/**
* 修改用户ID
*/
@ApiModelProperty
(
value
=
"修改用户ID"
)
private
Integer
updateUserId
;
/**
* 修改时间
*/
@ApiModelProperty
(
value
=
"修改时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
updateTime
;
public
Integer
getParamId
()
{
return
paramId
;
}
public
void
setParamId
(
Integer
paramId
)
{
this
.
paramId
=
paramId
;
}
public
Integer
getEngineId
()
{
return
engineId
;
}
public
void
setEngineId
(
Integer
engineId
)
{
this
.
engineId
=
engineId
;
}
public
String
getParamName
()
{
return
paramName
;
}
public
void
setParamName
(
String
paramName
)
{
this
.
paramName
=
paramName
;
}
public
String
getParamType
()
{
return
paramType
;
}
public
void
setParamType
(
String
paramType
)
{
this
.
paramType
=
paramType
;
}
public
String
getParamValue
()
{
return
paramValue
;
}
public
void
setParamValue
(
String
paramValue
)
{
this
.
paramValue
=
paramValue
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
String
getDataStatus
()
{
return
dataStatus
;
}
public
void
setDataStatus
(
String
dataStatus
)
{
this
.
dataStatus
=
dataStatus
;
}
public
Integer
getCreateUserId
()
{
return
createUserId
;
}
public
void
setCreateUserId
(
Integer
createUserId
)
{
this
.
createUserId
=
createUserId
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Integer
getUpdateUserId
()
{
return
updateUserId
;
}
public
void
setUpdateUserId
(
Integer
updateUserId
)
{
this
.
updateUserId
=
updateUserId
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
}
src/main/java/com/jz/dmp/cmdexectool/entity/DmpProjectConfigEngine.java
0 → 100644
View file @
25ec3bd8
package
com
.
jz
.
dmp
.
cmdexectool
.
entity
;
import
java.io.Serializable
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.util.Date
;
import
java.util.List
;
/**项目配置计算引擎关系表
* @author ybz
*
*/
@ApiModel
(
value
=
"项目配置计算引擎关系表"
,
description
=
"项目配置计算引擎关系表"
)
public
class
DmpProjectConfigEngine
implements
Serializable
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@ApiModelProperty
(
value
=
"主键"
)
private
Integer
configEngineId
;
/**
* 项目主键
*/
@ApiModelProperty
(
value
=
"项目主键"
)
private
Integer
projectId
;
/**
* 引擎主键
*/
@ApiModelProperty
(
value
=
"引擎主键"
)
private
Integer
engineId
;
/**
* 备注
*/
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
/**
* 数据状态(0:删除,1,未删除)
*/
@ApiModelProperty
(
value
=
"数据状态(0:删除,1,未删除)"
)
private
String
dataStatus
;
/**
* 创建用户ID
*/
@ApiModelProperty
(
value
=
"创建用户ID"
)
private
Integer
createUserId
;
/**
* 创建时间
*/
@ApiModelProperty
(
value
=
"创建时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createTime
;
/**
* 修改用户ID
*/
@ApiModelProperty
(
value
=
"修改用户ID"
)
private
Integer
updateUserId
;
/**
* 修改时间
*/
@ApiModelProperty
(
value
=
"修改时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
updateTime
;
@ApiModelProperty
(
value
=
"选择引擎私有配置参数"
)
private
List
<
DmpProjectEngineParam
>
dmpProjectEngineParams
;
public
Integer
getConfigEngineId
()
{
return
configEngineId
;
}
public
void
setConfigEngineId
(
Integer
configEngineId
)
{
this
.
configEngineId
=
configEngineId
;
}
public
Integer
getProjectId
()
{
return
projectId
;
}
public
void
setProjectId
(
Integer
projectId
)
{
this
.
projectId
=
projectId
;
}
public
Integer
getEngineId
()
{
return
engineId
;
}
public
void
setEngineId
(
Integer
engineId
)
{
this
.
engineId
=
engineId
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
String
getDataStatus
()
{
return
dataStatus
;
}
public
void
setDataStatus
(
String
dataStatus
)
{
this
.
dataStatus
=
dataStatus
;
}
public
Integer
getCreateUserId
()
{
return
createUserId
;
}
public
void
setCreateUserId
(
Integer
createUserId
)
{
this
.
createUserId
=
createUserId
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Integer
getUpdateUserId
()
{
return
updateUserId
;
}
public
void
setUpdateUserId
(
Integer
updateUserId
)
{
this
.
updateUserId
=
updateUserId
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
List
<
DmpProjectEngineParam
>
getDmpProjectEngineParams
()
{
return
dmpProjectEngineParams
;
}
public
void
setDmpProjectEngineParams
(
List
<
DmpProjectEngineParam
>
dmpProjectEngineParams
)
{
this
.
dmpProjectEngineParams
=
dmpProjectEngineParams
;
}
}
src/main/java/com/jz/dmp/cmdexectool/entity/DmpProjectConfigInfo.java
0 → 100644
View file @
25ec3bd8
package
com
.
jz
.
dmp
.
cmdexectool
.
entity
;
import
java.io.Serializable
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.util.Date
;
import
java.util.List
;
/**项目配置表
* @author ybz
*
*/
@ApiModel
(
value
=
"项目配置表"
,
description
=
"项目配置表"
)
public
class
DmpProjectConfigInfo
implements
Serializable
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@ApiModelProperty
(
value
=
"主键"
)
private
Integer
projectConfigId
;
/**
* 项目主键
*/
@ApiModelProperty
(
value
=
"项目主键"
)
private
Integer
projectId
;
/**
* 备注
*/
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
/**
* 数据状态(0:删除,1,未删除)
*/
@ApiModelProperty
(
value
=
"数据状态(0:删除,1,未删除)"
)
private
String
dataStatus
;
/**
* 创建用户ID
*/
@ApiModelProperty
(
value
=
"创建用户ID"
)
private
Integer
createUserId
;
/**
* 创建时间
*/
@ApiModelProperty
(
value
=
"创建时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createTime
;
/**
* 修改用户ID
*/
@ApiModelProperty
(
value
=
"修改用户ID"
)
private
Integer
updateUserId
;
/**
* 修改时间
*/
@ApiModelProperty
(
value
=
"修改时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
updateTime
;
@ApiModelProperty
(
value
=
"选择的计算引擎"
)
private
List
<
DmpProjectConfigEngine
>
dmpProjectConfigEngines
;
public
Integer
getProjectConfigId
()
{
return
projectConfigId
;
}
public
void
setProjectConfigId
(
Integer
projectConfigId
)
{
this
.
projectConfigId
=
projectConfigId
;
}
public
Integer
getProjectId
()
{
return
projectId
;
}
public
void
setProjectId
(
Integer
projectId
)
{
this
.
projectId
=
projectId
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
String
getDataStatus
()
{
return
dataStatus
;
}
public
void
setDataStatus
(
String
dataStatus
)
{
this
.
dataStatus
=
dataStatus
;
}
public
Integer
getCreateUserId
()
{
return
createUserId
;
}
public
void
setCreateUserId
(
Integer
createUserId
)
{
this
.
createUserId
=
createUserId
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Integer
getUpdateUserId
()
{
return
updateUserId
;
}
public
void
setUpdateUserId
(
Integer
updateUserId
)
{
this
.
updateUserId
=
updateUserId
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
List
<
DmpProjectConfigEngine
>
getDmpProjectConfigEngines
()
{
return
dmpProjectConfigEngines
;
}
public
void
setDmpProjectConfigEngines
(
List
<
DmpProjectConfigEngine
>
dmpProjectConfigEngines
)
{
this
.
dmpProjectConfigEngines
=
dmpProjectConfigEngines
;
}
}
src/main/java/com/jz/dmp/cmdexectool/entity/DmpProjectEngineParam.java
0 → 100644
View file @
25ec3bd8
package
com
.
jz
.
dmp
.
cmdexectool
.
entity
;
import
java.io.Serializable
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.util.Date
;
/**计算引擎项目参数表
* @author ybz
*
*/
@ApiModel
(
value
=
"计算引擎项目参数表"
,
description
=
"计算引擎项目参数表"
)
public
class
DmpProjectEngineParam
implements
Serializable
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@ApiModelProperty
(
value
=
"主键"
)
private
Integer
projectParamId
;
/**
* 项目配置引擎关系主键
*/
@ApiModelProperty
(
value
=
"项目配置引擎关系主键"
)
private
Integer
configEngineId
;
/**
* 引擎参数主键
*/
@ApiModelProperty
(
value
=
"引擎参数主键"
)
private
Integer
paramId
;
/**
* 参数名称
*/
@ApiModelProperty
(
value
=
"参数名称"
)
private
String
paramName
;
/**
* 参数值
*/
@ApiModelProperty
(
value
=
"参数值"
)
private
String
paramValue
;
/**
* 备注
*/
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
/**
* 数据状态(0:删除,1,未删除)
*/
@ApiModelProperty
(
value
=
"数据状态(0:删除,1,未删除)"
)
private
String
dataStatus
;
/**
* 创建用户ID
*/
@ApiModelProperty
(
value
=
"创建用户ID"
)
private
Integer
createUserId
;
/**
* 创建时间
*/
@ApiModelProperty
(
value
=
"创建时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createTime
;
/**
* 修改用户ID
*/
@ApiModelProperty
(
value
=
"修改用户ID"
)
private
Integer
updateUserId
;
/**
* 修改时间
*/
@ApiModelProperty
(
value
=
"修改时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
updateTime
;
public
Integer
getProjectParamId
()
{
return
projectParamId
;
}
public
void
setProjectParamId
(
Integer
projectParamId
)
{
this
.
projectParamId
=
projectParamId
;
}
public
Integer
getConfigEngineId
()
{
return
configEngineId
;
}
public
void
setConfigEngineId
(
Integer
configEngineId
)
{
this
.
configEngineId
=
configEngineId
;
}
public
Integer
getParamId
()
{
return
paramId
;
}
public
void
setParamId
(
Integer
paramId
)
{
this
.
paramId
=
paramId
;
}
public
String
getParamName
()
{
return
paramName
;
}
public
void
setParamName
(
String
paramName
)
{
this
.
paramName
=
paramName
;
}
public
String
getParamValue
()
{
return
paramValue
;
}
public
void
setParamValue
(
String
paramValue
)
{
this
.
paramValue
=
paramValue
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
String
getDataStatus
()
{
return
dataStatus
;
}
public
void
setDataStatus
(
String
dataStatus
)
{
this
.
dataStatus
=
dataStatus
;
}
public
Integer
getCreateUserId
()
{
return
createUserId
;
}
public
void
setCreateUserId
(
Integer
createUserId
)
{
this
.
createUserId
=
createUserId
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Integer
getUpdateUserId
()
{
return
updateUserId
;
}
public
void
setUpdateUserId
(
Integer
updateUserId
)
{
this
.
updateUserId
=
updateUserId
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
}
src/main/java/com/jz/dmp/cmdexectool/entity/DmpPublicConfigInfo.java
0 → 100644
View file @
25ec3bd8
package
com
.
jz
.
dmp
.
cmdexectool
.
entity
;
import
java.io.Serializable
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.util.Date
;
import
java.util.List
;
/**公共配置表
* @author ybz
*
*/
@ApiModel
(
value
=
"公共配置表"
,
description
=
"公共配置表"
)
public
class
DmpPublicConfigInfo
implements
Serializable
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@ApiModelProperty
(
value
=
"主键"
)
private
Integer
publicConfigId
;
/**
* 是否启动kerberos(单选按钮)(0:不启用,1,启用)
*/
@ApiModelProperty
(
value
=
"是否启动kerberos(单选按钮)(0:不启用,1,启用)"
)
private
String
kerberosIsenable
;
/**
* jaas默认Client名称
*/
@ApiModelProperty
(
value
=
"jaas默认Client名称"
)
private
String
kerberosJaasClientName
;
/**
* krb5地址
*/
@ApiModelProperty
(
value
=
"krb5地址"
)
private
String
kerberosKrb5Conf
;
/**
* jaas地址
*/
@ApiModelProperty
(
value
=
"jaas地址"
)
private
String
kerberosJaasConf
;
/**
* FQDN
*/
@ApiModelProperty
(
value
=
"FQDN"
)
private
String
kerberosFqdn
;
/**
* keytab地址
*/
@ApiModelProperty
(
value
=
"keytab地址"
)
private
String
kerberosKeytabConf
;
/**
* keytab用户
*/
@ApiModelProperty
(
value
=
"keytab用户"
)
private
String
kerberosKeytabUser
;
/**
* spark专用jaas
*/
@ApiModelProperty
(
value
=
"spark专用jaas"
)
private
String
kerberosSparkJaasConf
;
/**
* 提交 XML默认defaultFS
*/
@ApiModelProperty
(
value
=
"提交 XML默认defaultFS"
)
private
String
hdfsHttpPath
;
/**
* 提交XML到HDFS路径
*/
@ApiModelProperty
(
value
=
"提交XML到HDFS路径"
)
private
String
hdfsSyncingPath
;
/**
* Hadoop 用户名
*/
@ApiModelProperty
(
value
=
"Hadoop 用户名"
)
private
String
hdfsUserName
;
/**
* Kafka connector url
*/
@ApiModelProperty
(
value
=
"Kafka connector url"
)
private
String
kafkaConectorUrl
;
/**
* schema register url
*/
@ApiModelProperty
(
value
=
"schema register url"
)
private
String
kafkaSchemaRegisterUrl
;
/**
* kafka bootstarp servers
*/
@ApiModelProperty
(
value
=
"kafka bootstarp servers"
)
private
String
kafkaBootstrapServers
;
/**
* 执行shell任务命令
*/
@ApiModelProperty
(
value
=
"执行shell任务命令"
)
private
String
azkabanExectorShellExec
;
/**
* 执行impala sql任务命令
*/
@ApiModelProperty
(
value
=
"执行impala sql任务命令"
)
private
String
azkabanExectorSqlExec
;
/**
* 执行数据同步任务命令
*/
@ApiModelProperty
(
value
=
"执行数据同步任务命令"
)
private
String
azkabanExectorXmlExec
;
/**
* 调度执行sql路径
*/
@ApiModelProperty
(
value
=
"调度执行sql路径"
)
private
String
azkabanExectorSqlPath
;
/**
* 调度执行shell路径
*/
@ApiModelProperty
(
value
=
"调度执行shell路径"
)
private
String
azkabanExectorShellPath
;
/**
* task配置文件路径
*/
@ApiModelProperty
(
value
=
"task配置文件路径"
)
private
String
azkabanLocalTaskFilePath
;
/**
* 执行数据导出任务命令的shell路径
*/
@ApiModelProperty
(
value
=
"执行数据导出任务命令的shell路径"
)
private
String
azkabanExectorShellExportData
;
/**
* 调度web服务地址
*/
@ApiModelProperty
(
value
=
"调度web服务地址"
)
private
String
azkabanMonitorUrl
;
/**
* 元数据服务web地址
*/
@ApiModelProperty
(
value
=
"元数据服务web地址"
)
private
String
atlasMonitorUrl
;
/**
* 远程连接默认SERVER地址
*/
@ApiModelProperty
(
value
=
"远程连接默认SERVER地址"
)
private
String
shellCmdServer
;
/**
* 远程连接默认用户
*/
@ApiModelProperty
(
value
=
"远程连接默认用户"
)
private
String
shellCmdUser
;
/**
* 远程连接默认用户密码
*/
@ApiModelProperty
(
value
=
"远程连接默认用户密码"
)
private
String
shellCmdPassword
;
/**
* 上传配置的SFTP端口
*/
@ApiModelProperty
(
value
=
"上传配置的SFTP端口"
)
private
Integer
shellSftpPort
;
/**
* 备注
*/
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
/**
* 数据状态(0:删除,1,未删除)
*/
@ApiModelProperty
(
value
=
"数据状态(0:删除,1,未删除)"
)
private
String
dataStatus
;
/**
* 创建用户ID
*/
@ApiModelProperty
(
value
=
"创建用户ID"
)
private
Integer
createUserId
;
/**
* 创建时间
*/
@ApiModelProperty
(
value
=
"创建时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createTime
;
/**
* 修改用户ID
*/
@ApiModelProperty
(
value
=
"修改用户ID"
)
private
Integer
updateUserId
;
/**
* 修改时间
*/
@ApiModelProperty
(
value
=
"修改时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
updateTime
;
@ApiModelProperty
(
value
=
"计算引擎"
)
private
List
<
DmpComputEngine
>
computEngines
;
public
Integer
getPublicConfigId
()
{
return
publicConfigId
;
}
public
void
setPublicConfigId
(
Integer
publicConfigId
)
{
this
.
publicConfigId
=
publicConfigId
;
}
public
String
getKerberosIsenable
()
{
return
kerberosIsenable
;
}
public
void
setKerberosIsenable
(
String
kerberosIsenable
)
{
this
.
kerberosIsenable
=
kerberosIsenable
;
}
public
String
getKerberosJaasClientName
()
{
return
kerberosJaasClientName
;
}
public
void
setKerberosJaasClientName
(
String
kerberosJaasClientName
)
{
this
.
kerberosJaasClientName
=
kerberosJaasClientName
;
}
public
String
getKerberosKrb5Conf
()
{
return
kerberosKrb5Conf
;
}
public
void
setKerberosKrb5Conf
(
String
kerberosKrb5Conf
)
{
this
.
kerberosKrb5Conf
=
kerberosKrb5Conf
;
}
public
String
getKerberosJaasConf
()
{
return
kerberosJaasConf
;
}
public
void
setKerberosJaasConf
(
String
kerberosJaasConf
)
{
this
.
kerberosJaasConf
=
kerberosJaasConf
;
}
public
String
getKerberosFqdn
()
{
return
kerberosFqdn
;
}
public
void
setKerberosFqdn
(
String
kerberosFqdn
)
{
this
.
kerberosFqdn
=
kerberosFqdn
;
}
public
String
getKerberosKeytabConf
()
{
return
kerberosKeytabConf
;
}
public
void
setKerberosKeytabConf
(
String
kerberosKeytabConf
)
{
this
.
kerberosKeytabConf
=
kerberosKeytabConf
;
}
public
String
getKerberosKeytabUser
()
{
return
kerberosKeytabUser
;
}
public
void
setKerberosKeytabUser
(
String
kerberosKeytabUser
)
{
this
.
kerberosKeytabUser
=
kerberosKeytabUser
;
}
public
String
getKerberosSparkJaasConf
()
{
return
kerberosSparkJaasConf
;
}
public
void
setKerberosSparkJaasConf
(
String
kerberosSparkJaasConf
)
{
this
.
kerberosSparkJaasConf
=
kerberosSparkJaasConf
;
}
public
String
getHdfsHttpPath
()
{
return
hdfsHttpPath
;
}
public
void
setHdfsHttpPath
(
String
hdfsHttpPath
)
{
this
.
hdfsHttpPath
=
hdfsHttpPath
;
}
public
String
getHdfsSyncingPath
()
{
return
hdfsSyncingPath
;
}
public
void
setHdfsSyncingPath
(
String
hdfsSyncingPath
)
{
this
.
hdfsSyncingPath
=
hdfsSyncingPath
;
}
public
String
getHdfsUserName
()
{
return
hdfsUserName
;
}
public
void
setHdfsUserName
(
String
hdfsUserName
)
{
this
.
hdfsUserName
=
hdfsUserName
;
}
public
String
getKafkaConectorUrl
()
{
return
kafkaConectorUrl
;
}
public
void
setKafkaConectorUrl
(
String
kafkaConectorUrl
)
{
this
.
kafkaConectorUrl
=
kafkaConectorUrl
;
}
public
String
getKafkaSchemaRegisterUrl
()
{
return
kafkaSchemaRegisterUrl
;
}
public
void
setKafkaSchemaRegisterUrl
(
String
kafkaSchemaRegisterUrl
)
{
this
.
kafkaSchemaRegisterUrl
=
kafkaSchemaRegisterUrl
;
}
public
String
getKafkaBootstrapServers
()
{
return
kafkaBootstrapServers
;
}
public
void
setKafkaBootstrapServers
(
String
kafkaBootstrapServers
)
{
this
.
kafkaBootstrapServers
=
kafkaBootstrapServers
;
}
public
String
getAzkabanExectorShellExec
()
{
return
azkabanExectorShellExec
;
}
public
void
setAzkabanExectorShellExec
(
String
azkabanExectorShellExec
)
{
this
.
azkabanExectorShellExec
=
azkabanExectorShellExec
;
}
public
String
getAzkabanExectorSqlExec
()
{
return
azkabanExectorSqlExec
;
}
public
void
setAzkabanExectorSqlExec
(
String
azkabanExectorSqlExec
)
{
this
.
azkabanExectorSqlExec
=
azkabanExectorSqlExec
;
}
public
String
getAzkabanExectorXmlExec
()
{
return
azkabanExectorXmlExec
;
}
public
void
setAzkabanExectorXmlExec
(
String
azkabanExectorXmlExec
)
{
this
.
azkabanExectorXmlExec
=
azkabanExectorXmlExec
;
}
public
String
getAzkabanExectorSqlPath
()
{
return
azkabanExectorSqlPath
;
}
public
void
setAzkabanExectorSqlPath
(
String
azkabanExectorSqlPath
)
{
this
.
azkabanExectorSqlPath
=
azkabanExectorSqlPath
;
}
public
String
getAzkabanExectorShellPath
()
{
return
azkabanExectorShellPath
;
}
public
void
setAzkabanExectorShellPath
(
String
azkabanExectorShellPath
)
{
this
.
azkabanExectorShellPath
=
azkabanExectorShellPath
;
}
public
String
getAzkabanLocalTaskFilePath
()
{
return
azkabanLocalTaskFilePath
;
}
public
void
setAzkabanLocalTaskFilePath
(
String
azkabanLocalTaskFilePath
)
{
this
.
azkabanLocalTaskFilePath
=
azkabanLocalTaskFilePath
;
}
public
String
getAzkabanExectorShellExportData
()
{
return
azkabanExectorShellExportData
;
}
public
void
setAzkabanExectorShellExportData
(
String
azkabanExectorShellExportData
)
{
this
.
azkabanExectorShellExportData
=
azkabanExectorShellExportData
;
}
public
String
getAzkabanMonitorUrl
()
{
return
azkabanMonitorUrl
;
}
public
void
setAzkabanMonitorUrl
(
String
azkabanMonitorUrl
)
{
this
.
azkabanMonitorUrl
=
azkabanMonitorUrl
;
}
public
String
getAtlasMonitorUrl
()
{
return
atlasMonitorUrl
;
}
public
void
setAtlasMonitorUrl
(
String
atlasMonitorUrl
)
{
this
.
atlasMonitorUrl
=
atlasMonitorUrl
;
}
public
String
getShellCmdServer
()
{
return
shellCmdServer
;
}
public
void
setShellCmdServer
(
String
shellCmdServer
)
{
this
.
shellCmdServer
=
shellCmdServer
;
}
public
String
getShellCmdUser
()
{
return
shellCmdUser
;
}
public
void
setShellCmdUser
(
String
shellCmdUser
)
{
this
.
shellCmdUser
=
shellCmdUser
;
}
public
String
getShellCmdPassword
()
{
return
shellCmdPassword
;
}
public
void
setShellCmdPassword
(
String
shellCmdPassword
)
{
this
.
shellCmdPassword
=
shellCmdPassword
;
}
public
Integer
getShellSftpPort
()
{
return
shellSftpPort
;
}
public
void
setShellSftpPort
(
Integer
shellSftpPort
)
{
this
.
shellSftpPort
=
shellSftpPort
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
String
getDataStatus
()
{
return
dataStatus
;
}
public
void
setDataStatus
(
String
dataStatus
)
{
this
.
dataStatus
=
dataStatus
;
}
public
Integer
getCreateUserId
()
{
return
createUserId
;
}
public
void
setCreateUserId
(
Integer
createUserId
)
{
this
.
createUserId
=
createUserId
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Integer
getUpdateUserId
()
{
return
updateUserId
;
}
public
void
setUpdateUserId
(
Integer
updateUserId
)
{
this
.
updateUserId
=
updateUserId
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
List
<
DmpComputEngine
>
getComputEngines
()
{
return
computEngines
;
}
public
void
setComputEngines
(
List
<
DmpComputEngine
>
computEngines
)
{
this
.
computEngines
=
computEngines
;
}
}
src/main/java/com/jz/dmp/cmdexectool/entity/DmpSyncingDatasource.java
0 → 100644
View file @
25ec3bd8
package
com
.
jz
.
dmp
.
cmdexectool
.
entity
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 数据源配置(DmpSyncingDatasource)实体类
*
* @author Bellamy
* @since 2020-12-21 17:47:18
*/
@ApiModel
(
value
=
"数据源配置"
,
description
=
"数据源配置"
)
public
class
DmpSyncingDatasource
implements
Serializable
{
private
static
final
long
serialVersionUID
=
588846270711686919L
;
/**
* ID
*/
@ApiModelProperty
(
value
=
"ID"
)
private
Integer
id
;
/**
* 数据源类型ID
*/
@ApiModelProperty
(
value
=
"数据源类型ID"
)
private
Integer
datasourceType
;
/**
* 数据源名称
*/
@ApiModelProperty
(
value
=
"数据源名称"
)
private
String
datasourceName
;
/**
* 数据源描述
*/
@ApiModelProperty
(
value
=
"数据源描述"
)
private
String
datasourceDesc
;
/**
* JDBC URL
*/
@ApiModelProperty
(
value
=
"JDBC URL"
)
private
String
jdbcUrl
;
/**
* 数据库名
*/
@ApiModelProperty
(
value
=
"数据库名"
)
private
String
dbName
;
/**
* 账号
*/
@ApiModelProperty
(
value
=
"账号"
)
private
String
userName
;
/**
* 密码
*/
@ApiModelProperty
(
value
=
"密码"
)
private
String
password
;
/**
* 终端信息
*/
@ApiModelProperty
(
value
=
"终端信息"
)
private
String
endpoint
;
/**
* Bucket信息
*/
@ApiModelProperty
(
value
=
"Bucket信息"
)
private
String
bucket
;
/**
* accessId
*/
@ApiModelProperty
(
value
=
"accessId"
)
private
String
accessId
;
/**
* accessKey
*/
@ApiModelProperty
(
value
=
"accessKey"
)
private
String
accessKey
;
/**
* FTP协议
*/
@ApiModelProperty
(
value
=
"FTP协议"
)
private
String
protocol
;
/**
* IP
*/
@ApiModelProperty
(
value
=
"Bucket信息"
)
private
String
host
;
/**
* 端口
*/
@ApiModelProperty
(
value
=
"端口"
)
private
String
port
;
/**
* NameNode地址
*/
@ApiModelProperty
(
value
=
"NameNode地址"
)
private
String
defaultFs
;
/**
* 表空间
*/
@ApiModelProperty
(
value
=
"表空间"
)
private
String
tableSchema
;
/**
* 数据状态
*/
@ApiModelProperty
(
value
=
"数据状态"
)
private
String
dataStatus
;
/**
* 创建用户ID
*/
@ApiModelProperty
(
value
=
"创建用户ID"
)
private
String
createUserId
;
/**
* 数据创建时间
*/
@ApiModelProperty
(
value
=
"数据创建时间"
)
private
Date
createTime
;
/**
* 创建用户ID
*/
@ApiModelProperty
(
value
=
"创建用户ID"
)
private
String
updateUserId
;
/**
* 数据更新时间
*/
@ApiModelProperty
(
value
=
"数据更新时间"
)
private
Date
updateTime
;
/**
* 项目ID
*/
@ApiModelProperty
(
value
=
"项目ID"
)
private
Integer
projectId
;
private
String
delimiter
;
private
String
isHaveHeader
;
private
String
targetDbName
;
private
String
targetFileName
;
@ApiModelProperty
(
value
=
"网络连接类型"
)
private
String
networkConnectionType
;
/**
* 测试连通状态:01未测试,02连通性正常,03连通性异常
*/
@ApiModelProperty
(
value
=
"测试连通状态:01未测试,02连通性正常,03连通性异常"
)
private
String
testConnectStatus
;
/**
* hdfsNamenodePrincipal
*/
@ApiModelProperty
(
value
=
"hdfsNamenodePrincipal"
)
private
String
hdfsNamenodePrincipal
;
/**
* hiveMetastoreUrisThrift
*/
@ApiModelProperty
(
value
=
"hiveMetastoreUrisThrift"
)
private
String
hiveMetastoreUrisThrift
;
/**
* keytabLocation
*/
@ApiModelProperty
(
value
=
"keytabLocation"
)
private
String
keytabLocation
;
/**
* bootstrap地址
*/
@ApiModelProperty
(
value
=
"bootstrap地址"
)
private
String
bootstrapAddress
;
/**
* jaas地址
*/
@ApiModelProperty
(
value
=
"jaas地址"
)
private
String
jaasAddress
;
/**
* krb5地址
*/
@ApiModelProperty
(
value
=
"krb5地址"
)
private
String
krb5Address
;
/**
* kudu Master
*/
@ApiModelProperty
(
value
=
"kudu Master"
)
private
String
kuduMaster
;
/**
* impalaMasterFqdn
*/
@ApiModelProperty
(
value
=
"impalaMasterFqdn"
)
private
String
impalaMasterFqdn
;
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
Integer
getDatasourceType
()
{
return
datasourceType
;
}
public
void
setDatasourceType
(
Integer
datasourceType
)
{
this
.
datasourceType
=
datasourceType
;
}
public
String
getDatasourceName
()
{
return
datasourceName
;
}
public
void
setDatasourceName
(
String
datasourceName
)
{
this
.
datasourceName
=
datasourceName
;
}
public
String
getDatasourceDesc
()
{
return
datasourceDesc
;
}
public
void
setDatasourceDesc
(
String
datasourceDesc
)
{
this
.
datasourceDesc
=
datasourceDesc
;
}
public
String
getJdbcUrl
()
{
return
jdbcUrl
;
}
public
void
setJdbcUrl
(
String
jdbcUrl
)
{
this
.
jdbcUrl
=
jdbcUrl
;
}
public
String
getDbName
()
{
return
dbName
;
}
public
void
setDbName
(
String
dbName
)
{
this
.
dbName
=
dbName
;
}
public
String
getUserName
()
{
return
userName
;
}
public
void
setUserName
(
String
userName
)
{
this
.
userName
=
userName
;
}
public
String
getPassword
()
{
return
password
;
}
public
void
setPassword
(
String
password
)
{
this
.
password
=
password
;
}
public
String
getEndpoint
()
{
return
endpoint
;
}
public
void
setEndpoint
(
String
endpoint
)
{
this
.
endpoint
=
endpoint
;
}
public
String
getBucket
()
{
return
bucket
;
}
public
void
setBucket
(
String
bucket
)
{
this
.
bucket
=
bucket
;
}
public
String
getAccessId
()
{
return
accessId
;
}
public
void
setAccessId
(
String
accessId
)
{
this
.
accessId
=
accessId
;
}
public
String
getAccessKey
()
{
return
accessKey
;
}
public
void
setAccessKey
(
String
accessKey
)
{
this
.
accessKey
=
accessKey
;
}
public
String
getProtocol
()
{
return
protocol
;
}
public
void
setProtocol
(
String
protocol
)
{
this
.
protocol
=
protocol
;
}
public
String
getHost
()
{
return
host
;
}
public
void
setHost
(
String
host
)
{
this
.
host
=
host
;
}
public
String
getPort
()
{
return
port
;
}
public
void
setPort
(
String
port
)
{
this
.
port
=
port
;
}
public
String
getDefaultFs
()
{
return
defaultFs
;
}
public
void
setDefaultFs
(
String
defaultFs
)
{
this
.
defaultFs
=
defaultFs
;
}
public
String
getTableSchema
()
{
return
tableSchema
;
}
public
void
setTableSchema
(
String
tableSchema
)
{
this
.
tableSchema
=
tableSchema
;
}
public
String
getDataStatus
()
{
return
dataStatus
;
}
public
void
setDataStatus
(
String
dataStatus
)
{
this
.
dataStatus
=
dataStatus
;
}
public
String
getCreateUserId
()
{
return
createUserId
;
}
public
void
setCreateUserId
(
String
createUserId
)
{
this
.
createUserId
=
createUserId
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
String
getUpdateUserId
()
{
return
updateUserId
;
}
public
void
setUpdateUserId
(
String
updateUserId
)
{
this
.
updateUserId
=
updateUserId
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
Integer
getProjectId
()
{
return
projectId
;
}
public
void
setProjectId
(
Integer
projectId
)
{
this
.
projectId
=
projectId
;
}
public
String
getDelimiter
()
{
return
delimiter
;
}
public
void
setDelimiter
(
String
delimiter
)
{
this
.
delimiter
=
delimiter
;
}
public
String
getIsHaveHeader
()
{
return
isHaveHeader
;
}
public
void
setIsHaveHeader
(
String
isHaveHeader
)
{
this
.
isHaveHeader
=
isHaveHeader
;
}
public
String
getTargetDbName
()
{
return
targetDbName
;
}
public
void
setTargetDbName
(
String
targetDbName
)
{
this
.
targetDbName
=
targetDbName
;
}
public
String
getTargetFileName
()
{
return
targetFileName
;
}
public
void
setTargetFileName
(
String
targetFileName
)
{
this
.
targetFileName
=
targetFileName
;
}
public
String
getNetworkConnectionType
()
{
return
networkConnectionType
;
}
public
void
setNetworkConnectionType
(
String
networkConnectionType
)
{
this
.
networkConnectionType
=
networkConnectionType
;
}
public
String
getTestConnectStatus
()
{
return
testConnectStatus
;
}
public
void
setTestConnectStatus
(
String
testConnectStatus
)
{
this
.
testConnectStatus
=
testConnectStatus
;
}
public
String
getHdfsNamenodePrincipal
()
{
return
hdfsNamenodePrincipal
;
}
public
void
setHdfsNamenodePrincipal
(
String
hdfsNamenodePrincipal
)
{
this
.
hdfsNamenodePrincipal
=
hdfsNamenodePrincipal
;
}
public
String
getHiveMetastoreUrisThrift
()
{
return
hiveMetastoreUrisThrift
;
}
public
void
setHiveMetastoreUrisThrift
(
String
hiveMetastoreUrisThrift
)
{
this
.
hiveMetastoreUrisThrift
=
hiveMetastoreUrisThrift
;
}
public
String
getKeytabLocation
()
{
return
keytabLocation
;
}
public
void
setKeytabLocation
(
String
keytabLocation
)
{
this
.
keytabLocation
=
keytabLocation
;
}
public
String
getBootstrapAddress
()
{
return
bootstrapAddress
;
}
public
void
setBootstrapAddress
(
String
bootstrapAddress
)
{
this
.
bootstrapAddress
=
bootstrapAddress
;
}
public
String
getJaasAddress
()
{
return
jaasAddress
;
}
public
void
setJaasAddress
(
String
jaasAddress
)
{
this
.
jaasAddress
=
jaasAddress
;
}
public
String
getKrb5Address
()
{
return
krb5Address
;
}
public
void
setKrb5Address
(
String
krb5Address
)
{
this
.
krb5Address
=
krb5Address
;
}
public
String
getKuduMaster
()
{
return
kuduMaster
;
}
public
void
setKuduMaster
(
String
kuduMaster
)
{
this
.
kuduMaster
=
kuduMaster
;
}
public
String
getImpalaMasterFqdn
()
{
return
impalaMasterFqdn
;
}
public
void
setImpalaMasterFqdn
(
String
impalaMasterFqdn
)
{
this
.
impalaMasterFqdn
=
impalaMasterFqdn
;
}
}
\ No newline at end of file
src/main/java/com/jz/dmp/cmdexectool/mapper/DmpComputEngineMapper.java
0 → 100644
View file @
25ec3bd8
package
com
.
jz
.
dmp
.
cmdexectool
.
mapper
;
import
java.util.List
;
import
java.util.Map
;
import
org.apache.ibatis.annotations.Param
;
import
com.jz.dmp.cmdexectool.controller.bean.DmpComputEngineDto
;
import
com.jz.dmp.cmdexectool.entity.DmpComputEngine
;
/**计算引擎表 mapper
* @author ybz
*
*/
public
interface
DmpComputEngineMapper
{
/**新增计算引擎表
* @param dmpComputEngine
* @return
* @throws Exception
*/
public
int
insert
(
DmpComputEngine
dmpComputEngine
)
throws
Exception
;
/**选择性增加计算引擎表
* @param dmpComputEngine
* @return
* @throws Exception
*/
public
int
insertSelective
(
DmpComputEngine
dmpComputEngine
)
throws
Exception
;
/**主键修改计算引擎表
* @param dmpComputEngine
* @return
* @throws Exception
*/
public
int
updateByPrimaryKey
(
DmpComputEngine
dmpComputEngine
)
throws
Exception
;
/**选择性修改计算引擎表
* @param dmpComputEngine
* @return
* @throws Exception
*/
public
int
updateByPrimaryKeySelective
(
DmpComputEngine
dmpComputEngine
)
throws
Exception
;
/**主键查询计算引擎表
* @param engineId
* @return
* @throws Exception
*/
public
DmpComputEngine
selectByPrimaryKey
(
Integer
engineId
)
throws
Exception
;
/**主键删除计算引擎表
* @param engineId
* @return
* @throws Exception
*/
public
int
deleteByPrimaryKey
(
Integer
engineId
)
throws
Exception
;
/**主键软删除计算引擎表
* @param engineId
* @return
* @throws Exception
*/
public
int
softDeleteByPrimaryKey
(
Integer
engineId
)
throws
Exception
;
/**主键删除计算引擎表
* @param engineId
* @return
* @throws Exception
*/
public
int
delete
(
Map
<
String
,
Object
>
param
)
throws
Exception
;
/**主键软删除计算引擎表
* @param engineId
* @return
* @throws Exception
*/
public
int
softDelete
(
Map
<
String
,
Object
>
param
)
throws
Exception
;
/**条件查询计算引擎表
* @param param
* @return
* @throws Exception
*/
public
List
<
DmpComputEngineDto
>
findList
(
Map
<
String
,
Object
>
param
)
throws
Exception
;
/**主键查询计算引擎表
* @param engineId
* @return
* @throws Exception
*/
public
DmpComputEngineDto
findById
(
Integer
engineId
)
throws
Exception
;
/**批量新增计算引擎表
* @param dmpComputEngines
* @throws Exception
*/
public
void
insertBatch
(
List
<
DmpComputEngine
>
dmpComputEngines
)
throws
Exception
;
/**
* @Title: deleteByIds
* @Description: TODO(批量删除)
* @param @param idList
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
public
void
deleteByIds
(
@Param
(
"idList"
)
List
<
Integer
>
idList
)
throws
Exception
;
/**
* @Title: softDeleteByIds
* @Description: TODO(批量软删除)
* @param @param idList
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
public
void
softDeleteByIds
(
@Param
(
"idList"
)
List
<
Integer
>
idList
)
throws
Exception
;
}
src/main/java/com/jz/dmp/cmdexectool/mapper/DmpComputEngineParamMapper.java
0 → 100644
View file @
25ec3bd8
package
com
.
jz
.
dmp
.
cmdexectool
.
mapper
;
import
java.util.List
;
import
java.util.Map
;
import
org.apache.ibatis.annotations.Param
;
import
com.jz.dmp.cmdexectool.controller.bean.DmpComputEngineParamDto
;
import
com.jz.dmp.cmdexectool.entity.DmpComputEngineParam
;
/**计算引擎参数表 mapper
* @author ybz
*
*/
public
interface
DmpComputEngineParamMapper
{
/**新增计算引擎参数表
* @param dmpComputEngineParam
* @return
* @throws Exception
*/
public
int
insert
(
DmpComputEngineParam
dmpComputEngineParam
)
throws
Exception
;
/**选择性增加计算引擎参数表
* @param dmpComputEngineParam
* @return
* @throws Exception
*/
public
int
insertSelective
(
DmpComputEngineParam
dmpComputEngineParam
)
throws
Exception
;
/**主键修改计算引擎参数表
* @param dmpComputEngineParam
* @return
* @throws Exception
*/
public
int
updateByPrimaryKey
(
DmpComputEngineParam
dmpComputEngineParam
)
throws
Exception
;
/**选择性修改计算引擎参数表
* @param dmpComputEngineParam
* @return
* @throws Exception
*/
public
int
updateByPrimaryKeySelective
(
DmpComputEngineParam
dmpComputEngineParam
)
throws
Exception
;
/**主键查询计算引擎参数表
* @param paramId
* @return
* @throws Exception
*/
public
DmpComputEngineParam
selectByPrimaryKey
(
Integer
paramId
)
throws
Exception
;
/**主键删除计算引擎参数表
* @param paramId
* @return
* @throws Exception
*/
public
int
deleteByPrimaryKey
(
Integer
paramId
)
throws
Exception
;
/**主键软删除计算引擎参数表
* @param paramId
* @return
* @throws Exception
*/
public
int
softDeleteByPrimaryKey
(
Integer
paramId
)
throws
Exception
;
/**主键删除计算引擎参数表
* @param paramId
* @return
* @throws Exception
*/
public
int
delete
(
Map
<
String
,
Object
>
param
)
throws
Exception
;
/**主键软删除计算引擎参数表
* @param paramId
* @return
* @throws Exception
*/
public
int
softDelete
(
Map
<
String
,
Object
>
param
)
throws
Exception
;
/**条件查询计算引擎参数表
* @param param
* @return
* @throws Exception
*/
public
List
<
DmpComputEngineParamDto
>
findList
(
Map
<
String
,
Object
>
param
)
throws
Exception
;
/**主键查询计算引擎参数表
* @param paramId
* @return
* @throws Exception
*/
public
DmpComputEngineParamDto
findById
(
Integer
paramId
)
throws
Exception
;
/**批量新增计算引擎参数表
* @param dmpComputEngineParams
* @throws Exception
*/
public
void
insertBatch
(
List
<
DmpComputEngineParam
>
dmpComputEngineParams
)
throws
Exception
;
/**
* @Title: deleteByIds
* @Description: TODO(批量删除)
* @param @param idList
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
public
void
deleteByIds
(
@Param
(
"idList"
)
List
<
Integer
>
idList
)
throws
Exception
;
/**
* @Title: softDeleteByIds
* @Description: TODO(批量软删除)
* @param @param idList
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
public
void
softDeleteByIds
(
@Param
(
"idList"
)
List
<
Integer
>
idList
)
throws
Exception
;
}
src/main/java/com/jz/dmp/cmdexectool/mapper/DmpProjectConfigEngineMapper.java
0 → 100644
View file @
25ec3bd8
package
com
.
jz
.
dmp
.
cmdexectool
.
mapper
;
import
java.util.List
;
import
java.util.Map
;
import
org.apache.ibatis.annotations.Param
;
import
com.jz.dmp.cmdexectool.controller.bean.DmpProjectConfigEngineDto
;
import
com.jz.dmp.cmdexectool.entity.DmpProjectConfigEngine
;
/**项目配置计算引擎关系表 mapper
* @author ybz
*
*/
public
interface
DmpProjectConfigEngineMapper
{
/**新增项目配置计算引擎关系表
* @param dmpProjectConfigEngine
* @return
* @throws Exception
*/
public
int
insert
(
DmpProjectConfigEngine
dmpProjectConfigEngine
)
throws
Exception
;
/**选择性增加项目配置计算引擎关系表
* @param dmpProjectConfigEngine
* @return
* @throws Exception
*/
public
int
insertSelective
(
DmpProjectConfigEngine
dmpProjectConfigEngine
)
throws
Exception
;
/**主键修改项目配置计算引擎关系表
* @param dmpProjectConfigEngine
* @return
* @throws Exception
*/
public
int
updateByPrimaryKey
(
DmpProjectConfigEngine
dmpProjectConfigEngine
)
throws
Exception
;
/**选择性修改项目配置计算引擎关系表
* @param dmpProjectConfigEngine
* @return
* @throws Exception
*/
public
int
updateByPrimaryKeySelective
(
DmpProjectConfigEngine
dmpProjectConfigEngine
)
throws
Exception
;
/**主键查询项目配置计算引擎关系表
* @param configEngineId
* @return
* @throws Exception
*/
public
DmpProjectConfigEngine
selectByPrimaryKey
(
Integer
configEngineId
)
throws
Exception
;
/**主键删除项目配置计算引擎关系表
* @param configEngineId
* @return
* @throws Exception
*/
public
int
deleteByPrimaryKey
(
Integer
configEngineId
)
throws
Exception
;
/**主键软删除项目配置计算引擎关系表
* @param configEngineId
* @return
* @throws Exception
*/
public
int
softDeleteByPrimaryKey
(
Integer
configEngineId
)
throws
Exception
;
/**主键删除项目配置计算引擎关系表
* @param configEngineId
* @return
* @throws Exception
*/
public
int
delete
(
Map
<
String
,
Object
>
param
)
throws
Exception
;
/**主键软删除项目配置计算引擎关系表
* @param configEngineId
* @return
* @throws Exception
*/
public
int
softDelete
(
Map
<
String
,
Object
>
param
)
throws
Exception
;
/**条件查询项目配置计算引擎关系表
* @param param
* @return
* @throws Exception
*/
public
List
<
DmpProjectConfigEngineDto
>
findList
(
Map
<
String
,
Object
>
param
)
throws
Exception
;
/**主键查询项目配置计算引擎关系表
* @param configEngineId
* @return
* @throws Exception
*/
public
DmpProjectConfigEngineDto
findById
(
Integer
configEngineId
)
throws
Exception
;
/**批量新增项目配置计算引擎关系表
* @param dmpProjectConfigEngines
* @throws Exception
*/
public
void
insertBatch
(
List
<
DmpProjectConfigEngine
>
dmpProjectConfigEngines
)
throws
Exception
;
/**
* @Title: deleteByIds
* @Description: TODO(批量删除)
* @param @param idList
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
public
void
deleteByIds
(
@Param
(
"idList"
)
List
<
Integer
>
idList
)
throws
Exception
;
/**
* @Title: softDeleteByIds
* @Description: TODO(批量软删除)
* @param @param idList
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
public
void
softDeleteByIds
(
@Param
(
"idList"
)
List
<
Integer
>
idList
)
throws
Exception
;
}
src/main/java/com/jz/dmp/cmdexectool/mapper/DmpProjectConfigInfoMapper.java
0 → 100644
View file @
25ec3bd8
package
com
.
jz
.
dmp
.
cmdexectool
.
mapper
;
import
java.util.List
;
import
java.util.Map
;
import
org.apache.ibatis.annotations.Param
;
import
com.jz.dmp.cmdexectool.controller.bean.DmpProjectConfigInfoDto
;
import
com.jz.dmp.cmdexectool.entity.DmpProjectConfigInfo
;
/**项目配置表 mapper
* @author ybz
*
*/
public
interface
DmpProjectConfigInfoMapper
{
/**新增项目配置表
* @param dmpProjectConfigInfo
* @return
* @throws Exception
*/
public
int
insert
(
DmpProjectConfigInfo
dmpProjectConfigInfo
)
throws
Exception
;
/**选择性增加项目配置表
* @param dmpProjectConfigInfo
* @return
* @throws Exception
*/
public
int
insertSelective
(
DmpProjectConfigInfo
dmpProjectConfigInfo
)
throws
Exception
;
/**主键修改项目配置表
* @param dmpProjectConfigInfo
* @return
* @throws Exception
*/
public
int
updateByPrimaryKey
(
DmpProjectConfigInfo
dmpProjectConfigInfo
)
throws
Exception
;
/**选择性修改项目配置表
* @param dmpProjectConfigInfo
* @return
* @throws Exception
*/
public
int
updateByPrimaryKeySelective
(
DmpProjectConfigInfo
dmpProjectConfigInfo
)
throws
Exception
;
/**主键查询项目配置表
* @param projectConfigId
* @return
* @throws Exception
*/
public
DmpProjectConfigInfo
selectByPrimaryKey
(
Integer
projectConfigId
)
throws
Exception
;
/**主键删除项目配置表
* @param projectConfigId
* @return
* @throws Exception
*/
public
int
deleteByPrimaryKey
(
Integer
projectConfigId
)
throws
Exception
;
/**主键软删除项目配置表
* @param projectConfigId
* @return
* @throws Exception
*/
public
int
softDeleteByPrimaryKey
(
Integer
projectConfigId
)
throws
Exception
;
/**主键删除项目配置表
* @param projectConfigId
* @return
* @throws Exception
*/
public
int
delete
(
Map
<
String
,
Object
>
param
)
throws
Exception
;
/**主键软删除项目配置表
* @param projectConfigId
* @return
* @throws Exception
*/
public
int
softDelete
(
Map
<
String
,
Object
>
param
)
throws
Exception
;
/**条件查询项目配置表
* @param param
* @return
* @throws Exception
*/
public
List
<
DmpProjectConfigInfoDto
>
findList
(
Map
<
String
,
Object
>
param
)
throws
Exception
;
/**主键查询项目配置表
* @param projectConfigId
* @return
* @throws Exception
*/
public
DmpProjectConfigInfoDto
findById
(
Integer
projectConfigId
)
throws
Exception
;
/**批量新增项目配置表
* @param dmpProjectConfigInfos
* @throws Exception
*/
public
void
insertBatch
(
List
<
DmpProjectConfigInfo
>
dmpProjectConfigInfos
)
throws
Exception
;
/**
* @Title: deleteByIds
* @Description: TODO(批量删除)
* @param @param idList
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
public
void
deleteByIds
(
@Param
(
"idList"
)
List
<
Integer
>
idList
)
throws
Exception
;
/**
* @Title: softDeleteByIds
* @Description: TODO(批量软删除)
* @param @param idList
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
public
void
softDeleteByIds
(
@Param
(
"idList"
)
List
<
Integer
>
idList
)
throws
Exception
;
}
src/main/java/com/jz/dmp/cmdexectool/mapper/DmpProjectEngineParamMapper.java
0 → 100644
View file @
25ec3bd8
package
com
.
jz
.
dmp
.
cmdexectool
.
mapper
;
import
java.util.List
;
import
java.util.Map
;
import
org.apache.ibatis.annotations.Param
;
import
com.jz.dmp.cmdexectool.controller.bean.DmpProjectEngineParamDto
;
import
com.jz.dmp.cmdexectool.entity.DmpProjectEngineParam
;
/**计算引擎项目参数表 mapper
* @author ybz
*
*/
public
interface
DmpProjectEngineParamMapper
{
/**新增计算引擎项目参数表
* @param dmpProjectEngineParam
* @return
* @throws Exception
*/
public
int
insert
(
DmpProjectEngineParam
dmpProjectEngineParam
)
throws
Exception
;
/**选择性增加计算引擎项目参数表
* @param dmpProjectEngineParam
* @return
* @throws Exception
*/
public
int
insertSelective
(
DmpProjectEngineParam
dmpProjectEngineParam
)
throws
Exception
;
/**主键修改计算引擎项目参数表
* @param dmpProjectEngineParam
* @return
* @throws Exception
*/
public
int
updateByPrimaryKey
(
DmpProjectEngineParam
dmpProjectEngineParam
)
throws
Exception
;
/**选择性修改计算引擎项目参数表
* @param dmpProjectEngineParam
* @return
* @throws Exception
*/
public
int
updateByPrimaryKeySelective
(
DmpProjectEngineParam
dmpProjectEngineParam
)
throws
Exception
;
/**主键查询计算引擎项目参数表
* @param projectParamId
* @return
* @throws Exception
*/
public
DmpProjectEngineParam
selectByPrimaryKey
(
Integer
projectParamId
)
throws
Exception
;
/**主键删除计算引擎项目参数表
* @param projectParamId
* @return
* @throws Exception
*/
public
int
deleteByPrimaryKey
(
Integer
projectParamId
)
throws
Exception
;
/**主键软删除计算引擎项目参数表
* @param projectParamId
* @return
* @throws Exception
*/
public
int
softDeleteByPrimaryKey
(
Integer
projectParamId
)
throws
Exception
;
/**主键删除计算引擎项目参数表
* @param projectParamId
* @return
* @throws Exception
*/
public
int
delete
(
Map
<
String
,
Object
>
param
)
throws
Exception
;
/**主键软删除计算引擎项目参数表
* @param projectParamId
* @return
* @throws Exception
*/
public
int
softDelete
(
Map
<
String
,
Object
>
param
)
throws
Exception
;
/**条件查询计算引擎项目参数表
* @param param
* @return
* @throws Exception
*/
public
List
<
DmpProjectEngineParamDto
>
findList
(
Map
<
String
,
Object
>
param
)
throws
Exception
;
/**主键查询计算引擎项目参数表
* @param projectParamId
* @return
* @throws Exception
*/
public
DmpProjectEngineParamDto
findById
(
Integer
projectParamId
)
throws
Exception
;
/**批量新增计算引擎项目参数表
* @param dmpProjectEngineParams
* @throws Exception
*/
public
void
insertBatch
(
List
<
DmpProjectEngineParam
>
dmpProjectEngineParams
)
throws
Exception
;
/**
* @Title: deleteByIds
* @Description: TODO(批量删除)
* @param @param idList
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
public
void
deleteByIds
(
@Param
(
"idList"
)
List
<
Integer
>
idList
)
throws
Exception
;
/**
* @Title: softDeleteByIds
* @Description: TODO(批量软删除)
* @param @param idList
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
public
void
softDeleteByIds
(
@Param
(
"idList"
)
List
<
Integer
>
idList
)
throws
Exception
;
}
src/main/java/com/jz/dmp/cmdexectool/mapper/DmpPublicConfigInfoMapper.java
0 → 100644
View file @
25ec3bd8
package
com
.
jz
.
dmp
.
cmdexectool
.
mapper
;
import
java.util.List
;
import
java.util.Map
;
import
org.apache.ibatis.annotations.Param
;
import
com.jz.dmp.cmdexectool.controller.bean.DmpPublicConfigInfoDto
;
import
com.jz.dmp.cmdexectool.entity.DmpPublicConfigInfo
;
/**公共配置表 mapper
* @author ybz
*
*/
public
interface
DmpPublicConfigInfoMapper
{
/**新增公共配置表
* @param dmpPublicConfigInfo
* @return
* @throws Exception
*/
public
int
insert
(
DmpPublicConfigInfo
dmpPublicConfigInfo
)
throws
Exception
;
/**选择性增加公共配置表
* @param dmpPublicConfigInfo
* @return
* @throws Exception
*/
public
int
insertSelective
(
DmpPublicConfigInfo
dmpPublicConfigInfo
)
throws
Exception
;
/**主键修改公共配置表
* @param dmpPublicConfigInfo
* @return
* @throws Exception
*/
public
int
updateByPrimaryKey
(
DmpPublicConfigInfo
dmpPublicConfigInfo
)
throws
Exception
;
/**选择性修改公共配置表
* @param dmpPublicConfigInfo
* @return
* @throws Exception
*/
public
int
updateByPrimaryKeySelective
(
DmpPublicConfigInfo
dmpPublicConfigInfo
)
throws
Exception
;
/**主键查询公共配置表
* @param publicConfigId
* @return
* @throws Exception
*/
public
DmpPublicConfigInfo
selectByPrimaryKey
(
Integer
publicConfigId
)
throws
Exception
;
/**主键删除公共配置表
* @param publicConfigId
* @return
* @throws Exception
*/
public
int
deleteByPrimaryKey
(
Integer
publicConfigId
)
throws
Exception
;
/**主键软删除公共配置表
* @param publicConfigId
* @return
* @throws Exception
*/
public
int
softDeleteByPrimaryKey
(
Integer
publicConfigId
)
throws
Exception
;
/**主键删除公共配置表
* @param publicConfigId
* @return
* @throws Exception
*/
public
int
delete
(
Map
<
String
,
Object
>
param
)
throws
Exception
;
/**主键软删除公共配置表
* @param publicConfigId
* @return
* @throws Exception
*/
public
int
softDelete
(
Map
<
String
,
Object
>
param
)
throws
Exception
;
/**条件查询公共配置表
* @param param
* @return
* @throws Exception
*/
public
List
<
DmpPublicConfigInfoDto
>
findList
(
Map
<
String
,
Object
>
param
)
throws
Exception
;
/**主键查询公共配置表
* @param publicConfigId
* @return
* @throws Exception
*/
public
DmpPublicConfigInfoDto
findById
(
Integer
publicConfigId
)
throws
Exception
;
/**批量新增公共配置表
* @param dmpPublicConfigInfos
* @throws Exception
*/
public
void
insertBatch
(
List
<
DmpPublicConfigInfo
>
dmpPublicConfigInfos
)
throws
Exception
;
/**
* @Title: deleteByIds
* @Description: TODO(批量删除)
* @param @param idList
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
public
void
deleteByIds
(
@Param
(
"idList"
)
List
<
Integer
>
idList
)
throws
Exception
;
/**
* @Title: softDeleteByIds
* @Description: TODO(批量软删除)
* @param @param idList
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
public
void
softDeleteByIds
(
@Param
(
"idList"
)
List
<
Integer
>
idList
)
throws
Exception
;
}
src/main/java/com/jz/dmp/cmdexectool/mapper/DmpSyncingDatasourceDao.java
0 → 100644
View file @
25ec3bd8
package
com
.
jz
.
dmp
.
cmdexectool
.
mapper
;
import
com.jz.dmp.cmdexectool.entity.DmpSyncingDatasource
;
/**
* 数据源配置(DmpSyncingDatasource)表数据库访问层
*
* @author Bellamy
* @since 2020-12-24 14:09:59
*/
public
interface
DmpSyncingDatasourceDao
{
/**
* 通过ID查询单条数据
*
* @param id 主键
* @return 实例对象
*/
DmpSyncingDatasource
queryById
(
Integer
id
);
}
\ No newline at end of file
src/main/java/com/jz/dmp/cmdexectool/scheduler/common/task/AbstractParameters.java
View file @
25ec3bd8
...
...
@@ -31,9 +31,6 @@ public abstract class AbstractParameters implements IParameters {
@Override
public
abstract
boolean
checkParameters
();
@Override
public
abstract
List
<
ResourceInfo
>
getResourceFilesList
();
/**
* local parameters
*/
...
...
src/main/java/com/jz/dmp/cmdexectool/scheduler/common/task/shell/ShellParameters.java
View file @
25ec3bd8
...
...
@@ -33,6 +33,8 @@ public class ShellParameters extends AbstractParameters {
*/
private
String
script
;
private
String
taskAppId
;
/**
* resource list
*/
...
...
@@ -46,6 +48,14 @@ public class ShellParameters extends AbstractParameters {
this
.
script
=
script
;
}
public
String
getTaskAppId
()
{
return
taskAppId
;
}
public
void
setTaskAppId
(
String
taskAppId
)
{
this
.
taskAppId
=
taskAppId
;
}
public
List
<
ResourceInfo
>
getResourceList
()
{
return
resourceList
;
}
...
...
@@ -72,7 +82,7 @@ public class ShellParameters extends AbstractParameters {
* @return TaskExecutionContext 返回类型
* @throws
*/
public
static
TaskExecutionContext
getTaskExecutionContext
(
DmpDevelopTaskDto
dmpDevelopTaskDto
)
{
public
TaskExecutionContext
getTaskExecutionContext
(
)
{
TaskExecutionContext
taskExecutionContext
=
new
TaskExecutionContext
();
// taskName;
...
...
@@ -82,7 +92,7 @@ public class ShellParameters extends AbstractParameters {
// host;
// executePath;
taskExecutionContext
.
setExecutePath
(
"E:/test"
);
//
taskExecutionContext.setExecutePath("E:/test");
// logPath;
// taskJson;
...
...
@@ -92,12 +102,12 @@ public class ShellParameters extends AbstractParameters {
// projectId;
// taskParams;
taskExecutionContext
.
setTaskParams
(
dmpDevelopTaskDto
.
getScript
()
);
taskExecutionContext
.
setTaskParams
(
script
);
// envFile;
// taskAppId
taskExecutionContext
.
setTaskAppId
(
"test"
);
taskExecutionContext
.
setTaskAppId
(
taskAppId
);
return
taskExecutionContext
;
}
...
...
src/main/java/com/jz/dmp/cmdexectool/scheduler/common/task/sql/SqlParameters.java
View file @
25ec3bd8
...
...
@@ -16,199 +16,206 @@
*/
package
com
.
jz
.
dmp
.
cmdexectool
.
scheduler
.
common
.
task
.
sql
;
import
com.alibaba.fastjson.JSONObject
;
import
com.jz.dmp.cmdexectool.common.constant.CommConstant
;
import
com.jz.dmp.cmdexectool.controller.bean.DmpProjectConfigInfoDto
;
import
com.jz.dmp.cmdexectool.entity.DmpSyncingDatasource
;
import
com.jz.dmp.cmdexectool.mapper.DmpSyncingDatasourceDao
;
import
com.jz.dmp.cmdexectool.scheduler.common.process.ResourceInfo
;
import
com.jz.dmp.cmdexectool.scheduler.common.task.AbstractParameters
;
import
org.apache.commons.lang.StringUtils
;
import
com.jz.dmp.cmdexectool.scheduler.server.entity.TaskExecutionContext
;
import
java.util.
ArrayList
;
import
java.util.
HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* Sql/Hql parameter
*/
public
class
SqlParameters
extends
AbstractParameters
{
/**
* data source type,eg MYSQL, POSTGRES, HIVE ...
* shell script
*/
private
String
type
;
private
String
script
;
/**
* datasource id
*/
private
int
datasource
;
private
String
taskAppId
;
/**
* sql
* 数据源相关配置
*/
private
String
sql
;
private
Map
<
String
,
Object
>
source
;
/**
* sql type
* 0 query
* 1 NON_QUERY
* 目标相关配置
*/
private
int
sqlType
;
private
Map
<
String
,
Object
>
sink
;
/**
* udf list
*/
private
String
udfs
;
/**
* show type
* 0 TABLE
* 1 TEXT
* 2 attachment
* 3 TABLE+attachment
*/
private
String
showType
;
/**
* SQL connection parameters
*/
private
String
connParams
;
/**
* Pre Statements
*/
private
List
<
String
>
preStatements
;
/**
* Post Statements
* 环境相关配置
*/
private
List
<
String
>
postStatements
;
private
Map
<
String
,
Object
>
env
;
/**
* title
* ETL相关配置
*/
private
String
title
;
private
Map
<
String
,
Object
>
transform
;
/**
* receivers
* resource list
*/
private
String
receivers
;
private
List
<
ResourceInfo
>
resourceList
;
/**
* receivers cc
*/
private
String
receiversCc
;
public
SqlParameters
(
String
script
,
DmpProjectConfigInfoDto
projectConfigInfoDto
,
DmpSyncingDatasourceDao
dmpSyncingDatasourceDao
)
{
this
.
script
=
script
;
public
String
getType
()
{
return
type
;
}
JSONObject
scriptObj
=
JSONObject
.
parseObject
(
script
);
String
outputType
=
scriptObj
.
getString
(
"outputType"
);
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
String
sqlScript
=
scriptObj
.
getString
(
"sqlScript"
);
public
int
getDatasource
()
{
return
datasource
;
}
public
void
setDatasource
(
int
datasource
)
{
this
.
datasource
=
datasource
;
}
//evn
env
.
put
(
"spark.app.name"
,
"Waterdrop"
);
//source
Integer
sourceId
=
scriptObj
.
getInteger
(
"sourceId"
);
DmpSyncingDatasource
dmpSyncingDatasource
=
dmpSyncingDatasourceDao
.
queryById
(
sourceId
);
public
String
getSql
()
{
return
sql
;
}
Map
<
String
,
Object
>
jdbcMap
=
new
HashMap
<
String
,
Object
>();
jdbcMap
.
put
(
"driver"
,
"com.mysql.jdbc.Driver"
);
jdbcMap
.
put
(
"url"
,
dmpSyncingDatasource
.
getJdbcUrl
());
//jdbcMap.put("table", value);
//jdbcMap.put("result_table_name", value);
//jdbcMap.put("user", dmpSyncingDatasource.getUserName());
//jdbcMap.put("password", dmpSyncingDatasource.getPassword());
//jdbcMap.put("", value);
//jdbcMap.put("", value);
//jdbcMap.put("", value);
//jdbcMap.put("", value);
source
.
put
(
"jdbc"
,
jdbcMap
);
public
void
setSql
(
String
sql
)
{
this
.
sql
=
sql
;
}
if
(
CommConstant
.
OUTPUT_TYPE_CONSOLE
.
equals
(
outputType
))
{
//transform
Map
<
String
,
Object
>
sqlMap
=
new
HashMap
<
String
,
Object
>();
sqlMap
.
put
(
"sql"
,
sqlScript
);
transform
.
put
(
"sql"
,
sqlMap
);
//sink
Map
<
String
,
Object
>
stdoutMap
=
new
HashMap
<
String
,
Object
>();
stdoutMap
.
put
(
"limit"
,
10
);
stdoutMap
.
put
(
"serializer"
,
"json"
);
sink
.
put
(
"stdout"
,
stdoutMap
);
}
else
if
(
CommConstant
.
OUTPUT_TYPE_HDFS
.
equals
(
outputType
))
{
//transform
public
String
getUdfs
()
{
return
udfs
;
}
//sink
public
void
setUdfs
(
String
udfs
)
{
this
.
udfs
=
udfs
;
}
}
else
if
(
CommConstant
.
OUTPUT_TYPE_TABLE
.
equals
(
outputType
))
{
}
else
if
(
CommConstant
.
OUTPUT_TYPE_TOPIC
.
equals
(
outputType
))
{
}
else
if
(
CommConstant
.
OUTPUT_TYPE_API
.
equals
(
outputType
))
{
public
int
getSqlType
()
{
return
sqlType
;
}
public
void
setSqlType
(
int
sqlType
)
{
this
.
sqlType
=
sqlType
;
}
public
String
getShowType
()
{
return
showType
;
public
String
getScript
()
{
return
script
;
}
public
void
setShowType
(
String
showType
)
{
this
.
showType
=
showType
;
public
void
setScript
(
String
script
)
{
this
.
script
=
script
;
}
public
String
getConnParams
()
{
return
connParams
;
public
String
getTaskAppId
()
{
return
taskAppId
;
}
public
void
setConnParams
(
String
connParams
)
{
this
.
connParams
=
connParams
;
public
void
setTaskAppId
(
String
taskAppId
)
{
this
.
taskAppId
=
taskAppId
;
}
public
String
getTitl
e
()
{
return
titl
e
;
public
Map
<
String
,
Object
>
getSourc
e
()
{
return
sourc
e
;
}
public
void
setTitle
(
String
titl
e
)
{
this
.
title
=
titl
e
;
public
void
setSource
(
Map
<
String
,
Object
>
sourc
e
)
{
this
.
source
=
sourc
e
;
}
public
String
getReceivers
()
{
return
receivers
;
public
Map
<
String
,
Object
>
getSink
()
{
return
sink
;
}
public
void
setReceivers
(
String
receivers
)
{
this
.
receivers
=
receivers
;
public
void
setSink
(
Map
<
String
,
Object
>
sink
)
{
this
.
sink
=
sink
;
}
public
String
getReceiversCc
()
{
return
receiversCc
;
public
Map
<
String
,
Object
>
getEnv
()
{
return
env
;
}
public
void
setReceiversCc
(
String
receiversCc
)
{
this
.
receiversCc
=
receiversCc
;
public
void
setEnv
(
Map
<
String
,
Object
>
env
)
{
this
.
env
=
env
;
}
public
List
<
String
>
getPreStatements
()
{
return
preStatements
;
public
Map
<
String
,
Object
>
getTransform
()
{
return
transform
;
}
public
void
setPreStatements
(
List
<
String
>
preStatements
)
{
this
.
preStatements
=
preStatements
;
public
void
setTransform
(
Map
<
String
,
Object
>
transform
)
{
this
.
transform
=
transform
;
}
public
List
<
String
>
getPostStatements
()
{
return
postStatements
;
public
List
<
ResourceInfo
>
getResourceList
()
{
return
resourceList
;
}
public
void
setPostStatements
(
List
<
String
>
postStatements
)
{
this
.
postStatements
=
postStatements
;
public
void
setResourceList
(
List
<
ResourceInfo
>
resourceList
)
{
this
.
resourceList
=
resourceList
;
}
@Override
public
boolean
checkParameters
()
{
return
datasource
!=
0
&&
StringUtils
.
isNotEmpty
(
type
)
&&
StringUtils
.
isNotEmpty
(
sql
);
return
script
!=
null
&&
!
script
.
isEmpty
(
);
}
@Override
public
List
<
ResourceInfo
>
getResourceFilesList
()
{
return
new
ArrayList
<>()
;
return
resourceList
;
}
@Override
public
String
toString
()
{
return
"SqlParameters{"
+
"type='"
+
type
+
'\''
+
", datasource="
+
datasource
+
", sql='"
+
sql
+
'\''
+
", sqlType="
+
sqlType
+
", udfs='"
+
udfs
+
'\''
+
", showType='"
+
showType
+
'\''
+
", connParams='"
+
connParams
+
'\''
+
", title='"
+
title
+
'\''
+
", receivers='"
+
receivers
+
'\''
+
", receiversCc='"
+
receiversCc
+
'\''
+
", preStatements="
+
preStatements
+
", postStatements="
+
postStatements
+
'}'
;
/**
* @Title: getTaskExecutionContext @Description:
* TODO(获取TaskExecutionContext) @param @param dmpDevelopTaskDto @param @return
* 参数 @return TaskExecutionContext 返回类型 @throws
*/
public
TaskExecutionContext
getTaskExecutionContext
()
{
TaskExecutionContext
taskExecutionContext
=
new
TaskExecutionContext
();
// taskName;
// taskType;
taskExecutionContext
.
setTaskType
(
CommConstant
.
WORK_TYPE_SQL
);
// host;
// executePath;
// taskExecutionContext.setExecutePath("E:/test");
// logPath;
// taskJson;
// globalParams;
// projectId;
// taskParams;
taskExecutionContext
.
setTaskParams
(
JSONObject
.
toJSONString
(
this
));
// envFile;
// taskAppId
taskExecutionContext
.
setTaskAppId
(
taskAppId
);
return
taskExecutionContext
;
}
}
src/main/java/com/jz/dmp/cmdexectool/scheduler/server/worker/task/TaskManager.java
View file @
25ec3bd8
...
...
@@ -27,6 +27,8 @@ import com.jz.dmp.cmdexectool.scheduler.server.entity.TaskExecutionContext;
//import com.jz.dmp.cmdexectool.scheduler.server.worker.task.processdure.ProcedureTask;
//import com.jz.dmp.cmdexectool.scheduler.server.worker.task.python.PythonTask;
import
com.jz.dmp.cmdexectool.scheduler.server.worker.task.shell.ShellTask
;
import
com.jz.dmp.cmdexectool.scheduler.server.worker.task.sql.SqlTask
;
//import com.jz.dmp.cmdexectool.scheduler.server.worker.task.spark.SparkTask;
//import com.jz.dmp.cmdexectool.scheduler.server.worker.task.sql.SqlTask;
//import com.jz.dmp.cmdexectool.scheduler.server.worker.task.sqoop.SqoopTask;
...
...
@@ -59,8 +61,8 @@ public class TaskManager {
return
new
ShellTask
(
taskExecutionContext
,
logger
);
//case PROCEDURE:
// return new ProcedureTask(taskExecutionContext, logger);
//
case SQL:
//
return new SqlTask(taskExecutionContext, logger);
case
SQL:
return
new
SqlTask
(
taskExecutionContext
,
logger
);
//case MR:
// return new MapReduceTask(taskExecutionContext, logger);
//case SPARK:
...
...
src/main/java/com/jz/dmp/cmdexectool/scheduler/server/worker/task/sql/SqlTask.java
0 → 100644
View file @
25ec3bd8
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
com
.
jz
.
dmp
.
cmdexectool
.
scheduler
.
server
.
worker
.
task
.
sql
;
import
java.io.File
;
import
java.nio.file.Files
;
import
java.nio.file.Path
;
import
java.nio.file.StandardOpenOption
;
import
java.nio.file.attribute.FileAttribute
;
import
java.nio.file.attribute.PosixFilePermission
;
import
java.nio.file.attribute.PosixFilePermissions
;
import
java.util.Map
;
import
java.util.Set
;
import
org.slf4j.Logger
;
import
com.jz.dmp.cmdexectool.scheduler.common.Constants
;
import
com.jz.dmp.cmdexectool.scheduler.common.enums.CommandType
;
import
com.jz.dmp.cmdexectool.scheduler.common.process.Property
;
import
com.jz.dmp.cmdexectool.scheduler.common.task.AbstractParameters
;
import
com.jz.dmp.cmdexectool.scheduler.common.task.sql.SqlParameters
;
import
com.jz.dmp.cmdexectool.scheduler.common.utils.DateUtils
;
import
com.jz.dmp.cmdexectool.scheduler.common.utils.JSONUtils
;
import
com.jz.dmp.cmdexectool.scheduler.common.utils.OSUtils
;
import
com.jz.dmp.cmdexectool.scheduler.common.utils.ParameterUtils
;
import
com.jz.dmp.cmdexectool.scheduler.server.entity.TaskExecutionContext
;
import
com.jz.dmp.cmdexectool.scheduler.server.utils.ParamUtils
;
import
com.jz.dmp.cmdexectool.scheduler.server.worker.task.AbstractTask
;
import
com.jz.dmp.cmdexectool.scheduler.server.worker.task.CommandExecuteResult
;
import
com.jz.dmp.cmdexectool.scheduler.server.worker.task.ShellCommandExecutor
;
/**
* sql task
*/
public
class
SqlTask
extends
AbstractTask
{
/**
* sql parameters
*/
private
SqlParameters
sqlParameters
;
/**
* shell command executor
*/
private
ShellCommandExecutor
shellCommandExecutor
;
/**
* taskExecutionContext
*/
private
TaskExecutionContext
taskExecutionContext
;
/**
* constructor
*
* @param taskExecutionContext taskExecutionContext
* @param logger logger
*/
public
SqlTask
(
TaskExecutionContext
taskExecutionContext
,
Logger
logger
)
{
super
(
taskExecutionContext
,
logger
);
this
.
taskExecutionContext
=
taskExecutionContext
;
this
.
shellCommandExecutor
=
new
ShellCommandExecutor
(
this
::
logHandle
,
taskExecutionContext
,
logger
);
}
@Override
public
void
init
()
{
logger
.
info
(
"sql task params {}"
,
taskExecutionContext
.
getTaskParams
());
sqlParameters
=
JSONUtils
.
parseObject
(
taskExecutionContext
.
getTaskParams
(),
SqlParameters
.
class
);
if
(!
sqlParameters
.
checkParameters
())
{
throw
new
RuntimeException
(
"shell task params is not valid"
);
}
}
@Override
public
void
handle
()
throws
Exception
{
try
{
// construct process
CommandExecuteResult
commandExecuteResult
=
shellCommandExecutor
.
run
(
buildCommand
());
setExitStatusCode
(
commandExecuteResult
.
getExitStatusCode
());
setAppIds
(
commandExecuteResult
.
getAppIds
());
setProcessId
(
commandExecuteResult
.
getProcessId
());
}
catch
(
Exception
e
)
{
logger
.
error
(
"sql task error"
,
e
);
setExitStatusCode
(
Constants
.
EXIT_CODE_FAILURE
);
throw
e
;
}
}
@Override
public
void
cancelApplication
(
boolean
cancelApplication
)
throws
Exception
{
// cancel process
shellCommandExecutor
.
cancelApplication
();
}
/**
* create command
*
* @return file name
* @throws Exception exception
*/
private
String
buildCommand
()
throws
Exception
{
// generate scripts
String
fileName
=
String
.
format
(
"%s/%s_node.%s"
,
taskExecutionContext
.
getExecutePath
(),
taskExecutionContext
.
getTaskAppId
(),
OSUtils
.
isWindows
()
?
"bat"
:
"sh"
);
Path
path
=
new
File
(
fileName
).
toPath
();
if
(
Files
.
exists
(
path
))
{
return
fileName
;
}
String
script
=
sqlParameters
.
getScript
().
replaceAll
(
"\\r\\n"
,
"\n"
);
/**
* combining local and global parameters
*/
Map
<
String
,
Property
>
paramsMap
=
ParamUtils
.
convert
(
ParamUtils
.
getUserDefParamsMap
(
taskExecutionContext
.
getDefinedParams
()),
taskExecutionContext
.
getDefinedParams
(),
sqlParameters
.
getLocalParametersMap
(),
CommandType
.
of
(
taskExecutionContext
.
getCmdTypeIfComplement
()),
taskExecutionContext
.
getScheduleTime
());
if
(
paramsMap
!=
null
)
{
script
=
ParameterUtils
.
convertParameterPlaceholders
(
script
,
ParamUtils
.
convert
(
paramsMap
));
}
// new
// replace variable TIME with $[YYYYmmddd...] in shell file when history run job
// and batch complement job
if
(
paramsMap
!=
null
)
{
if
(
taskExecutionContext
.
getScheduleTime
()
!=
null
)
{
String
dateTime
=
DateUtils
.
format
(
taskExecutionContext
.
getScheduleTime
(),
Constants
.
PARAMETER_FORMAT_TIME
);
Property
p
=
new
Property
();
p
.
setValue
(
dateTime
);
p
.
setProp
(
Constants
.
PARAMETER_SHECDULE_TIME
);
paramsMap
.
put
(
Constants
.
PARAMETER_SHECDULE_TIME
,
p
);
}
script
=
ParameterUtils
.
convertParameterPlaceholders2
(
script
,
ParamUtils
.
convert
(
paramsMap
));
}
sqlParameters
.
setScript
(
script
);
logger
.
info
(
"raw script : {}"
,
sqlParameters
.
getScript
());
logger
.
info
(
"task execute path : {}"
,
taskExecutionContext
.
getExecutePath
());
Set
<
PosixFilePermission
>
perms
=
PosixFilePermissions
.
fromString
(
Constants
.
RWXR_XR_X
);
FileAttribute
<
Set
<
PosixFilePermission
>>
attr
=
PosixFilePermissions
.
asFileAttribute
(
perms
);
if
(
OSUtils
.
isWindows
())
{
// Files.createFile(path);
File
file
=
path
.
toFile
();
File
parentFile
=
file
.
getParentFile
();
if
(!
parentFile
.
exists
())
{
parentFile
.
mkdirs
();
}
file
.
createNewFile
();
}
else
{
Files
.
createFile
(
path
,
attr
);
}
Files
.
write
(
path
,
sqlParameters
.
getScript
().
getBytes
(),
StandardOpenOption
.
APPEND
);
return
fileName
;
}
@Override
public
AbstractParameters
getParameters
()
{
return
sqlParameters
;
}
}
src/main/java/com/jz/dmp/cmdexectool/scheduler/service/process/ProcessService.java
View file @
25ec3bd8
...
...
@@ -23,18 +23,28 @@ import java.util.Map;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.aop.ThrowsAdvice
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.CollectionUtils
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.jz.dmp.cmdexectool.common.constant.CommConstant
;
import
com.jz.dmp.cmdexectool.controller.bean.DmpDevelopTaskDto
;
import
com.jz.dmp.cmdexectool.controller.bean.DmpDevelopTaskHistoryDto
;
import
com.jz.dmp.cmdexectool.controller.bean.DmpProjectConfigInfoDto
;
import
com.jz.dmp.cmdexectool.controller.bean.MyDmpDevelopTaskConverter
;
import
com.jz.dmp.cmdexectool.controller.bean.MyDmpDevelopTaskHistoryConverter
;
import
com.jz.dmp.cmdexectool.mapper.DmpDevelopTaskHistoryMapper
;
import
com.jz.dmp.cmdexectool.mapper.DmpDevelopTaskMapper
;
import
com.jz.dmp.cmdexectool.mapper.DmpProjectConfigInfoMapper
;
import
com.jz.dmp.cmdexectool.mapper.DmpSyncingDatasourceDao
;
import
com.jz.dmp.cmdexectool.scheduler.common.Constants
;
import
com.jz.dmp.cmdexectool.scheduler.common.enums.ExecutionStatus
;
import
com.jz.dmp.cmdexectool.scheduler.common.enums.JobType
;
import
com.jz.dmp.cmdexectool.scheduler.common.task.shell.ShellParameters
;
import
com.jz.dmp.cmdexectool.scheduler.common.task.sql.SqlParameters
;
import
com.jz.dmp.cmdexectool.scheduler.dao.entity.TaskInstance
;
import
com.jz.dmp.cmdexectool.scheduler.server.entity.TaskExecutionContext
;
import
com.jz.dmp.cmdexectool.scheduler.server.worker.task.AbstractTask
;
...
...
@@ -52,6 +62,10 @@ public class ProcessService {
private
DmpDevelopTaskMapper
dmpDevelopTaskMapper
;
@Autowired
private
DmpDevelopTaskHistoryMapper
dmpDevelopTaskHistoryMapper
;
@Autowired
private
DmpProjectConfigInfoMapper
dmpProjectConfigInfoMapper
;
@Autowired
private
DmpSyncingDatasourceDao
dmpSyncingDatasourceDao
;
/**
* @Title: taskStart @Description: TODO(启动task) @param 参数 @return void
...
...
@@ -136,7 +150,101 @@ public class ProcessService {
dmpDevelopTaskDto
=
MyDmpDevelopTaskHistoryConverter
.
INSTANCE
().
historyDto2taskDto
(
dmpDevelopTaskHistoryDtos
.
get
(
0
));
}
taskExecutionContext
=
MyDmpDevelopTaskConverter
.
INSTANCE
().
dto2execcontext
(
dmpDevelopTaskDto
,
jobId
);
taskExecutionContext
=
dto2execcontext
(
dmpDevelopTaskDto
,
jobId
);
return
taskExecutionContext
;
}
/**
* @Title: dto2execcontext
* @Description: TODO(将task的job转换成taskExecutionContext)
* @param @param dmpDevelopTaskDto
* @param @param jobId
* @param @return 参数
* @return TaskExecutionContext 返回类型
* @throws
*/
private
TaskExecutionContext
dto2execcontext
(
DmpDevelopTaskDto
dmpDevelopTaskDto
,
String
jobId
)
throws
Exception
{
TaskExecutionContext
taskExecutionContext
=
new
TaskExecutionContext
();
Map
<
String
,
Object
>
param
=
new
HashMap
<
String
,
Object
>();
param
.
put
(
"projectId"
,
dmpDevelopTaskDto
.
getProjectId
());
List
<
DmpProjectConfigInfoDto
>
dtos
=
dmpProjectConfigInfoMapper
.
findList
(
param
);
if
(
CollectionUtils
.
isEmpty
(
dtos
))
{
throw
new
RuntimeException
(
"项目没有配置信息,请联系管理员"
);
}
DmpProjectConfigInfoDto
projectConfigInfoDto
=
dtos
.
get
(
0
);
JobType
jobType
=
null
;
String
script
=
""
;
String
taskAppId
=
""
;
String
taskType
=
dmpDevelopTaskDto
.
getTaskType
();
//任务类型
if
(
taskType
.
equals
(
CommConstant
.
TASK_TYPE_DEVSHELL
))
{
jobType
=
JobType
.
SHELL
;
script
=
dmpDevelopTaskDto
.
getScript
();
taskAppId
=
dmpDevelopTaskDto
.
getName
();
}
else
if
(
taskType
.
equals
(
CommConstant
.
TASK_TYPE_DEVSQL
))
{
jobType
=
JobType
.
SQL
;
script
=
dmpDevelopTaskDto
.
getScript
();
taskAppId
=
dmpDevelopTaskDto
.
getName
();
}
else
if
(
taskType
.
equals
(
CommConstant
.
TASK_TYPE_OFFLINE
))
{
jobType
=
JobType
.
SYNC
;
script
=
dmpDevelopTaskDto
.
getScript
();
taskAppId
=
dmpDevelopTaskDto
.
getName
();
}
else
if
(
taskType
.
equals
(
CommConstant
.
TASK_TYPE_DEVELOP
))
{
String
scriptStr
=
dmpDevelopTaskDto
.
getScript
();
JSONObject
scriptObj
=
JSONObject
.
parseObject
(
scriptStr
);
JSONArray
array
=
scriptObj
.
getJSONArray
(
"nodes"
);
for
(
int
i
=
0
;
i
<
array
.
size
();
i
++)
{
JSONObject
jObject
=
array
.
getJSONObject
(
i
);
String
lable
=
jObject
.
getString
(
"label"
);
if
(
jobId
.
equals
(
lable
))
{
jobType
=
JobType
.
valueOf
(
jObject
.
getString
(
"taskType"
));
//job类型
script
=
jObject
.
toJSONString
();
taskAppId
=
lable
;
break
;
}
}
}
switch
(
jobType
)
{
case
SHELL:
ShellParameters
shellParameters
=
new
ShellParameters
();
shellParameters
.
setScript
(
script
);
shellParameters
.
setTaskAppId
(
taskAppId
);
taskExecutionContext
=
shellParameters
.
getTaskExecutionContext
();
break
;
case
SQL:
SqlParameters
sqlParameters
=
new
SqlParameters
(
script
,
projectConfigInfoDto
,
dmpSyncingDatasourceDao
);
sqlParameters
.
setTaskAppId
(
taskAppId
);
taskExecutionContext
=
sqlParameters
.
getTaskExecutionContext
();
break
;
case
SYNC:
break
;
case
SUBPROCESS:
break
;
case
FTP:
break
;
case
UNZIPFILE:
break
;
case
DOCTRANS:
break
;
case
HDFS:
break
;
default
:
break
;
}
return
taskExecutionContext
;
}
...
...
src/main/resources/mapperconf/DmpComputEngineMapper.xml
0 → 100644
View file @
25ec3bd8
<?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.jz.dmp.cmdexectool.mapper.DmpComputEngineMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jz.dmp.cmdexectool.entity.DmpComputEngine"
>
<result
column=
"engine_id"
property=
"engineId"
jdbcType=
"INTEGER"
/>
<result
column=
"engine_name"
property=
"engineName"
jdbcType=
"VARCHAR"
/>
<result
column=
"remark"
property=
"remark"
jdbcType=
"VARCHAR"
/>
<result
column=
"data_status"
property=
"dataStatus"
jdbcType=
"CHAR"
/>
<result
column=
"create_user_id"
property=
"createUserId"
jdbcType=
"INTEGER"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_user_id"
property=
"updateUserId"
jdbcType=
"INTEGER"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<resultMap
id=
"paramResultMap"
type=
"com.jz.dmp.cmdexectool.controller.bean.DmpComputEngineParamDto"
>
<result
column=
"param_id"
property=
"paramId"
jdbcType=
"INTEGER"
/>
<result
column=
"engine_id"
property=
"engineId"
jdbcType=
"INTEGER"
/>
<result
column=
"param_name"
property=
"paramName"
jdbcType=
"VARCHAR"
/>
<result
column=
"param_type"
property=
"paramType"
jdbcType=
"CHAR"
/>
<result
column=
"param_value"
property=
"paramValue"
jdbcType=
"VARCHAR"
/>
<result
column=
"remark"
property=
"remark"
jdbcType=
"VARCHAR"
/>
<result
column=
"data_status"
property=
"dataStatus"
jdbcType=
"CHAR"
/>
<result
column=
"create_user_id"
property=
"createUserId"
jdbcType=
"INTEGER"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_user_id"
property=
"updateUserId"
jdbcType=
"INTEGER"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<resultMap
id=
"BaseDtoResultMap"
type=
"com.jz.dmp.cmdexectool.controller.bean.DmpComputEngineDto"
extends=
"BaseResultMap"
>
<!-- /*$BaseDtoResultMapContent$*/ -->
<collection
property=
"paramDtos"
ofType=
"paramResultMap"
javaType=
"java.util.List"
column=
"engine_id"
select=
"selectParamsByEngineId"
>
</collection>
</resultMap>
<sql
id=
"Base_Column_List"
>
engine_id, engine_name, remark, data_status, create_user_id,
create_time, update_user_id, update_time
</sql>
<sql
id=
"BaseDto_Column_List"
>
<include
refid=
"Base_Column_List"
/>
<!-- /*$BaseDtoColumnListContent$*/ -->
</sql>
<sql
id=
"param_Column_List"
>
param_id, engine_id, param_name, param_type, param_value,
remark, data_status, create_user_id, create_time, update_user_id,
update_time
</sql>
<!-- 根据计算引擎封装引擎参数 -->
<select
id=
"selectParamsByEngineId"
resultMap=
"paramResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"param_Column_List"
/>
from dmp_comput_engine_param
where engine_id = #{engineId,jdbcType=INTEGER}
AND param_type='0' AND data_status='1'
</select>
<!-- 根据主键查询计算引擎表 -->
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from dmp_comput_engine
where engine_id = #{engineId,jdbcType=INTEGER}
AND data_status='1'
</select>
<!-- 根据主键删除计算引擎表 -->
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from dmp_comput_engine
where engine_id = #{engineId,jdbcType=INTEGER}
</delete>
<!-- 根据主键软删除计算引擎表 -->
<update
id=
"softDeleteByPrimaryKey"
parameterType=
"java.lang.String"
>
update dmp_comput_engine
<set>
data_status = '0'
</set>
where engine_id = #{engineId,jdbcType=INTEGER}
</update>
<!-- 条件删除计算引擎表 -->
<delete
id=
"delete"
parameterType=
"java.lang.String"
>
delete from dmp_comput_engine
<where>
<if
test=
"engineId != null"
>
AND engine_id = #{engineId,jdbcType=INTEGER}
</if>
<if
test=
"engineName != null"
>
AND engine_name = #{engineName,jdbcType=VARCHAR}
</if>
<if
test=
"remark != null"
>
AND remark = #{remark,jdbcType=VARCHAR}
</if>
<if
test=
"dataStatus != null"
>
AND data_status = #{dataStatus,jdbcType=CHAR}
</if>
<if
test=
"createUserId != null"
>
AND create_user_id = #{createUserId,jdbcType=INTEGER}
</if>
<if
test=
"createTimeStart != null"
>
AND create_time >= #{createTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"createTimeEnd != null"
>
AND create_time
<![CDATA[ <= ]]>
#{createTimeEnd,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateUserId != null"
>
AND update_user_id = #{updateUserId,jdbcType=INTEGER}
</if>
<if
test=
"updateTimeStart != null"
>
AND update_time >= #{updateTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateTimeEnd != null"
>
AND update_time
<![CDATA[ <= ]]>
#{updateTimeEnd,jdbcType=TIMESTAMP}
</if>
AND data_status='1'
</where>
</delete>
<!-- 条件软删除计算引擎表 -->
<update
id=
"softDelete"
parameterType=
"java.lang.String"
>
update dmp_comput_engine
<set>
data_status = '0'
</set>
<where>
<if
test=
"engineId != null"
>
AND engine_id = #{engineId,jdbcType=INTEGER}
</if>
<if
test=
"engineName != null"
>
AND engine_name = #{engineName,jdbcType=VARCHAR}
</if>
<if
test=
"remark != null"
>
AND remark = #{remark,jdbcType=VARCHAR}
</if>
<if
test=
"dataStatus != null"
>
AND data_status = #{dataStatus,jdbcType=CHAR}
</if>
<if
test=
"createUserId != null"
>
AND create_user_id = #{createUserId,jdbcType=INTEGER}
</if>
<if
test=
"createTimeStart != null"
>
AND create_time >= #{createTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"createTimeEnd != null"
>
AND create_time
<![CDATA[ <= ]]>
#{createTimeEnd,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateUserId != null"
>
AND update_user_id = #{updateUserId,jdbcType=INTEGER}
</if>
<if
test=
"updateTimeStart != null"
>
AND update_time >= #{updateTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateTimeEnd != null"
>
AND update_time
<![CDATA[ <= ]]>
#{updateTimeEnd,jdbcType=TIMESTAMP}
</if>
AND data_status='1'
</where>
</update>
<!-- 插入计算引擎表 -->
<insert
id=
"insert"
parameterType=
"com.jz.dmp.cmdexectool.entity.DmpComputEngine"
>
insert into dmp_comput_engine (
engine_id, engine_name, remark, data_status, create_user_id,
create_time, update_user_id, update_time
)
values (
#{engineId,jdbcType=INTEGER}, #{engineName,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{dataStatus,jdbcType=CHAR}, #{createUserId,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateUserId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<!-- 批量新增计算引擎表 -->
<insert
id=
"insertBatch"
parameterType=
"com.jz.dmp.cmdexectool.entity.DmpComputEngine"
>
insert into dmp_comput_engine (
engine_id, engine_name, remark, data_status, create_user_id,
create_time, update_user_id, update_time
)
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(
#{item.engineId,jdbcType=INTEGER}, #{item.engineName,jdbcType=VARCHAR}, #{item.remark,jdbcType=VARCHAR}, #{item.dataStatus,jdbcType=CHAR}, #{item.createUserId,jdbcType=INTEGER},
#{item.createTime,jdbcType=TIMESTAMP}, #{item.updateUserId,jdbcType=INTEGER}, #{item.updateTime,jdbcType=TIMESTAMP}
)
</foreach>
</insert>
<!-- 选择性插入计算引擎表 -->
<insert
id=
"insertSelective"
parameterType=
"com.jz.dmp.cmdexectool.entity.DmpComputEngine"
>
insert into dmp_comput_engine
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"engineId != null"
>
engine_id,
</if>
<if
test=
"engineName != null"
>
engine_name,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"dataStatus != null"
>
data_status,
</if>
<if
test=
"createUserId != null"
>
create_user_id,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateUserId != null"
>
update_user_id,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"engineId != null"
>
#{engineId,jdbcType=INTEGER},
</if>
<if
test=
"engineName != null"
>
#{engineName,jdbcType=VARCHAR},
</if>
<if
test=
"remark != null"
>
#{remark,jdbcType=VARCHAR},
</if>
<if
test=
"dataStatus != null"
>
#{dataStatus,jdbcType=CHAR},
</if>
<if
test=
"createUserId != null"
>
#{createUserId,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateUserId != null"
>
#{updateUserId,jdbcType=INTEGER},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<!-- 修改计算引擎表 -->
<update
id=
"updateByPrimaryKey"
parameterType=
"com.jz.dmp.cmdexectool.entity.DmpComputEngine"
>
update dmp_comput_engine set
engine_id = #{engineId,jdbcType=INTEGER},
engine_name = #{engineName,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
data_status = #{dataStatus,jdbcType=CHAR},
create_user_id = #{createUserId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_user_id = #{updateUserId,jdbcType=INTEGER},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where engine_id = #{engineId,jdbcType=INTEGER}
</update>
<!-- 选择性修改计算引擎表 -->
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.jz.dmp.cmdexectool.entity.DmpComputEngine"
>
update dmp_comput_engine
<set>
<if
test=
"engineId != null"
>
engine_id = #{engineId,jdbcType=INTEGER},
</if>
<if
test=
"engineName != null"
>
engine_name = #{engineName,jdbcType=VARCHAR},
</if>
<if
test=
"remark != null"
>
remark = #{remark,jdbcType=VARCHAR},
</if>
<if
test=
"dataStatus != null"
>
data_status = #{dataStatus,jdbcType=CHAR},
</if>
<if
test=
"createUserId != null"
>
create_user_id = #{createUserId,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateUserId != null"
>
update_user_id = #{updateUserId,jdbcType=INTEGER},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where engine_id = #{engineId,jdbcType=INTEGER}
</update>
<!-- 条件查询计算引擎表 -->
<select
id=
"findList"
resultMap=
"BaseDtoResultMap"
>
SELECT
<include
refid=
"BaseDto_Column_List"
/>
FROM dmp_comput_engine
<where>
<if
test=
"engineId != null"
>
AND engine_id = #{engineId,jdbcType=INTEGER}
</if>
<if
test=
"engineName != null"
>
AND engine_name = #{engineName,jdbcType=VARCHAR}
</if>
<if
test=
"remark != null"
>
AND remark = #{remark,jdbcType=VARCHAR}
</if>
<if
test=
"dataStatus != null"
>
AND data_status = #{dataStatus,jdbcType=CHAR}
</if>
<if
test=
"createUserId != null"
>
AND create_user_id = #{createUserId,jdbcType=INTEGER}
</if>
<if
test=
"createTimeStart != null"
>
AND create_time >= #{createTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"createTimeEnd != null"
>
AND create_time
<![CDATA[ <= ]]>
#{createTimeEnd,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateUserId != null"
>
AND update_user_id = #{updateUserId,jdbcType=INTEGER}
</if>
<if
test=
"updateTimeStart != null"
>
AND update_time >= #{updateTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateTimeEnd != null"
>
AND update_time
<![CDATA[ <= ]]>
#{updateTimeEnd,jdbcType=TIMESTAMP}
</if>
AND data_status='1'
</where>
</select>
<!-- 主键查询计算引擎表 -->
<select
id=
"findById"
resultMap=
"BaseDtoResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"BaseDto_Column_List"
/>
from dmp_comput_engine
where engine_id = #{engineId,jdbcType=INTEGER}
AND data_status='1'
</select>
<!-- 根据主键批量删除计算引擎表 -->
<delete
id=
"deleteByIds"
>
delete from dmp_comput_engine
where engine_id in
<foreach
collection=
"idList"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</delete>
<!-- 根据主键批量软删除计算引擎表 -->
<update
id=
"softDeleteByIds"
>
update dmp_comput_engine
<set>
data_status = '0'
</set>
where engine_id in
<foreach
collection=
"idList"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</update>
</mapper>
src/main/resources/mapperconf/DmpComputEngineParamMapper.xml
0 → 100644
View file @
25ec3bd8
<?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.jz.dmp.cmdexectool.mapper.DmpComputEngineParamMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jz.dmp.cmdexectool.entity.DmpComputEngineParam"
>
<result
column=
"param_id"
property=
"paramId"
jdbcType=
"INTEGER"
/>
<result
column=
"engine_id"
property=
"engineId"
jdbcType=
"INTEGER"
/>
<result
column=
"param_name"
property=
"paramName"
jdbcType=
"VARCHAR"
/>
<result
column=
"param_type"
property=
"paramType"
jdbcType=
"CHAR"
/>
<result
column=
"param_value"
property=
"paramValue"
jdbcType=
"VARCHAR"
/>
<result
column=
"remark"
property=
"remark"
jdbcType=
"VARCHAR"
/>
<result
column=
"data_status"
property=
"dataStatus"
jdbcType=
"CHAR"
/>
<result
column=
"create_user_id"
property=
"createUserId"
jdbcType=
"INTEGER"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_user_id"
property=
"updateUserId"
jdbcType=
"INTEGER"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<resultMap
id=
"BaseDtoResultMap"
type=
"com.jz.dmp.cmdexectool.controller.bean.DmpComputEngineParamDto"
extends=
"BaseResultMap"
>
<!-- /*$BaseDtoResultMapContent$*/ -->
</resultMap>
<sql
id=
"Base_Column_List"
>
param_id, engine_id, param_name, param_type, param_value,
remark, data_status, create_user_id, create_time, update_user_id,
update_time
</sql>
<sql
id=
"BaseDto_Column_List"
>
<include
refid=
"Base_Column_List"
/>
<!-- /*$BaseDtoColumnListContent$*/ -->
</sql>
<!-- 根据主键查询计算引擎参数表 -->
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from dmp_comput_engine_param
where param_id = #{paramId,jdbcType=INTEGER}
AND data_status='1'
</select>
<!-- 根据主键删除计算引擎参数表 -->
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from dmp_comput_engine_param
where param_id = #{paramId,jdbcType=INTEGER}
</delete>
<!-- 根据主键软删除计算引擎参数表 -->
<update
id=
"softDeleteByPrimaryKey"
parameterType=
"java.lang.String"
>
update dmp_comput_engine_param
<set>
data_status = '0'
</set>
where param_id = #{paramId,jdbcType=INTEGER}
</update>
<!-- 条件删除计算引擎参数表 -->
<delete
id=
"delete"
parameterType=
"java.lang.String"
>
delete from dmp_comput_engine_param
<where>
<if
test=
"paramId != null"
>
AND param_id = #{paramId,jdbcType=INTEGER}
</if>
<if
test=
"engineId != null"
>
AND engine_id = #{engineId,jdbcType=INTEGER}
</if>
<if
test=
"paramName != null"
>
AND param_name = #{paramName,jdbcType=VARCHAR}
</if>
<if
test=
"paramType != null"
>
AND param_type = #{paramType,jdbcType=CHAR}
</if>
<if
test=
"paramValue != null"
>
AND param_value = #{paramValue,jdbcType=VARCHAR}
</if>
<if
test=
"remark != null"
>
AND remark = #{remark,jdbcType=VARCHAR}
</if>
<if
test=
"dataStatus != null"
>
AND data_status = #{dataStatus,jdbcType=CHAR}
</if>
<if
test=
"createUserId != null"
>
AND create_user_id = #{createUserId,jdbcType=INTEGER}
</if>
<if
test=
"createTimeStart != null"
>
AND create_time >= #{createTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"createTimeEnd != null"
>
AND create_time
<![CDATA[ <= ]]>
#{createTimeEnd,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateUserId != null"
>
AND update_user_id = #{updateUserId,jdbcType=INTEGER}
</if>
<if
test=
"updateTimeStart != null"
>
AND update_time >= #{updateTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateTimeEnd != null"
>
AND update_time
<![CDATA[ <= ]]>
#{updateTimeEnd,jdbcType=TIMESTAMP}
</if>
AND data_status='1'
</where>
</delete>
<!-- 条件软删除计算引擎参数表 -->
<update
id=
"softDelete"
parameterType=
"java.lang.String"
>
update dmp_comput_engine_param
<set>
data_status = '0'
</set>
<where>
<if
test=
"paramId != null"
>
AND param_id = #{paramId,jdbcType=INTEGER}
</if>
<if
test=
"engineId != null"
>
AND engine_id = #{engineId,jdbcType=INTEGER}
</if>
<if
test=
"paramName != null"
>
AND param_name = #{paramName,jdbcType=VARCHAR}
</if>
<if
test=
"paramType != null"
>
AND param_type = #{paramType,jdbcType=CHAR}
</if>
<if
test=
"paramValue != null"
>
AND param_value = #{paramValue,jdbcType=VARCHAR}
</if>
<if
test=
"remark != null"
>
AND remark = #{remark,jdbcType=VARCHAR}
</if>
<if
test=
"dataStatus != null"
>
AND data_status = #{dataStatus,jdbcType=CHAR}
</if>
<if
test=
"createUserId != null"
>
AND create_user_id = #{createUserId,jdbcType=INTEGER}
</if>
<if
test=
"createTimeStart != null"
>
AND create_time >= #{createTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"createTimeEnd != null"
>
AND create_time
<![CDATA[ <= ]]>
#{createTimeEnd,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateUserId != null"
>
AND update_user_id = #{updateUserId,jdbcType=INTEGER}
</if>
<if
test=
"updateTimeStart != null"
>
AND update_time >= #{updateTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateTimeEnd != null"
>
AND update_time
<![CDATA[ <= ]]>
#{updateTimeEnd,jdbcType=TIMESTAMP}
</if>
AND data_status='1'
</where>
</update>
<!-- 插入计算引擎参数表 -->
<insert
id=
"insert"
parameterType=
"com.jz.dmp.cmdexectool.entity.DmpComputEngineParam"
>
insert into dmp_comput_engine_param (
param_id, engine_id, param_name, param_type, param_value,
remark, data_status, create_user_id, create_time, update_user_id,
update_time
)
values (
#{paramId,jdbcType=INTEGER}, #{engineId,jdbcType=INTEGER}, #{paramName,jdbcType=VARCHAR}, #{paramType,jdbcType=CHAR}, #{paramValue,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR}, #{dataStatus,jdbcType=CHAR}, #{createUserId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateUserId,jdbcType=INTEGER},
#{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<!-- 批量新增计算引擎参数表 -->
<insert
id=
"insertBatch"
parameterType=
"com.jz.dmp.cmdexectool.entity.DmpComputEngineParam"
>
insert into dmp_comput_engine_param (
param_id, engine_id, param_name, param_type, param_value,
remark, data_status, create_user_id, create_time, update_user_id,
update_time
)
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(
#{item.paramId,jdbcType=INTEGER}, #{item.engineId,jdbcType=INTEGER}, #{item.paramName,jdbcType=VARCHAR}, #{item.paramType,jdbcType=CHAR}, #{item.paramValue,jdbcType=VARCHAR},
#{item.remark,jdbcType=VARCHAR}, #{item.dataStatus,jdbcType=CHAR}, #{item.createUserId,jdbcType=INTEGER}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateUserId,jdbcType=INTEGER},
#{item.updateTime,jdbcType=TIMESTAMP}
)
</foreach>
</insert>
<!-- 选择性插入计算引擎参数表 -->
<insert
id=
"insertSelective"
parameterType=
"com.jz.dmp.cmdexectool.entity.DmpComputEngineParam"
>
insert into dmp_comput_engine_param
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"paramId != null"
>
param_id,
</if>
<if
test=
"engineId != null"
>
engine_id,
</if>
<if
test=
"paramName != null"
>
param_name,
</if>
<if
test=
"paramType != null"
>
param_type,
</if>
<if
test=
"paramValue != null"
>
param_value,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"dataStatus != null"
>
data_status,
</if>
<if
test=
"createUserId != null"
>
create_user_id,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateUserId != null"
>
update_user_id,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"paramId != null"
>
#{paramId,jdbcType=INTEGER},
</if>
<if
test=
"engineId != null"
>
#{engineId,jdbcType=INTEGER},
</if>
<if
test=
"paramName != null"
>
#{paramName,jdbcType=VARCHAR},
</if>
<if
test=
"paramType != null"
>
#{paramType,jdbcType=CHAR},
</if>
<if
test=
"paramValue != null"
>
#{paramValue,jdbcType=VARCHAR},
</if>
<if
test=
"remark != null"
>
#{remark,jdbcType=VARCHAR},
</if>
<if
test=
"dataStatus != null"
>
#{dataStatus,jdbcType=CHAR},
</if>
<if
test=
"createUserId != null"
>
#{createUserId,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateUserId != null"
>
#{updateUserId,jdbcType=INTEGER},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<!-- 修改计算引擎参数表 -->
<update
id=
"updateByPrimaryKey"
parameterType=
"com.jz.dmp.cmdexectool.entity.DmpComputEngineParam"
>
update dmp_comput_engine_param set
param_id = #{paramId,jdbcType=INTEGER},
engine_id = #{engineId,jdbcType=INTEGER},
param_name = #{paramName,jdbcType=VARCHAR},
param_type = #{paramType,jdbcType=CHAR},
param_value = #{paramValue,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
data_status = #{dataStatus,jdbcType=CHAR},
create_user_id = #{createUserId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_user_id = #{updateUserId,jdbcType=INTEGER},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where param_id = #{paramId,jdbcType=INTEGER}
</update>
<!-- 选择性修改计算引擎参数表 -->
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.jz.dmp.cmdexectool.entity.DmpComputEngineParam"
>
update dmp_comput_engine_param
<set>
<if
test=
"paramId != null"
>
param_id = #{paramId,jdbcType=INTEGER},
</if>
<if
test=
"engineId != null"
>
engine_id = #{engineId,jdbcType=INTEGER},
</if>
<if
test=
"paramName != null"
>
param_name = #{paramName,jdbcType=VARCHAR},
</if>
<if
test=
"paramType != null"
>
param_type = #{paramType,jdbcType=CHAR},
</if>
<if
test=
"paramValue != null"
>
param_value = #{paramValue,jdbcType=VARCHAR},
</if>
<if
test=
"remark != null"
>
remark = #{remark,jdbcType=VARCHAR},
</if>
<if
test=
"dataStatus != null"
>
data_status = #{dataStatus,jdbcType=CHAR},
</if>
<if
test=
"createUserId != null"
>
create_user_id = #{createUserId,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateUserId != null"
>
update_user_id = #{updateUserId,jdbcType=INTEGER},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where param_id = #{paramId,jdbcType=INTEGER}
</update>
<!-- 条件查询计算引擎参数表 -->
<select
id=
"findList"
resultMap=
"BaseDtoResultMap"
>
SELECT
<include
refid=
"BaseDto_Column_List"
/>
FROM dmp_comput_engine_param
<where>
<if
test=
"paramId != null"
>
AND param_id = #{paramId,jdbcType=INTEGER}
</if>
<if
test=
"engineId != null"
>
AND engine_id = #{engineId,jdbcType=INTEGER}
</if>
<if
test=
"paramName != null"
>
AND param_name = #{paramName,jdbcType=VARCHAR}
</if>
<if
test=
"paramType != null"
>
AND param_type = #{paramType,jdbcType=CHAR}
</if>
<if
test=
"paramValue != null"
>
AND param_value = #{paramValue,jdbcType=VARCHAR}
</if>
<if
test=
"remark != null"
>
AND remark = #{remark,jdbcType=VARCHAR}
</if>
<if
test=
"dataStatus != null"
>
AND data_status = #{dataStatus,jdbcType=CHAR}
</if>
<if
test=
"createUserId != null"
>
AND create_user_id = #{createUserId,jdbcType=INTEGER}
</if>
<if
test=
"createTimeStart != null"
>
AND create_time >= #{createTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"createTimeEnd != null"
>
AND create_time
<![CDATA[ <= ]]>
#{createTimeEnd,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateUserId != null"
>
AND update_user_id = #{updateUserId,jdbcType=INTEGER}
</if>
<if
test=
"updateTimeStart != null"
>
AND update_time >= #{updateTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateTimeEnd != null"
>
AND update_time
<![CDATA[ <= ]]>
#{updateTimeEnd,jdbcType=TIMESTAMP}
</if>
AND data_status='1'
</where>
</select>
<!-- 主键查询计算引擎参数表 -->
<select
id=
"findById"
resultMap=
"BaseDtoResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"BaseDto_Column_List"
/>
from dmp_comput_engine_param
where param_id = #{paramId,jdbcType=INTEGER}
AND data_status='1'
</select>
<!-- 根据主键批量删除计算引擎参数表 -->
<delete
id=
"deleteByIds"
>
delete from dmp_comput_engine_param
where param_id in
<foreach
collection=
"idList"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</delete>
<!-- 根据主键批量软删除计算引擎参数表 -->
<update
id=
"softDeleteByIds"
>
update dmp_comput_engine_param
<set>
data_status = '0'
</set>
where param_id in
<foreach
collection=
"idList"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</update>
</mapper>
src/main/resources/mapperconf/DmpProjectConfigEngineMapper.xml
0 → 100644
View file @
25ec3bd8
<?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.jz.dmp.cmdexectool.mapper.DmpProjectConfigEngineMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jz.dmp.cmdexectool.entity.DmpProjectConfigEngine"
>
<result
column=
"config_engine_id"
property=
"configEngineId"
jdbcType=
"INTEGER"
/>
<result
column=
"project_id"
property=
"projectId"
jdbcType=
"INTEGER"
/>
<result
column=
"engine_id"
property=
"engineId"
jdbcType=
"INTEGER"
/>
<result
column=
"remark"
property=
"remark"
jdbcType=
"VARCHAR"
/>
<result
column=
"data_status"
property=
"dataStatus"
jdbcType=
"CHAR"
/>
<result
column=
"create_user_id"
property=
"createUserId"
jdbcType=
"INTEGER"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_user_id"
property=
"updateUserId"
jdbcType=
"INTEGER"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<resultMap
id=
"BaseDtoResultMap"
type=
"com.jz.dmp.cmdexectool.controller.bean.DmpProjectConfigEngineDto"
extends=
"BaseResultMap"
>
<!-- /*$BaseDtoResultMapContent$*/ -->
</resultMap>
<sql
id=
"Base_Column_List"
>
config_engine_id, project_id, engine_id, remark, data_status,
create_user_id, create_time, update_user_id, update_time
</sql>
<sql
id=
"BaseDto_Column_List"
>
<include
refid=
"Base_Column_List"
/>
<!-- /*$BaseDtoColumnListContent$*/ -->
</sql>
<!-- 根据主键查询项目配置计算引擎关系表 -->
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from dmp_project_config_engine
where config_engine_id = #{configEngineId,jdbcType=INTEGER}
AND data_status='1'
</select>
<!-- 根据主键删除项目配置计算引擎关系表 -->
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from dmp_project_config_engine
where config_engine_id = #{configEngineId,jdbcType=INTEGER}
</delete>
<!-- 根据主键软删除项目配置计算引擎关系表 -->
<update
id=
"softDeleteByPrimaryKey"
parameterType=
"java.lang.String"
>
update dmp_project_config_engine
<set>
data_status = '0'
</set>
where config_engine_id = #{configEngineId,jdbcType=INTEGER}
</update>
<!-- 条件删除项目配置计算引擎关系表 -->
<delete
id=
"delete"
parameterType=
"java.lang.String"
>
delete from dmp_project_config_engine
<where>
<if
test=
"configEngineId != null"
>
AND config_engine_id = #{configEngineId,jdbcType=INTEGER}
</if>
<if
test=
"projectId != null"
>
AND project_id = #{projectId,jdbcType=INTEGER}
</if>
<if
test=
"engineId != null"
>
AND engine_id = #{engineId,jdbcType=INTEGER}
</if>
<if
test=
"remark != null"
>
AND remark = #{remark,jdbcType=VARCHAR}
</if>
<if
test=
"dataStatus != null"
>
AND data_status = #{dataStatus,jdbcType=CHAR}
</if>
<if
test=
"createUserId != null"
>
AND create_user_id = #{createUserId,jdbcType=INTEGER}
</if>
<if
test=
"createTimeStart != null"
>
AND create_time >= #{createTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"createTimeEnd != null"
>
AND create_time
<![CDATA[ <= ]]>
#{createTimeEnd,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateUserId != null"
>
AND update_user_id = #{updateUserId,jdbcType=INTEGER}
</if>
<if
test=
"updateTimeStart != null"
>
AND update_time >= #{updateTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateTimeEnd != null"
>
AND update_time
<![CDATA[ <= ]]>
#{updateTimeEnd,jdbcType=TIMESTAMP}
</if>
AND data_status='1'
</where>
</delete>
<!-- 条件软删除项目配置计算引擎关系表 -->
<update
id=
"softDelete"
parameterType=
"java.lang.String"
>
update dmp_project_config_engine
<set>
data_status = '0'
</set>
<where>
<if
test=
"configEngineId != null"
>
AND config_engine_id = #{configEngineId,jdbcType=INTEGER}
</if>
<if
test=
"projectId != null"
>
AND project_id = #{projectId,jdbcType=INTEGER}
</if>
<if
test=
"engineId != null"
>
AND engine_id = #{engineId,jdbcType=INTEGER}
</if>
<if
test=
"remark != null"
>
AND remark = #{remark,jdbcType=VARCHAR}
</if>
<if
test=
"dataStatus != null"
>
AND data_status = #{dataStatus,jdbcType=CHAR}
</if>
<if
test=
"createUserId != null"
>
AND create_user_id = #{createUserId,jdbcType=INTEGER}
</if>
<if
test=
"createTimeStart != null"
>
AND create_time >= #{createTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"createTimeEnd != null"
>
AND create_time
<![CDATA[ <= ]]>
#{createTimeEnd,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateUserId != null"
>
AND update_user_id = #{updateUserId,jdbcType=INTEGER}
</if>
<if
test=
"updateTimeStart != null"
>
AND update_time >= #{updateTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateTimeEnd != null"
>
AND update_time
<![CDATA[ <= ]]>
#{updateTimeEnd,jdbcType=TIMESTAMP}
</if>
AND data_status='1'
</where>
</update>
<!-- 插入项目配置计算引擎关系表 -->
<insert
id=
"insert"
parameterType=
"com.jz.dmp.cmdexectool.entity.DmpProjectConfigEngine"
>
insert into dmp_project_config_engine (
config_engine_id, project_id, engine_id, remark, data_status,
create_user_id, create_time, update_user_id, update_time
)
values (
#{configEngineId,jdbcType=INTEGER}, #{projectId,jdbcType=INTEGER}, #{engineId,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR}, #{dataStatus,jdbcType=CHAR},
#{createUserId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateUserId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<!-- 批量新增项目配置计算引擎关系表 -->
<insert
id=
"insertBatch"
parameterType=
"com.jz.dmp.cmdexectool.entity.DmpProjectConfigEngine"
>
insert into dmp_project_config_engine (
config_engine_id, project_id, engine_id, remark, data_status,
create_user_id, create_time, update_user_id, update_time
)
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(
#{item.configEngineId,jdbcType=INTEGER}, #{item.projectId,jdbcType=INTEGER}, #{item.engineId,jdbcType=INTEGER}, #{item.remark,jdbcType=VARCHAR}, #{item.dataStatus,jdbcType=CHAR},
#{item.createUserId,jdbcType=INTEGER}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateUserId,jdbcType=INTEGER}, #{item.updateTime,jdbcType=TIMESTAMP}
)
</foreach>
</insert>
<!-- 选择性插入项目配置计算引擎关系表 -->
<insert
id=
"insertSelective"
parameterType=
"com.jz.dmp.cmdexectool.entity.DmpProjectConfigEngine"
>
insert into dmp_project_config_engine
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"configEngineId != null"
>
config_engine_id,
</if>
<if
test=
"projectId != null"
>
project_id,
</if>
<if
test=
"engineId != null"
>
engine_id,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"dataStatus != null"
>
data_status,
</if>
<if
test=
"createUserId != null"
>
create_user_id,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateUserId != null"
>
update_user_id,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"configEngineId != null"
>
#{configEngineId,jdbcType=INTEGER},
</if>
<if
test=
"projectId != null"
>
#{projectId,jdbcType=INTEGER},
</if>
<if
test=
"engineId != null"
>
#{engineId,jdbcType=INTEGER},
</if>
<if
test=
"remark != null"
>
#{remark,jdbcType=VARCHAR},
</if>
<if
test=
"dataStatus != null"
>
#{dataStatus,jdbcType=CHAR},
</if>
<if
test=
"createUserId != null"
>
#{createUserId,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateUserId != null"
>
#{updateUserId,jdbcType=INTEGER},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<!-- 修改项目配置计算引擎关系表 -->
<update
id=
"updateByPrimaryKey"
parameterType=
"com.jz.dmp.cmdexectool.entity.DmpProjectConfigEngine"
>
update dmp_project_config_engine set
config_engine_id = #{configEngineId,jdbcType=INTEGER},
project_id = #{projectId,jdbcType=INTEGER},
engine_id = #{engineId,jdbcType=INTEGER},
remark = #{remark,jdbcType=VARCHAR},
data_status = #{dataStatus,jdbcType=CHAR},
create_user_id = #{createUserId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_user_id = #{updateUserId,jdbcType=INTEGER},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where config_engine_id = #{configEngineId,jdbcType=INTEGER}
</update>
<!-- 选择性修改项目配置计算引擎关系表 -->
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.jz.dmp.cmdexectool.entity.DmpProjectConfigEngine"
>
update dmp_project_config_engine
<set>
<if
test=
"configEngineId != null"
>
config_engine_id = #{configEngineId,jdbcType=INTEGER},
</if>
<if
test=
"projectId != null"
>
project_id = #{projectId,jdbcType=INTEGER},
</if>
<if
test=
"engineId != null"
>
engine_id = #{engineId,jdbcType=INTEGER},
</if>
<if
test=
"remark != null"
>
remark = #{remark,jdbcType=VARCHAR},
</if>
<if
test=
"dataStatus != null"
>
data_status = #{dataStatus,jdbcType=CHAR},
</if>
<if
test=
"createUserId != null"
>
create_user_id = #{createUserId,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateUserId != null"
>
update_user_id = #{updateUserId,jdbcType=INTEGER},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where config_engine_id = #{configEngineId,jdbcType=INTEGER}
</update>
<!-- 条件查询项目配置计算引擎关系表 -->
<select
id=
"findList"
resultMap=
"BaseDtoResultMap"
>
SELECT
<include
refid=
"BaseDto_Column_List"
/>
FROM dmp_project_config_engine
<where>
<if
test=
"configEngineId != null"
>
AND config_engine_id = #{configEngineId,jdbcType=INTEGER}
</if>
<if
test=
"projectId != null"
>
AND project_id = #{projectId,jdbcType=INTEGER}
</if>
<if
test=
"engineId != null"
>
AND engine_id = #{engineId,jdbcType=INTEGER}
</if>
<if
test=
"remark != null"
>
AND remark = #{remark,jdbcType=VARCHAR}
</if>
<if
test=
"dataStatus != null"
>
AND data_status = #{dataStatus,jdbcType=CHAR}
</if>
<if
test=
"createUserId != null"
>
AND create_user_id = #{createUserId,jdbcType=INTEGER}
</if>
<if
test=
"createTimeStart != null"
>
AND create_time >= #{createTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"createTimeEnd != null"
>
AND create_time
<![CDATA[ <= ]]>
#{createTimeEnd,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateUserId != null"
>
AND update_user_id = #{updateUserId,jdbcType=INTEGER}
</if>
<if
test=
"updateTimeStart != null"
>
AND update_time >= #{updateTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateTimeEnd != null"
>
AND update_time
<![CDATA[ <= ]]>
#{updateTimeEnd,jdbcType=TIMESTAMP}
</if>
AND data_status='1'
</where>
</select>
<!-- 主键查询项目配置计算引擎关系表 -->
<select
id=
"findById"
resultMap=
"BaseDtoResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"BaseDto_Column_List"
/>
from dmp_project_config_engine
where config_engine_id = #{configEngineId,jdbcType=INTEGER}
AND data_status='1'
</select>
<!-- 根据主键批量删除项目配置计算引擎关系表 -->
<delete
id=
"deleteByIds"
>
delete from dmp_project_config_engine
where config_engine_id in
<foreach
collection=
"idList"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</delete>
<!-- 根据主键批量软删除项目配置计算引擎关系表 -->
<update
id=
"softDeleteByIds"
>
update dmp_project_config_engine
<set>
data_status = '0'
</set>
where config_engine_id in
<foreach
collection=
"idList"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</update>
</mapper>
src/main/resources/mapperconf/DmpProjectConfigInfoMapper.xml
0 → 100644
View file @
25ec3bd8
<?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.jz.dmp.cmdexectool.mapper.DmpProjectConfigInfoMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jz.dmp.cmdexectool.entity.DmpProjectConfigInfo"
>
<result
column=
"project_config_id"
property=
"projectConfigId"
jdbcType=
"INTEGER"
/>
<result
column=
"project_id"
property=
"projectId"
jdbcType=
"INTEGER"
/>
<result
column=
"remark"
property=
"remark"
jdbcType=
"VARCHAR"
/>
<result
column=
"data_status"
property=
"dataStatus"
jdbcType=
"CHAR"
/>
<result
column=
"create_user_id"
property=
"createUserId"
jdbcType=
"INTEGER"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_user_id"
property=
"updateUserId"
jdbcType=
"INTEGER"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<!-- 公共配置 -->
<resultMap
id=
"pubCfgInfoResultMap"
type=
"com.jz.dmp.cmdexectool.controller.bean.DmpPublicConfigInfoDto"
>
<result
column=
"public_config_id"
property=
"publicConfigId"
jdbcType=
"INTEGER"
/>
<result
column=
"kerberos_isenable"
property=
"kerberosIsenable"
jdbcType=
"CHAR"
/>
<result
column=
"kerberos_jaas_client_name"
property=
"kerberosJaasClientName"
jdbcType=
"VARCHAR"
/>
<result
column=
"kerberos_krb5_conf"
property=
"kerberosKrb5Conf"
jdbcType=
"VARCHAR"
/>
<result
column=
"kerberos_jaas_conf"
property=
"kerberosJaasConf"
jdbcType=
"VARCHAR"
/>
<result
column=
"kerberos_fqdn"
property=
"kerberosFqdn"
jdbcType=
"VARCHAR"
/>
<result
column=
"kerberos_keytab_conf"
property=
"kerberosKeytabConf"
jdbcType=
"VARCHAR"
/>
<result
column=
"kerberos_keytab_user"
property=
"kerberosKeytabUser"
jdbcType=
"VARCHAR"
/>
<result
column=
"kerberos_spark_jaas_conf"
property=
"kerberosSparkJaasConf"
jdbcType=
"VARCHAR"
/>
<result
column=
"hdfs_http_path"
property=
"hdfsHttpPath"
jdbcType=
"VARCHAR"
/>
<result
column=
"hdfs_syncing_path"
property=
"hdfsSyncingPath"
jdbcType=
"VARCHAR"
/>
<result
column=
"hdfs_user_name"
property=
"hdfsUserName"
jdbcType=
"VARCHAR"
/>
<result
column=
"kafka_conector_url"
property=
"kafkaConectorUrl"
jdbcType=
"VARCHAR"
/>
<result
column=
"kafka_schema_register_url"
property=
"kafkaSchemaRegisterUrl"
jdbcType=
"VARCHAR"
/>
<result
column=
"kafka_bootstrap_servers"
property=
"kafkaBootstrapServers"
jdbcType=
"VARCHAR"
/>
<result
column=
"azkaban_exector_shell_exec"
property=
"azkabanExectorShellExec"
jdbcType=
"VARCHAR"
/>
<result
column=
"azkaban_exector_sql_exec"
property=
"azkabanExectorSqlExec"
jdbcType=
"VARCHAR"
/>
<result
column=
"azkaban_exector_xml_exec"
property=
"azkabanExectorXmlExec"
jdbcType=
"VARCHAR"
/>
<result
column=
"azkaban_exector_sql_path"
property=
"azkabanExectorSqlPath"
jdbcType=
"VARCHAR"
/>
<result
column=
"azkaban_exector_shell_path"
property=
"azkabanExectorShellPath"
jdbcType=
"VARCHAR"
/>
<result
column=
"azkaban_local_task_file_path"
property=
"azkabanLocalTaskFilePath"
jdbcType=
"VARCHAR"
/>
<result
column=
"azkaban_exector_shell_export_data"
property=
"azkabanExectorShellExportData"
jdbcType=
"VARCHAR"
/>
<result
column=
"azkaban_monitor_url"
property=
"azkabanMonitorUrl"
jdbcType=
"VARCHAR"
/>
<result
column=
"atlas_monitor_url"
property=
"atlasMonitorUrl"
jdbcType=
"VARCHAR"
/>
<result
column=
"shell_cmd_server"
property=
"shellCmdServer"
jdbcType=
"VARCHAR"
/>
<result
column=
"shell_cmd_user"
property=
"shellCmdUser"
jdbcType=
"VARCHAR"
/>
<result
column=
"shell_cmd_password"
property=
"shellCmdPassword"
jdbcType=
"VARCHAR"
/>
<result
column=
"shell_sftp_port"
property=
"shellSftpPort"
jdbcType=
"INTEGER"
/>
<result
column=
"remark"
property=
"remark"
jdbcType=
"VARCHAR"
/>
<result
column=
"data_status"
property=
"dataStatus"
jdbcType=
"CHAR"
/>
<result
column=
"create_user_id"
property=
"createUserId"
jdbcType=
"INTEGER"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_user_id"
property=
"updateUserId"
jdbcType=
"INTEGER"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<resultMap
id=
"BaseDtoResultMap"
type=
"com.jz.dmp.cmdexectool.controller.bean.DmpProjectConfigInfoDto"
extends=
"BaseResultMap"
>
<!-- /*$BaseDtoResultMapContent$*/ -->
<association
property=
"dmpPublicConfigInfoDto"
javaType=
"com.jz.dmp.modules.controller.projconfig.bean.DmpPublicConfigInfoDto"
column=
"project_config_id"
select=
"selectOne"
>
</association>
</resultMap>
<sql
id=
"Base_Column_List"
>
project_config_id, project_id, remark, data_status, create_user_id,
create_time, update_user_id, update_time
</sql>
<sql
id=
"BaseDto_Column_List"
>
<include
refid=
"Base_Column_List"
/>
<!-- /*$BaseDtoColumnListContent$*/ -->
</sql>
<!-- 查询公共配置 -->
<select
id=
"selectOne"
resultMap=
"pubCfgInfoResultMap"
>
select
public_config_id, kerberos_isenable, kerberos_jaas_client_name, kerberos_krb5_conf, kerberos_jaas_conf,
kerberos_fqdn, kerberos_keytab_conf, kerberos_keytab_user, kerberos_spark_jaas_conf, hdfs_http_path,
hdfs_syncing_path, hdfs_user_name, kafka_conector_url, kafka_schema_register_url, kafka_bootstrap_servers,
azkaban_exector_shell_exec, azkaban_exector_sql_exec, azkaban_exector_xml_exec, azkaban_exector_sql_path, azkaban_exector_shell_path,
azkaban_local_task_file_path, azkaban_exector_shell_export_data, azkaban_monitor_url, atlas_monitor_url, shell_cmd_server,
shell_cmd_user, shell_cmd_password, shell_sftp_port, remark, data_status,
create_user_id, create_time, update_user_id, update_time
from dmp_public_config_info
where data_status='1'
</select>
<!-- 根据主键查询项目配置表 -->
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from dmp_project_config_info
where project_config_id = #{projectConfigId,jdbcType=INTEGER}
AND data_status='1'
</select>
<!-- 根据主键删除项目配置表 -->
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from dmp_project_config_info
where project_config_id = #{projectConfigId,jdbcType=INTEGER}
</delete>
<!-- 根据主键软删除项目配置表 -->
<update
id=
"softDeleteByPrimaryKey"
parameterType=
"java.lang.String"
>
update dmp_project_config_info
<set>
data_status = '0'
</set>
where project_config_id = #{projectConfigId,jdbcType=INTEGER}
</update>
<!-- 条件删除项目配置表 -->
<delete
id=
"delete"
parameterType=
"java.lang.String"
>
delete from dmp_project_config_info
<where>
<if
test=
"projectConfigId != null"
>
AND project_config_id = #{projectConfigId,jdbcType=INTEGER}
</if>
<if
test=
"projectId != null"
>
AND project_id = #{projectId,jdbcType=INTEGER}
</if>
<if
test=
"remark != null"
>
AND remark = #{remark,jdbcType=VARCHAR}
</if>
<if
test=
"dataStatus != null"
>
AND data_status = #{dataStatus,jdbcType=CHAR}
</if>
<if
test=
"createUserId != null"
>
AND create_user_id = #{createUserId,jdbcType=INTEGER}
</if>
<if
test=
"createTimeStart != null"
>
AND create_time >= #{createTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"createTimeEnd != null"
>
AND create_time
<![CDATA[ <= ]]>
#{createTimeEnd,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateUserId != null"
>
AND update_user_id = #{updateUserId,jdbcType=INTEGER}
</if>
<if
test=
"updateTimeStart != null"
>
AND update_time >= #{updateTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateTimeEnd != null"
>
AND update_time
<![CDATA[ <= ]]>
#{updateTimeEnd,jdbcType=TIMESTAMP}
</if>
AND data_status='1'
</where>
</delete>
<!-- 条件软删除项目配置表 -->
<update
id=
"softDelete"
parameterType=
"java.lang.String"
>
update dmp_project_config_info
<set>
data_status = '0'
</set>
<where>
<if
test=
"projectConfigId != null"
>
AND project_config_id = #{projectConfigId,jdbcType=INTEGER}
</if>
<if
test=
"projectId != null"
>
AND project_id = #{projectId,jdbcType=INTEGER}
</if>
<if
test=
"remark != null"
>
AND remark = #{remark,jdbcType=VARCHAR}
</if>
<if
test=
"dataStatus != null"
>
AND data_status = #{dataStatus,jdbcType=CHAR}
</if>
<if
test=
"createUserId != null"
>
AND create_user_id = #{createUserId,jdbcType=INTEGER}
</if>
<if
test=
"createTimeStart != null"
>
AND create_time >= #{createTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"createTimeEnd != null"
>
AND create_time
<![CDATA[ <= ]]>
#{createTimeEnd,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateUserId != null"
>
AND update_user_id = #{updateUserId,jdbcType=INTEGER}
</if>
<if
test=
"updateTimeStart != null"
>
AND update_time >= #{updateTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateTimeEnd != null"
>
AND update_time
<![CDATA[ <= ]]>
#{updateTimeEnd,jdbcType=TIMESTAMP}
</if>
AND data_status='1'
</where>
</update>
<!-- 插入项目配置表 -->
<insert
id=
"insert"
parameterType=
"com.jz.dmp.cmdexectool.entity.DmpProjectConfigInfo"
>
insert into dmp_project_config_info (
project_config_id, project_id, remark, data_status, create_user_id,
create_time, update_user_id, update_time
)
values (
#{projectConfigId,jdbcType=INTEGER}, #{projectId,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR}, #{dataStatus,jdbcType=CHAR}, #{createUserId,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateUserId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<!-- 批量新增项目配置表 -->
<insert
id=
"insertBatch"
parameterType=
"com.jz.dmp.cmdexectool.entity.DmpProjectConfigInfo"
>
insert into dmp_project_config_info (
project_config_id, project_id, remark, data_status, create_user_id,
create_time, update_user_id, update_time
)
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(
#{item.projectConfigId,jdbcType=INTEGER}, #{item.projectId,jdbcType=INTEGER}, #{item.remark,jdbcType=VARCHAR}, #{item.dataStatus,jdbcType=CHAR}, #{item.createUserId,jdbcType=INTEGER},
#{item.createTime,jdbcType=TIMESTAMP}, #{item.updateUserId,jdbcType=INTEGER}, #{item.updateTime,jdbcType=TIMESTAMP}
)
</foreach>
</insert>
<!-- 选择性插入项目配置表 -->
<insert
id=
"insertSelective"
parameterType=
"com.jz.dmp.cmdexectool.entity.DmpProjectConfigInfo"
>
insert into dmp_project_config_info
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"projectConfigId != null"
>
project_config_id,
</if>
<if
test=
"projectId != null"
>
project_id,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"dataStatus != null"
>
data_status,
</if>
<if
test=
"createUserId != null"
>
create_user_id,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateUserId != null"
>
update_user_id,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"projectConfigId != null"
>
#{projectConfigId,jdbcType=INTEGER},
</if>
<if
test=
"projectId != null"
>
#{projectId,jdbcType=INTEGER},
</if>
<if
test=
"remark != null"
>
#{remark,jdbcType=VARCHAR},
</if>
<if
test=
"dataStatus != null"
>
#{dataStatus,jdbcType=CHAR},
</if>
<if
test=
"createUserId != null"
>
#{createUserId,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateUserId != null"
>
#{updateUserId,jdbcType=INTEGER},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<!-- 修改项目配置表 -->
<update
id=
"updateByPrimaryKey"
parameterType=
"com.jz.dmp.cmdexectool.entity.DmpProjectConfigInfo"
>
update dmp_project_config_info set
project_config_id = #{projectConfigId,jdbcType=INTEGER},
project_id = #{projectId,jdbcType=INTEGER},
remark = #{remark,jdbcType=VARCHAR},
data_status = #{dataStatus,jdbcType=CHAR},
create_user_id = #{createUserId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_user_id = #{updateUserId,jdbcType=INTEGER},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where project_config_id = #{projectConfigId,jdbcType=INTEGER}
</update>
<!-- 选择性修改项目配置表 -->
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.jz.dmp.cmdexectool.entity.DmpProjectConfigInfo"
>
update dmp_project_config_info
<set>
<if
test=
"projectConfigId != null"
>
project_config_id = #{projectConfigId,jdbcType=INTEGER},
</if>
<if
test=
"projectId != null"
>
project_id = #{projectId,jdbcType=INTEGER},
</if>
<if
test=
"remark != null"
>
remark = #{remark,jdbcType=VARCHAR},
</if>
<if
test=
"dataStatus != null"
>
data_status = #{dataStatus,jdbcType=CHAR},
</if>
<if
test=
"createUserId != null"
>
create_user_id = #{createUserId,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateUserId != null"
>
update_user_id = #{updateUserId,jdbcType=INTEGER},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where project_config_id = #{projectConfigId,jdbcType=INTEGER}
</update>
<!-- 条件查询项目配置表 -->
<select
id=
"findList"
resultMap=
"BaseDtoResultMap"
>
SELECT
<include
refid=
"BaseDto_Column_List"
/>
FROM dmp_project_config_info
<where>
<if
test=
"projectConfigId != null"
>
AND project_config_id = #{projectConfigId,jdbcType=INTEGER}
</if>
<if
test=
"projectId != null"
>
AND project_id = #{projectId,jdbcType=INTEGER}
</if>
<if
test=
"remark != null"
>
AND remark = #{remark,jdbcType=VARCHAR}
</if>
<if
test=
"dataStatus != null"
>
AND data_status = #{dataStatus,jdbcType=CHAR}
</if>
<if
test=
"createUserId != null"
>
AND create_user_id = #{createUserId,jdbcType=INTEGER}
</if>
<if
test=
"createTimeStart != null"
>
AND create_time >= #{createTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"createTimeEnd != null"
>
AND create_time
<![CDATA[ <= ]]>
#{createTimeEnd,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateUserId != null"
>
AND update_user_id = #{updateUserId,jdbcType=INTEGER}
</if>
<if
test=
"updateTimeStart != null"
>
AND update_time >= #{updateTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateTimeEnd != null"
>
AND update_time
<![CDATA[ <= ]]>
#{updateTimeEnd,jdbcType=TIMESTAMP}
</if>
AND data_status='1'
</where>
</select>
<!-- 主键查询项目配置表 -->
<select
id=
"findById"
resultMap=
"BaseDtoResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"BaseDto_Column_List"
/>
from dmp_project_config_info
where project_config_id = #{projectConfigId,jdbcType=INTEGER}
AND data_status='1'
</select>
<!-- 根据主键批量删除项目配置表 -->
<delete
id=
"deleteByIds"
>
delete from dmp_project_config_info
where project_config_id in
<foreach
collection=
"idList"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</delete>
<!-- 根据主键批量软删除项目配置表 -->
<update
id=
"softDeleteByIds"
>
update dmp_project_config_info
<set>
data_status = '0'
</set>
where project_config_id in
<foreach
collection=
"idList"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</update>
</mapper>
src/main/resources/mapperconf/DmpProjectEngineParamMapper.xml
0 → 100644
View file @
25ec3bd8
<?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.jz.dmp.cmdexectool.mapper.DmpProjectEngineParamMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jz.dmp.cmdexectool.entity.DmpProjectEngineParam"
>
<result
column=
"project_param_id"
property=
"projectParamId"
jdbcType=
"INTEGER"
/>
<result
column=
"config_engine_id"
property=
"configEngineId"
jdbcType=
"INTEGER"
/>
<result
column=
"param_id"
property=
"paramId"
jdbcType=
"INTEGER"
/>
<result
column=
"param_name"
property=
"paramName"
jdbcType=
"VARCHAR"
/>
<result
column=
"param_value"
property=
"paramValue"
jdbcType=
"VARCHAR"
/>
<result
column=
"remark"
property=
"remark"
jdbcType=
"VARCHAR"
/>
<result
column=
"data_status"
property=
"dataStatus"
jdbcType=
"CHAR"
/>
<result
column=
"create_user_id"
property=
"createUserId"
jdbcType=
"INTEGER"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_user_id"
property=
"updateUserId"
jdbcType=
"INTEGER"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<resultMap
id=
"BaseDtoResultMap"
type=
"com.jz.dmp.cmdexectool.controller.bean.DmpProjectEngineParamDto"
extends=
"BaseResultMap"
>
<!-- /*$BaseDtoResultMapContent$*/ -->
</resultMap>
<sql
id=
"Base_Column_List"
>
project_param_id, config_engine_id, param_id, param_name, param_value,
remark, data_status, create_user_id, create_time, update_user_id,
update_time
</sql>
<sql
id=
"BaseDto_Column_List"
>
<include
refid=
"Base_Column_List"
/>
<!-- /*$BaseDtoColumnListContent$*/ -->
</sql>
<!-- 根据主键查询计算引擎项目参数表 -->
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from dmp_project_engine_param
where project_param_id = #{projectParamId,jdbcType=INTEGER}
AND data_status='1'
</select>
<!-- 根据主键删除计算引擎项目参数表 -->
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from dmp_project_engine_param
where project_param_id = #{projectParamId,jdbcType=INTEGER}
</delete>
<!-- 根据主键软删除计算引擎项目参数表 -->
<update
id=
"softDeleteByPrimaryKey"
parameterType=
"java.lang.String"
>
update dmp_project_engine_param
<set>
data_status = '0'
</set>
where project_param_id = #{projectParamId,jdbcType=INTEGER}
</update>
<!-- 条件删除计算引擎项目参数表 -->
<delete
id=
"delete"
parameterType=
"java.lang.String"
>
delete from dmp_project_engine_param
<where>
<if
test=
"projectParamId != null"
>
AND project_param_id = #{projectParamId,jdbcType=INTEGER}
</if>
<if
test=
"configEngineId != null"
>
AND config_engine_id = #{configEngineId,jdbcType=INTEGER}
</if>
<if
test=
"paramId != null"
>
AND param_id = #{paramId,jdbcType=INTEGER}
</if>
<if
test=
"paramName != null"
>
AND param_name = #{paramName,jdbcType=VARCHAR}
</if>
<if
test=
"paramValue != null"
>
AND param_value = #{paramValue,jdbcType=VARCHAR}
</if>
<if
test=
"remark != null"
>
AND remark = #{remark,jdbcType=VARCHAR}
</if>
<if
test=
"dataStatus != null"
>
AND data_status = #{dataStatus,jdbcType=CHAR}
</if>
<if
test=
"createUserId != null"
>
AND create_user_id = #{createUserId,jdbcType=INTEGER}
</if>
<if
test=
"createTimeStart != null"
>
AND create_time >= #{createTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"createTimeEnd != null"
>
AND create_time
<![CDATA[ <= ]]>
#{createTimeEnd,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateUserId != null"
>
AND update_user_id = #{updateUserId,jdbcType=INTEGER}
</if>
<if
test=
"updateTimeStart != null"
>
AND update_time >= #{updateTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateTimeEnd != null"
>
AND update_time
<![CDATA[ <= ]]>
#{updateTimeEnd,jdbcType=TIMESTAMP}
</if>
AND data_status='1'
</where>
</delete>
<!-- 条件软删除计算引擎项目参数表 -->
<update
id=
"softDelete"
parameterType=
"java.lang.String"
>
update dmp_project_engine_param
<set>
data_status = '0'
</set>
<where>
<if
test=
"projectParamId != null"
>
AND project_param_id = #{projectParamId,jdbcType=INTEGER}
</if>
<if
test=
"configEngineId != null"
>
AND config_engine_id = #{configEngineId,jdbcType=INTEGER}
</if>
<if
test=
"paramId != null"
>
AND param_id = #{paramId,jdbcType=INTEGER}
</if>
<if
test=
"paramName != null"
>
AND param_name = #{paramName,jdbcType=VARCHAR}
</if>
<if
test=
"paramValue != null"
>
AND param_value = #{paramValue,jdbcType=VARCHAR}
</if>
<if
test=
"remark != null"
>
AND remark = #{remark,jdbcType=VARCHAR}
</if>
<if
test=
"dataStatus != null"
>
AND data_status = #{dataStatus,jdbcType=CHAR}
</if>
<if
test=
"createUserId != null"
>
AND create_user_id = #{createUserId,jdbcType=INTEGER}
</if>
<if
test=
"createTimeStart != null"
>
AND create_time >= #{createTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"createTimeEnd != null"
>
AND create_time
<![CDATA[ <= ]]>
#{createTimeEnd,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateUserId != null"
>
AND update_user_id = #{updateUserId,jdbcType=INTEGER}
</if>
<if
test=
"updateTimeStart != null"
>
AND update_time >= #{updateTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateTimeEnd != null"
>
AND update_time
<![CDATA[ <= ]]>
#{updateTimeEnd,jdbcType=TIMESTAMP}
</if>
AND data_status='1'
</where>
</update>
<!-- 插入计算引擎项目参数表 -->
<insert
id=
"insert"
parameterType=
"com.jz.dmp.cmdexectool.entity.DmpProjectEngineParam"
>
insert into dmp_project_engine_param (
project_param_id, config_engine_id, param_id, param_name, param_value,
remark, data_status, create_user_id, create_time, update_user_id,
update_time
)
values (
#{projectParamId,jdbcType=INTEGER}, #{configEngineId,jdbcType=INTEGER}, #{paramId,jdbcType=INTEGER}, #{paramName,jdbcType=VARCHAR}, #{paramValue,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR}, #{dataStatus,jdbcType=CHAR}, #{createUserId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateUserId,jdbcType=INTEGER},
#{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<!-- 批量新增计算引擎项目参数表 -->
<insert
id=
"insertBatch"
parameterType=
"com.jz.dmp.cmdexectool.entity.DmpProjectEngineParam"
>
insert into dmp_project_engine_param (
project_param_id, config_engine_id, param_id, param_name, param_value,
remark, data_status, create_user_id, create_time, update_user_id,
update_time
)
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>