Commit 25ec3bd8 authored by sml's avatar sml

代码提交

parent 44f4be8f
......@@ -35,5 +35,13 @@ public class CommConstant {
public static final String TASK_TYPE_OFFLINE = "2";// 离线任务
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
}
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;
}
}
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 {
}
......@@ -10,5 +10,25 @@ 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;
}
}
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 {
}
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;
}
}
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 {
}
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 {
}
......@@ -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;
}
}
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;
}
}
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;
}
}
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;
}
}
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;
}
}
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;
}
}
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;
}
}
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
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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
......@@ -31,9 +31,6 @@ public abstract class AbstractParameters implements IParameters {
@Override
public abstract boolean checkParameters();
@Override
public abstract List<ResourceInfo> getResourceFilesList();
/**
* local parameters
*/
......
......@@ -32,6 +32,8 @@ public class ShellParameters extends AbstractParameters {
* shell script
*/
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;
}
......
......@@ -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 ...
*/
private String type;
/**
* datasource id
*/
private int datasource;
/**
* sql
*/
private String sql;
/**
* sql type
* 0 query
* 1 NON_QUERY
*/
private int sqlType;
/**
* 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;
/**
* title
*/
private String title;
/**
* receivers
*/
private String receivers;
/**
* receivers cc
*/
private String receiversCc;
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public int getDatasource() {
return datasource;
}
public void setDatasource(int datasource) {
this.datasource = datasource;
}
public String getSql() {
return sql;
}
public void setSql(String sql) {
this.sql = sql;
}
public String getUdfs() {
return udfs;
}
public void setUdfs(String udfs) {
this.udfs = udfs;
}
public int getSqlType() {
return sqlType;
}
public void setSqlType(int sqlType) {
this.sqlType = sqlType;
}
public String getShowType() {
return showType;
}
public void setShowType(String showType) {
this.showType = showType;
}
public String getConnParams() {
return connParams;
}
public void setConnParams(String connParams) {
this.connParams = connParams;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getReceivers() {
return receivers;
}
public void setReceivers(String receivers) {
this.receivers = receivers;
}
public String getReceiversCc() {
return receiversCc;
}
public void setReceiversCc(String receiversCc) {
this.receiversCc = receiversCc;
}
public List<String> getPreStatements() {
return preStatements;
}
public void setPreStatements(List<String> preStatements) {
this.preStatements = preStatements;
}
public List<String> getPostStatements() {
return postStatements;
}
public void setPostStatements(List<String> postStatements) {
this.postStatements = postStatements;
}
@Override
public boolean checkParameters() {
return datasource != 0 && StringUtils.isNotEmpty(type) && StringUtils.isNotEmpty(sql);
}
@Override
public List<ResourceInfo> getResourceFilesList() {
return new ArrayList<>();
}
@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 +
'}';
}
/**
* shell script
*/
private String script;
private String taskAppId;
/**
* 数据源相关配置
*/
private Map<String, Object> source;
/**
* 目标相关配置
*/
private Map<String, Object> sink;
/**
* 环境相关配置
*/
private Map<String, Object> env;
/**
* ETL相关配置
*/
private Map<String, Object> transform;
/**
* resource list
*/
private List<ResourceInfo> resourceList;
public SqlParameters(String script, DmpProjectConfigInfoDto projectConfigInfoDto, DmpSyncingDatasourceDao dmpSyncingDatasourceDao) {
this.script = script;
JSONObject scriptObj = JSONObject.parseObject(script);
String outputType = scriptObj.getString("outputType");
String sqlScript = scriptObj.getString("sqlScript");
//evn
env.put("spark.app.name", "Waterdrop");
//source
Integer sourceId = scriptObj.getInteger("sourceId");
DmpSyncingDatasource dmpSyncingDatasource = dmpSyncingDatasourceDao.queryById(sourceId);
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);
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
//sink
}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 String getScript() {
return script;
}
public void setScript(String script) {
this.script = script;
}
public String getTaskAppId() {
return taskAppId;
}
public void setTaskAppId(String taskAppId) {
this.taskAppId = taskAppId;
}
public Map<String, Object> getSource() {
return source;
}
public void setSource(Map<String, Object> source) {
this.source = source;
}
public Map<String, Object> getSink() {
return sink;
}
public void setSink(Map<String, Object> sink) {
this.sink = sink;
}
public Map<String, Object> getEnv() {
return env;
}
public void setEnv(Map<String, Object> env) {
this.env = env;
}
public Map<String, Object> getTransform() {
return transform;
}
public void setTransform(Map<String, Object> transform) {
this.transform = transform;
}
public List<ResourceInfo> getResourceList() {
return resourceList;
}
public void setResourceList(List<ResourceInfo> resourceList) {
this.resourceList = resourceList;
}
@Override
public boolean checkParameters() {
return script != null && !script.isEmpty();
}
@Override
public List<ResourceInfo> getResourceFilesList() {
return resourceList;
}
/**
* @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;
}
}
......@@ -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:
......
/*
* 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;
}
}
......@@ -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,9 +150,103 @@ 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;
}
}
<?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>
<?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>
<?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>
<?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>
<?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=",">
(
#{item.projectParamId,jdbcType=INTEGER}, #{item.configEngineId,jdbcType=INTEGER}, #{item.paramId,jdbcType=INTEGER}, #{item.paramName,jdbcType=VARCHAR}, #{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.DmpProjectEngineParam">
insert into dmp_project_engine_param
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="projectParamId != null" >
project_param_id,
</if>
<if test="configEngineId != null" >
config_engine_id,
</if>
<if test="paramId != null" >
param_id,
</if>
<if test="paramName != null" >
param_name,
</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="projectParamId != null" >
#{projectParamId,jdbcType=INTEGER},
</if>
<if test="configEngineId != null" >
#{configEngineId,jdbcType=INTEGER},
</if>
<if test="paramId != null" >
#{paramId,jdbcType=INTEGER},
</if>
<if test="paramName != null" >
#{paramName,jdbcType=VARCHAR},
</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.DmpProjectEngineParam">
update dmp_project_engine_param set
project_param_id = #{projectParamId,jdbcType=INTEGER},
config_engine_id = #{configEngineId,jdbcType=INTEGER},
param_id = #{paramId,jdbcType=INTEGER},
param_name = #{paramName,jdbcType=VARCHAR},
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 project_param_id = #{projectParamId,jdbcType=INTEGER}
</update>
<!-- 选择性修改计算引擎项目参数表 -->
<update id="updateByPrimaryKeySelective" parameterType="com.jz.dmp.cmdexectool.entity.DmpProjectEngineParam">
update dmp_project_engine_param
<set>
<if test="projectParamId != null" >
project_param_id = #{projectParamId,jdbcType=INTEGER},
</if>
<if test="configEngineId != null" >
config_engine_id = #{configEngineId,jdbcType=INTEGER},
</if>
<if test="paramId != null" >
param_id = #{paramId,jdbcType=INTEGER},
</if>
<if test="paramName != null" >
param_name = #{paramName,jdbcType=VARCHAR},
</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 project_param_id = #{projectParamId,jdbcType=INTEGER}
</update>
<!-- 条件查询计算引擎项目参数表 -->
<select id="findList" resultMap="BaseDtoResultMap">
SELECT
<include refid="BaseDto_Column_List"/>
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>
</select>
<!-- 主键查询计算引擎项目参数表 -->
<select id="findById" resultMap="BaseDtoResultMap" parameterType="java.lang.String">
select
<include refid="BaseDto_Column_List" />
from dmp_project_engine_param
where project_param_id = #{projectParamId,jdbcType=INTEGER}
AND data_status='1'
</select>
<!-- 根据主键批量删除计算引擎项目参数表 -->
<delete id="deleteByIds">
delete from dmp_project_engine_param
where project_param_id in
<foreach collection="idList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<!-- 根据主键批量软删除计算引擎项目参数表 -->
<update id="softDeleteByIds">
update dmp_project_engine_param
<set>
data_status = '0'
</set>
where project_param_id in
<foreach collection="idList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</update>
</mapper>
<?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.DmpPublicConfigInfoMapper" >
<resultMap id="BaseResultMap" type="com.jz.dmp.cmdexectool.entity.DmpPublicConfigInfo">
<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.DmpPublicConfigInfoDto" extends="BaseResultMap">
<!-- /*$BaseDtoResultMapContent$*/ -->
</resultMap>
<sql id="Base_Column_List">
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
</sql>