Commit 0360e9a7 authored by sml's avatar sml

数据开发相关代码提交

parent e4f44f12
package com.jz.common.persistence;
import java.io.ByteArrayInputStream;
import java.io.UnsupportedEncodingException;
import java.sql.Blob;
import java.sql.CallableStatement;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import org.apache.ibatis.type.BaseTypeHandler;
import org.apache.ibatis.type.JdbcType;
public class CBTHandler extends BaseTypeHandler<String> {
private static final String DEFAULT_CHARSET = "utf-8";
@Override
public void setNonNullParameter(PreparedStatement ps, int i, String parameter, JdbcType jdbcType)
throws SQLException {
ByteArrayInputStream bis;
try {
bis = new ByteArrayInputStream(parameter.getBytes(DEFAULT_CHARSET));
} catch (UnsupportedEncodingException e) {
throw new RuntimeException("Blob Encoding Error!");
}
ps.setBinaryStream(i, bis, parameter.length());
}
@Override
public String getNullableResult(ResultSet rs, String columnName) throws SQLException {
Blob blob = rs.getBlob(columnName);
byte[] returnValue = null;
if (null != blob) {
returnValue = blob.getBytes(1, (int) blob.length());
}
try {
if(returnValue == null) return "";
return new String(returnValue, DEFAULT_CHARSET);
} catch (UnsupportedEncodingException e) {
throw new RuntimeException("Blob Encoding Error!");
}
}
@Override
public String getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
Blob blob = cs.getBlob(columnIndex);
byte[] returnValue = null;
if (null != blob) {
returnValue = blob.getBytes(1, (int) blob.length());
}
try {
return new String(returnValue, DEFAULT_CHARSET);
} catch (UnsupportedEncodingException e) {
throw new RuntimeException("Blob Encoding Error!");
}
}
@Override
public String getNullableResult(ResultSet arg0, int arg1) throws SQLException {
return null;
}
}
\ No newline at end of file
package com.jz.dmp.modules.controller;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.jz.common.bean.BaseBeanResponse;
import com.jz.common.bean.BaseResponse;
import com.jz.common.bean.PageInfoResponse;
import com.jz.common.constant.StatuConstant;
import com.jz.dmp.modules.controller.bean.DmpDevelopTaskHistoryDto;
import com.jz.dmp.modules.controller.bean.DmpDevelopTaskHistoryRequest;
import com.jz.dmp.modules.service.DmpDevelopTaskHistoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
/**
* 任务历史版本Controller
* @author ybz
*
*/
@RestController
@RequestMapping("/dmp/develop/task/history")
@Api(tags = "任务历史版本")
public class DmpDevelopTaskHistoryController {
@Autowired
private DmpDevelopTaskHistoryService dmpDevelopTaskHistoryService;
/**列表查询任务历史版本
* @param dmpDevelopTaskHistoryRequest
* @return
*/
@RequestMapping(method = RequestMethod.POST, value = "/findListWithPage")
@ApiOperation(value = "分頁列表查询任务历史版本", notes = "分頁列表查询任务历史版本")
public PageInfoResponse<DmpDevelopTaskHistoryDto> findListWithPage(@RequestBody DmpDevelopTaskHistoryRequest dmpDevelopTaskHistoryRequest, HttpServletRequest httpRequest){
PageInfoResponse<DmpDevelopTaskHistoryDto> pageInfo = new PageInfoResponse<DmpDevelopTaskHistoryDto>();
try {
pageInfo = dmpDevelopTaskHistoryService.findListWithPage(dmpDevelopTaskHistoryRequest, httpRequest);
} catch (Exception e) {
pageInfo.setMessage("查询失败");
pageInfo.setCode(StatuConstant.FAILURE_CODE);
e.printStackTrace();
}
return pageInfo;
}
/**版本回滚
* @param dmpDevelopTaskHistoryRequest
* @return
*/
@RequestMapping(method = RequestMethod.GET, value = "/taskVersionRollback")
@ApiOperation(value = "版本回滚", notes = "版本回滚")
@ApiImplicitParam(name = "id", value = "任务历史版本主键")
public BaseResponse taskVersionRollback(@RequestParam(name = "id", required = true ) Integer id, HttpServletRequest httpRequest){
BaseResponse baseResponse = new BaseResponse();
try {
baseResponse = dmpDevelopTaskHistoryService.taskVersionRollback(id, httpRequest);
} catch (Exception e) {
baseResponse.setMessage("请求失败");
baseResponse.setCode(StatuConstant.FAILURE_CODE);
e.printStackTrace();
}
return baseResponse;
}
}
package com.jz.dmp.modules.controller.bean;
import com.jz.dmp.modules.model.DmpDevelopTask;
import io.swagger.annotations.ApiModel;
/**任务开发Dto
* @author ybz
*
*/
@ApiModel(value = "任务开发Dto", description = "任务开发Dto")
public class DmpDevelopTaskDto extends DmpDevelopTask {
}
package com.jz.dmp.modules.controller.bean;
import com.jz.dmp.modules.model.DmpDevelopTaskHistory;
import io.swagger.annotations.ApiModel;
/**任务历史版本Dto
* @author ybz
*
*/
@ApiModel(value = "任务历史版本Dto", description = "任务历史版本Dto")
public class DmpDevelopTaskHistoryDto extends DmpDevelopTaskHistory {
}
package com.jz.dmp.modules.controller.bean;
import java.util.Date;
import com.jz.common.bean.BasePageBean;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**任务历史版本参数请求封装
* @author ybz
*
*/
@ApiModel(value = "任务历史版本参数请求封装", description = "任务历史版本参数请求封装")
public class DmpDevelopTaskHistoryRequest extends BasePageBean {
/**
* 主键
*/
@ApiModelProperty(value = "主键")
private Integer id;
/**
* 所属任务(关联任务主键)
*/
@ApiModelProperty(value = "所属任务(关联任务主键)")
private Integer taskId;
/**
* tree ID
*/
@ApiModelProperty(value = "tree ID")
private Integer treeId;
/**
* 数据源ID
*/
@ApiModelProperty(value = "数据源ID")
private Integer datasourceId;
/**
* 任务类型
*/
@ApiModelProperty(value = "任务类型")
private String taskType;
/**
* 类型
*/
@ApiModelProperty(value = "类型")
private String type;
/**
* 调度类型
*/
@ApiModelProperty(value = "调度类型")
private String scheduleType;
/**
* 是否已提交
*/
@ApiModelProperty(value = "是否已提交")
private String isSubmit;
/**
* 描述
*/
@ApiModelProperty(value = "描述")
private String taskDesc;
/**
* 脚本
*/
@ApiModelProperty(value = "脚本")
private String script;
/**
* flow_header
*/
@ApiModelProperty(value = "flow_header")
private String flowHeader;
/**
* flow_json
*/
@ApiModelProperty(value = "flow_json")
private String flowJson;
/**
* 版本
*/
@ApiModelProperty(value = "版本")
private String version;
/**
* is_gziped
*/
@ApiModelProperty(value = "is_gziped")
private String isGziped;
/**
* 任务数据状态
*/
@ApiModelProperty(value = "任务数据状态")
private String taskDataStatus;
/**
* 任务创建用户ID
*/
@ApiModelProperty(value = "任务创建用户ID")
private String taskCreateUserId;
/**
* 任务创建时间起
*/
@ApiModelProperty(value = "任务创建时间起")
private Date taskCreateTimeStart;
/**
* 任务创建时间止
*/
@ApiModelProperty(value = "任务创建时间止")
private Date taskCreateTimeEnd;
/**
* 任务修改用户ID
*/
@ApiModelProperty(value = "任务修改用户ID")
private String taskUpdateUserId;
/**
* 任务修改时间起
*/
@ApiModelProperty(value = "任务修改时间起")
private Date taskUpdateTimeStart;
/**
* 任务修改时间止
*/
@ApiModelProperty(value = "任务修改时间止")
private Date taskUpdateTimeEnd;
/**
* 备注
*/
@ApiModelProperty(value = "备注")
private String remark;
/**
* 数据状态(0:删除,1,未删除)
*/
@ApiModelProperty(value = "数据状态(0:删除,1,未删除)")
private String dataStatus;
/**
* 创建用户ID
*/
@ApiModelProperty(value = "创建用户ID")
private Integer createUserId;
/**
* 创建时间起
*/
@ApiModelProperty(value = "创建时间起")
private Date createTimeStart;
/**
* 创建时间止
*/
@ApiModelProperty(value = "创建时间止")
private Date createTimeEnd;
/**
* 修改用户ID
*/
@ApiModelProperty(value = "修改用户ID")
private Integer updateUserId;
/**
* 修改时间起
*/
@ApiModelProperty(value = "修改时间起")
private Date updateTimeStart;
/**
* 修改时间止
*/
@ApiModelProperty(value = "修改时间止")
private Date updateTimeEnd;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getTaskId() {
return taskId;
}
public void setTaskId(Integer taskId) {
this.taskId = taskId;
}
public Integer getTreeId() {
return treeId;
}
public void setTreeId(Integer treeId) {
this.treeId = treeId;
}
public Integer getDatasourceId() {
return datasourceId;
}
public void setDatasourceId(Integer datasourceId) {
this.datasourceId = datasourceId;
}
public String getTaskType() {
return taskType;
}
public void setTaskType(String taskType) {
this.taskType = taskType;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getScheduleType() {
return scheduleType;
}
public void setScheduleType(String scheduleType) {
this.scheduleType = scheduleType;
}
public String getIsSubmit() {
return isSubmit;
}
public void setIsSubmit(String isSubmit) {
this.isSubmit = isSubmit;
}
public String getTaskDesc() {
return taskDesc;
}
public void setTaskDesc(String taskDesc) {
this.taskDesc = taskDesc;
}
public String getScript() {
return script;
}
public void setScript(String script) {
this.script = script;
}
public String getFlowHeader() {
return flowHeader;
}
public void setFlowHeader(String flowHeader) {
this.flowHeader = flowHeader;
}
public String getFlowJson() {
return flowJson;
}
public void setFlowJson(String flowJson) {
this.flowJson = flowJson;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public String getIsGziped() {
return isGziped;
}
public void setIsGziped(String isGziped) {
this.isGziped = isGziped;
}
public String getTaskDataStatus() {
return taskDataStatus;
}
public void setTaskDataStatus(String taskDataStatus) {
this.taskDataStatus = taskDataStatus;
}
public String getTaskCreateUserId() {
return taskCreateUserId;
}
public void setTaskCreateUserId(String taskCreateUserId) {
this.taskCreateUserId = taskCreateUserId;
}
public Date getTaskCreateTimeStart() {
return taskCreateTimeStart;
}
public void setTaskCreateTimeStart(Date taskCreateTimeStart) {
this.taskCreateTimeStart = taskCreateTimeStart;
}
public Date getTaskCreateTimeEnd() {
return taskCreateTimeEnd;
}
public void setTaskCreateTimeEnd(Date taskCreateTimeEnd) {
this.taskCreateTimeEnd = taskCreateTimeEnd;
}
public String getTaskUpdateUserId() {
return taskUpdateUserId;
}
public void setTaskUpdateUserId(String taskUpdateUserId) {
this.taskUpdateUserId = taskUpdateUserId;
}
public Date getTaskUpdateTimeStart() {
return taskUpdateTimeStart;
}
public void setTaskUpdateTimeStart(Date taskUpdateTimeStart) {
this.taskUpdateTimeStart = taskUpdateTimeStart;
}
public Date getTaskUpdateTimeEnd() {
return taskUpdateTimeEnd;
}
public void setTaskUpdateTimeEnd(Date taskUpdateTimeEnd) {
this.taskUpdateTimeEnd = taskUpdateTimeEnd;
}
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 getCreateTimeStart() {
return createTimeStart;
}
public void setCreateTimeStart(Date createTimeStart) {
this.createTimeStart = createTimeStart;
}
public Date getCreateTimeEnd() {
return createTimeEnd;
}
public void setCreateTimeEnd(Date createTimeEnd) {
this.createTimeEnd = createTimeEnd;
}
public Integer getUpdateUserId() {
return updateUserId;
}
public void setUpdateUserId(Integer updateUserId) {
this.updateUserId = updateUserId;
}
public Date getUpdateTimeStart() {
return updateTimeStart;
}
public void setUpdateTimeStart(Date updateTimeStart) {
this.updateTimeStart = updateTimeStart;
}
public Date getUpdateTimeEnd() {
return updateTimeEnd;
}
public void setUpdateTimeEnd(Date updateTimeEnd) {
this.updateTimeEnd = updateTimeEnd;
}
}
package com.jz.dmp.modules.controller.bean;
import java.util.Date;
import com.jz.common.bean.BasePageBean;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**任务开发参数请求封装
* @author ybz
*
*/
@ApiModel(value = "任务开发参数请求封装", description = "任务开发参数请求封装")
public class DmpDevelopTaskRequest extends BasePageBean {
/**
* ID
*/
@ApiModelProperty(value = "ID")
private Integer id;
/**
* tree ID
*/
@ApiModelProperty(value = "tree ID")
private Integer treeId;
/**
* 数据源ID
*/
@ApiModelProperty(value = "数据源ID")
private Integer datasourceId;
/**
* 任务类型
*/
@ApiModelProperty(value = "任务类型")
private String taskType;
/**
* 类型
*/
@ApiModelProperty(value = "类型")
private String type;
/**
* 调度类型
*/
@ApiModelProperty(value = "调度类型")
private String scheduleType;
/**
* 是否已提交
*/
@ApiModelProperty(value = "是否已提交")
private String isSubmit;
/**
* 描述
*/
@ApiModelProperty(value = "描述")
private String taskDesc;
/**
* 脚本
*/
@ApiModelProperty(value = "脚本")
private String script;
/**
* 数据状态
*/
@ApiModelProperty(value = "数据状态")
private String dataStatus;
/**
* 创建用户ID
*/
@ApiModelProperty(value = "创建用户ID")
private String createUserId;
/**
* 数据创建时间起
*/
@ApiModelProperty(value = "数据创建时间起")
private Date createTimeStart;
/**
* 数据创建时间止
*/
@ApiModelProperty(value = "数据创建时间止")
private Date createTimeEnd;
/**
* 创建用户ID
*/
@ApiModelProperty(value = "创建用户ID")
private String updateUserId;
/**
* 数据更新时间起
*/
@ApiModelProperty(value = "数据更新时间起")
private Date updateTimeStart;
/**
* 数据更新时间止
*/
@ApiModelProperty(value = "数据更新时间止")
private Date updateTimeEnd;
/**
* 校验状态:SUCCEED 成功, FAIL 失败
*/
@ApiModelProperty(value = "校验状态:SUCCEED 成功, FAIL 失败")
private String chkResult;
/**
* 同步状态:SUCCEED 成功,FAIL 失败
*/
@ApiModelProperty(value = "同步状态:SUCCEED 成功,FAIL 失败")
private String syncResult;
/**
* 最终校验时间起
*/
@ApiModelProperty(value = "最终校验时间起")
private Date chkTimeStart;
/**
* 最终校验时间止
*/
@ApiModelProperty(value = "最终校验时间止")
private Date chkTimeEnd;
/**
* 最终同步时间起
*/
@ApiModelProperty(value = "最终同步时间起")
private Date syncTimeStart;
/**
* 最终同步时间止
*/
@ApiModelProperty(value = "最终同步时间止")
private Date syncTimeEnd;
/**
*
*/
@ApiModelProperty(value = "")
private String flowHeader;
/**
*
*/
@ApiModelProperty(value = "")
private String flowJson;
/**
*
*/
@ApiModelProperty(value = "")
private String version;
/**
*
*/
@ApiModelProperty(value = "")
private Integer isGziped;
/**
* 源数据库ID
*/
@ApiModelProperty(value = "源数据库ID")
private String sourceDbId;
/**
* 源数据库名称
*/
@ApiModelProperty(value = "源数据库名称")
private String sourceDbName;
/**
* 源数据表名称
*/
@ApiModelProperty(value = "源数据表名称")
private String sourceTableName;
/**
* 目标数据库名称
*/
@ApiModelProperty(value = "目标数据库名称")
private String targetDbName;
/**
* 目标数据表名称
*/
@ApiModelProperty(value = "目标数据表名称")
private String targetTableName;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getTreeId() {
return treeId;
}
public void setTreeId(Integer treeId) {
this.treeId = treeId;
}
public Integer getDatasourceId() {
return datasourceId;
}
public void setDatasourceId(Integer datasourceId) {
this.datasourceId = datasourceId;
}
public String getTaskType() {
return taskType;
}
public void setTaskType(String taskType) {
this.taskType = taskType;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getScheduleType() {
return scheduleType;
}
public void setScheduleType(String scheduleType) {
this.scheduleType = scheduleType;
}
public String getIsSubmit() {
return isSubmit;
}
public void setIsSubmit(String isSubmit) {
this.isSubmit = isSubmit;
}
public String getTaskDesc() {
return taskDesc;
}
public void setTaskDesc(String taskDesc) {
this.taskDesc = taskDesc;
}
public String getScript() {
return script;
}
public void setScript(String script) {
this.script = script;
}
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 getCreateTimeStart() {
return createTimeStart;
}
public void setCreateTimeStart(Date createTimeStart) {
this.createTimeStart = createTimeStart;
}
public Date getCreateTimeEnd() {
return createTimeEnd;
}
public void setCreateTimeEnd(Date createTimeEnd) {
this.createTimeEnd = createTimeEnd;
}
public String getUpdateUserId() {
return updateUserId;
}
public void setUpdateUserId(String updateUserId) {
this.updateUserId = updateUserId;
}
public Date getUpdateTimeStart() {
return updateTimeStart;
}
public void setUpdateTimeStart(Date updateTimeStart) {
this.updateTimeStart = updateTimeStart;
}
public Date getUpdateTimeEnd() {
return updateTimeEnd;
}
public void setUpdateTimeEnd(Date updateTimeEnd) {
this.updateTimeEnd = updateTimeEnd;
}
public String getChkResult() {
return chkResult;
}
public void setChkResult(String chkResult) {
this.chkResult = chkResult;
}
public String getSyncResult() {
return syncResult;
}
public void setSyncResult(String syncResult) {
this.syncResult = syncResult;
}
public Date getChkTimeStart() {
return chkTimeStart;
}
public void setChkTimeStart(Date chkTimeStart) {
this.chkTimeStart = chkTimeStart;
}
public Date getChkTimeEnd() {
return chkTimeEnd;
}
public void setChkTimeEnd(Date chkTimeEnd) {
this.chkTimeEnd = chkTimeEnd;
}
public Date getSyncTimeStart() {
return syncTimeStart;
}
public void setSyncTimeStart(Date syncTimeStart) {
this.syncTimeStart = syncTimeStart;
}
public Date getSyncTimeEnd() {
return syncTimeEnd;
}
public void setSyncTimeEnd(Date syncTimeEnd) {
this.syncTimeEnd = syncTimeEnd;
}
public String getFlowHeader() {
return flowHeader;
}
public void setFlowHeader(String flowHeader) {
this.flowHeader = flowHeader;
}
public String getFlowJson() {
return flowJson;
}
public void setFlowJson(String flowJson) {
this.flowJson = flowJson;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public Integer getIsGziped() {
return isGziped;
}
public void setIsGziped(Integer isGziped) {
this.isGziped = isGziped;
}
public String getSourceDbId() {
return sourceDbId;
}
public void setSourceDbId(String sourceDbId) {
this.sourceDbId = sourceDbId;
}
public String getSourceDbName() {
return sourceDbName;
}
public void setSourceDbName(String sourceDbName) {
this.sourceDbName = sourceDbName;
}
public String getSourceTableName() {
return sourceTableName;
}
public void setSourceTableName(String sourceTableName) {
this.sourceTableName = sourceTableName;
}
public String getTargetDbName() {
return targetDbName;
}
public void setTargetDbName(String targetDbName) {
this.targetDbName = targetDbName;
}
public String getTargetTableName() {
return targetTableName;
}
public void setTargetTableName(String targetTableName) {
this.targetTableName = targetTableName;
}
}
package com.jz.dmp.modules.controller.bean;
import com.jz.dmp.modules.model.DmpNavigationTree;
import io.swagger.annotations.ApiModel;
/**DMP资源导航树Dto
* @author ybz
*
*/
@ApiModel(value = "DMP资源导航树Dto", description = "DMP资源导航树Dto")
public class DmpNavigationTreeDto extends DmpNavigationTree {
}
package com.jz.dmp.modules.controller.bean;
import java.util.Date;
import com.jz.common.bean.BasePageBean;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**DMP资源导航树参数请求封装
* @author ybz
*
*/
@ApiModel(value = "DMP资源导航树参数请求封装", description = "DMP资源导航树参数请求封装")
public class DmpNavigationTreeRequest extends BasePageBean {
/**
* ID
*/
@ApiModelProperty(value = "ID")
private Integer id;
/**
* 项目ID
*/
@ApiModelProperty(value = "项目ID")
private Integer projectId;
/**
* 树类别
*/
@ApiModelProperty(value = "树类别")
private String category;
/**
* 树类型
*/
@ApiModelProperty(value = "树类型")
private String type;
/**
* 名称
*/
@ApiModelProperty(value = "名称")
private String name;
/**
* 序号
*/
@ApiModelProperty(value = "序号")
private Integer treeSort;
/**
* 是否叶子节点(0:否,1:是)
*/
@ApiModelProperty(value = "是否叶子节点(0:否,1:是)")
private String isLevel;
/**
* 是否启用(0:否,1:是)
*/
@ApiModelProperty(value = "是否启用(0:否,1:是)")
private String isEnable;
/**
* 父节点ID
*/
@ApiModelProperty(value = "父节点ID")
private Integer parentId;
/**
* 数据状态
*/
@ApiModelProperty(value = "数据状态")
private String dataStatus;
/**
* 创建用户ID
*/
@ApiModelProperty(value = "创建用户ID")
private String createUserId;
/**
* 数据创建时间起
*/
@ApiModelProperty(value = "数据创建时间起")
private Date createTimeStart;
/**
* 数据创建时间止
*/
@ApiModelProperty(value = "数据创建时间止")
private Date createTimeEnd;
/**
* 创建用户ID
*/
@ApiModelProperty(value = "创建用户ID")
private String updateUserId;
/**
* 数据更新时间起
*/
@ApiModelProperty(value = "数据更新时间起")
private Date updateTimeStart;
/**
* 数据更新时间止
*/
@ApiModelProperty(value = "数据更新时间止")
private Date updateTimeEnd;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getProjectId() {
return projectId;
}
public void setProjectId(Integer projectId) {
this.projectId = projectId;
}
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getTreeSort() {
return treeSort;
}
public void setTreeSort(Integer treeSort) {
this.treeSort = treeSort;
}
public String getIsLevel() {
return isLevel;
}
public void setIsLevel(String isLevel) {
this.isLevel = isLevel;
}
public String getIsEnable() {
return isEnable;
}
public void setIsEnable(String isEnable) {
this.isEnable = isEnable;
}
public Integer getParentId() {
return parentId;
}
public void setParentId(Integer parentId) {
this.parentId = parentId;
}
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 getCreateTimeStart() {
return createTimeStart;
}
public void setCreateTimeStart(Date createTimeStart) {
this.createTimeStart = createTimeStart;
}
public Date getCreateTimeEnd() {
return createTimeEnd;
}
public void setCreateTimeEnd(Date createTimeEnd) {
this.createTimeEnd = createTimeEnd;
}
public String getUpdateUserId() {
return updateUserId;
}
public void setUpdateUserId(String updateUserId) {
this.updateUserId = updateUserId;
}
public Date getUpdateTimeStart() {
return updateTimeStart;
}
public void setUpdateTimeStart(Date updateTimeStart) {
this.updateTimeStart = updateTimeStart;
}
public Date getUpdateTimeEnd() {
return updateTimeEnd;
}
public void setUpdateTimeEnd(Date updateTimeEnd) {
this.updateTimeEnd = updateTimeEnd;
}
}
package com.jz.dmp.modules.controller.bean;
import java.util.ArrayList;
import java.util.List;
import org.springframework.beans.BeanUtils;
import com.jz.dmp.modules.model.DmpDevelopTask;
public class MyDmpDevelopTaskConverter {
private static MyDmpDevelopTaskConverter instance;
private MyDmpDevelopTaskConverter() {};
public synchronized static MyDmpDevelopTaskConverter INSTANCE() {
if (instance==null) {
instance = new MyDmpDevelopTaskConverter();
}
return instance;
}
public DmpDevelopTaskDto domain2dto(DmpDevelopTask dmpDevelopTask) {
DmpDevelopTaskDto dmpDevelopTaskDto = new DmpDevelopTaskDto();
BeanUtils.copyProperties(dmpDevelopTask, dmpDevelopTaskDto);
return dmpDevelopTaskDto;
}
public List<DmpDevelopTaskDto> domain2dto(List<DmpDevelopTask> dmpDevelopTasks) {
List<DmpDevelopTaskDto> dmpDevelopTaskDtos = new ArrayList<DmpDevelopTaskDto>();
dmpDevelopTasks.stream().forEach(x -> {
dmpDevelopTaskDtos.add(domain2dto(x));
});
return dmpDevelopTaskDtos;
}
}
package com.jz.dmp.modules.controller.bean;
import java.util.ArrayList;
import java.util.List;
import org.springframework.beans.BeanUtils;
import com.jz.dmp.modules.model.DmpNavigationTree;
public class MyDmpNavigationTreeConverter {
private static MyDmpNavigationTreeConverter instance;
private MyDmpNavigationTreeConverter() {};
public synchronized static MyDmpNavigationTreeConverter INSTANCE() {
if (instance==null) {
instance = new MyDmpNavigationTreeConverter();
}
return instance;
}
public DmpNavigationTreeDto domain2dto(DmpNavigationTree dmpNavigationTree) {
DmpNavigationTreeDto dmpNavigationTreeDto = new DmpNavigationTreeDto();
BeanUtils.copyProperties(dmpNavigationTree, dmpNavigationTreeDto);
return dmpNavigationTreeDto;
}
public List<DmpNavigationTreeDto> domain2dto(List<DmpNavigationTree> dmpNavigationTrees) {
List<DmpNavigationTreeDto> dmpNavigationTreeDtos = new ArrayList<DmpNavigationTreeDto>();
dmpNavigationTrees.stream().forEach(x -> {
dmpNavigationTreeDtos.add(domain2dto(x));
});
return dmpNavigationTreeDtos;
}
}
package com.jz.dmp.modules.dao;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import com.jz.dmp.modules.controller.bean.DmpDevelopTaskHistoryDto;
import com.jz.dmp.modules.model.DmpDevelopTaskHistory;
/**任务历史版本 mapper
* @author ybz
*
*/
public interface DmpDevelopTaskHistoryMapper {
/**新增任务历史版本
* @param dmpDevelopTaskHistory
* @return
* @throws Exception
*/
public int insert(DmpDevelopTaskHistory dmpDevelopTaskHistory)throws Exception;
/**选择性增加任务历史版本
* @param dmpDevelopTaskHistory
* @return
* @throws Exception
*/
public int insertSelective(DmpDevelopTaskHistory dmpDevelopTaskHistory)throws Exception;
/**主键修改任务历史版本
* @param dmpDevelopTaskHistory
* @return
* @throws Exception
*/
public int updateByPrimaryKey(DmpDevelopTaskHistory dmpDevelopTaskHistory)throws Exception;
/**选择性修改任务历史版本
* @param dmpDevelopTaskHistory
* @return
* @throws Exception
*/
public int updateByPrimaryKeySelective(DmpDevelopTaskHistory dmpDevelopTaskHistory)throws Exception;
/**主键查询任务历史版本
* @param id
* @return
* @throws Exception
*/
public DmpDevelopTaskHistory selectByPrimaryKey(Integer id)throws Exception;
/**主键删除任务历史版本
* @param id
* @return
* @throws Exception
*/
public int deleteByPrimaryKey(Integer id)throws Exception;
/**主键软删除任务历史版本
* @param id
* @return
* @throws Exception
*/
public int softDeleteByPrimaryKey(Integer id)throws Exception;
/**主键删除任务历史版本
* @param id
* @return
* @throws Exception
*/
public int delete(Map<String, Object> param)throws Exception;
/**主键软删除任务历史版本
* @param id
* @return
* @throws Exception
*/
public int softDelete(Map<String, Object> param)throws Exception;
/**条件查询任务历史版本
* @param param
* @return
* @throws Exception
*/
public List<DmpDevelopTaskHistoryDto> findList(Map<String, Object> param)throws Exception;
/**主键查询任务历史版本
* @param id
* @return
* @throws Exception
*/
public DmpDevelopTaskHistoryDto findById(Integer id)throws Exception;
/**批量新增任务历史版本
* @param dmpDevelopTaskHistorys
* @throws Exception
*/
public void insertBatch(List<DmpDevelopTaskHistory> dmpDevelopTaskHistorys)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.modules.model;
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 DmpDevelopTaskHistory implements Serializable{
/**
*
*/
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@ApiModelProperty(value = "主键")
private Integer id;
/**
* 所属任务(关联任务主键)
*/
@ApiModelProperty(value = "所属任务(关联任务主键)")
private Integer taskId;
/**
* tree ID
*/
@ApiModelProperty(value = "tree ID")
private Integer treeId;
/**
* 数据源ID
*/
@ApiModelProperty(value = "数据源ID")
private Integer datasourceId;
/**
* 任务类型
*/
@ApiModelProperty(value = "任务类型")
private String taskType;
/**
* 类型
*/
@ApiModelProperty(value = "类型")
private String type;
/**
* 调度类型
*/
@ApiModelProperty(value = "调度类型")
private String scheduleType;
/**
* 是否已提交
*/
@ApiModelProperty(value = "是否已提交")
private String isSubmit;
/**
* 描述
*/
@ApiModelProperty(value = "描述")
private String taskDesc;
/**
* 脚本
*/
@ApiModelProperty(value = "脚本")
private String script;
/**
* flow_header
*/
@ApiModelProperty(value = "flow_header")
private String flowHeader;
/**
* flow_json
*/
@ApiModelProperty(value = "flow_json")
private String flowJson;
/**
* 版本
*/
@ApiModelProperty(value = "版本")
private String version;
/**
* is_gziped
*/
@ApiModelProperty(value = "is_gziped")
private String isGziped;
/**
* 任务数据状态
*/
@ApiModelProperty(value = "任务数据状态")
private String taskDataStatus;
/**
* 任务创建用户ID
*/
@ApiModelProperty(value = "任务创建用户ID")
private String taskCreateUserId;
/**
* 任务创建时间
*/
@ApiModelProperty(value = "任务创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date taskCreateTime;
/**
* 任务修改用户ID
*/
@ApiModelProperty(value = "任务修改用户ID")
private String taskUpdateUserId;
/**
* 任务修改时间
*/
@ApiModelProperty(value = "任务修改时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date taskUpdateTime;
/**
* 备注
*/
@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 getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getTaskId() {
return taskId;
}
public void setTaskId(Integer taskId) {
this.taskId = taskId;
}
public Integer getTreeId() {
return treeId;
}
public void setTreeId(Integer treeId) {
this.treeId = treeId;
}
public Integer getDatasourceId() {
return datasourceId;
}
public void setDatasourceId(Integer datasourceId) {
this.datasourceId = datasourceId;
}
public String getTaskType() {
return taskType;
}
public void setTaskType(String taskType) {
this.taskType = taskType;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getScheduleType() {
return scheduleType;
}
public void setScheduleType(String scheduleType) {
this.scheduleType = scheduleType;
}
public String getIsSubmit() {
return isSubmit;
}
public void setIsSubmit(String isSubmit) {
this.isSubmit = isSubmit;
}
public String getTaskDesc() {
return taskDesc;
}
public void setTaskDesc(String taskDesc) {
this.taskDesc = taskDesc;
}
public String getScript() {
return script;
}
public void setScript(String script) {
this.script = script;
}
public String getFlowHeader() {
return flowHeader;
}
public void setFlowHeader(String flowHeader) {
this.flowHeader = flowHeader;
}
public String getFlowJson() {
return flowJson;
}
public void setFlowJson(String flowJson) {
this.flowJson = flowJson;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public String getIsGziped() {
return isGziped;
}
public void setIsGziped(String isGziped) {
this.isGziped = isGziped;
}
public String getTaskDataStatus() {
return taskDataStatus;
}
public void setTaskDataStatus(String taskDataStatus) {
this.taskDataStatus = taskDataStatus;
}
public String getTaskCreateUserId() {
return taskCreateUserId;
}
public void setTaskCreateUserId(String taskCreateUserId) {
this.taskCreateUserId = taskCreateUserId;
}
public Date getTaskCreateTime() {
return taskCreateTime;
}
public void setTaskCreateTime(Date taskCreateTime) {
this.taskCreateTime = taskCreateTime;
}
public String getTaskUpdateUserId() {
return taskUpdateUserId;
}
public void setTaskUpdateUserId(String taskUpdateUserId) {
this.taskUpdateUserId = taskUpdateUserId;
}
public Date getTaskUpdateTime() {
return taskUpdateTime;
}
public void setTaskUpdateTime(Date taskUpdateTime) {
this.taskUpdateTime = taskUpdateTime;
}
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;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment