Commit 1c8ca75b authored by mcb's avatar mcb

冲突解决

parents f55e0cab 0360e9a7
package com.jz.common.bean; package com.jz.common.bean;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**分页信息封装 /**分页信息封装
* @author ybz * @author ybz
* *
*/ */
@ApiModel(value = "分页信息", description = "分页信息封装")
public class BasePageBean { public class BasePageBean {
@ApiModelProperty(value = "当前页码")
private int pageNum = 1; private int pageNum = 1;
@ApiModelProperty(value = "每页显示记录数")
private int pageSize = 10; private int pageSize = 10;
public int getPageNum() { public int getPageNum() {
return pageNum; return pageNum;
} }
......
package com.jz.common.bean; package com.jz.common.bean;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/** /**
* @author ybz * @author ybz
* *
*/ */
@ApiModel(value = "响应码封装实体", description = "响应码封装实体")
public class BaseResponse { public class BaseResponse {
//错误码 //错误码
@ApiModelProperty(value = "错误码")
private String code; private String code;
//错误消息 //错误消息
@ApiModelProperty(value = "错误消息")
private String message; private String message;
public BaseResponse() {} public BaseResponse() {}
......
...@@ -9,6 +9,7 @@ import org.springframework.security.core.userdetails.UserDetails; ...@@ -9,6 +9,7 @@ import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import com.jz.dmp.modules.model.DmpMember; import com.jz.dmp.modules.model.DmpMember;
import com.jz.dmp.modules.model.DmpPermission; import com.jz.dmp.modules.model.DmpPermission;
...@@ -55,6 +56,15 @@ public class CustomUserService implements UserDetailsService { ...@@ -55,6 +56,15 @@ public class CustomUserService implements UserDetailsService {
//设置用户在当前默认项目的资源 //设置用户在当前默认项目的资源
List<DmpPermission> memberProjPermissions = dmpPermissionService.findPermissionByRoles(memberProjectRoles); List<DmpPermission> memberProjPermissions = dmpPermissionService.findPermissionByRoles(memberProjectRoles);
user.setMemberProjectPermissionList(memberProjPermissions); user.setMemberProjectPermissionList(memberProjPermissions);
//设置用户资源
List<DmpPermission> permissions = new ArrayList<DmpPermission>();
if (!CollectionUtils.isEmpty(memberPermissions)) {
permissions.addAll(memberPermissions);
}
if (!CollectionUtils.isEmpty(memberProjPermissions)) {
permissions.addAll(memberProjPermissions);
}
user.setPermissionList(permissions);
List<GrantedAuthority> grantedAuthorities = new ArrayList<>(); List<GrantedAuthority> grantedAuthorities = new ArrayList<>();
//List<DmpPermission> permissions = permissionDao.getDmpDefaultPermission(); //List<DmpPermission> permissions = permissionDao.getDmpDefaultPermission();
......
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; package com.jz.dmp.modules.controller;
import com.jz.dmp.modules.service.DmpDevelopTaskService; import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired; 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.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.jz.common.bean.PageInfoResponse;
import com.jz.common.constant.StatuConstant;
import com.jz.dmp.modules.controller.bean.DmpDevelopTaskDto;
import com.jz.dmp.modules.controller.bean.DmpDevelopTaskRequest;
import com.jz.dmp.modules.service.DmpDevelopTaskService;
import io.swagger.annotations.ApiOperation;
/** /**
* 任务开发(DmpDevelopTask)表控制层 * 任务开发(DmpDevelopTask)表控制层
* *
...@@ -19,6 +30,24 @@ public class DmpDevelopTaskController { ...@@ -19,6 +30,24 @@ public class DmpDevelopTaskController {
*/ */
@Autowired @Autowired
private DmpDevelopTaskService dmpDevelopTaskService; private DmpDevelopTaskService dmpDevelopTaskService;
/**列表查询任务开发
* @param dmpDevelopTaskRequest
* @return
*/
@RequestMapping(method = RequestMethod.POST, value = "/findListWithPage")
@ApiOperation(value = "分頁列表查询任务开发", notes = "分頁列表查询任务开发")
public PageInfoResponse<DmpDevelopTaskDto> findListWithPage(@RequestBody DmpDevelopTaskRequest dmpDevelopTaskRequest, HttpServletRequest httpRequest){
PageInfoResponse<DmpDevelopTaskDto> pageInfo = new PageInfoResponse<DmpDevelopTaskDto>();
try {
pageInfo = dmpDevelopTaskService.findListWithPage(dmpDevelopTaskRequest, httpRequest);
} catch (Exception e) {
pageInfo.setMessage("查询失败");
pageInfo.setCode(StatuConstant.FAILURE_CODE);
e.printStackTrace();
}
return pageInfo;
}
} }
\ 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; package com.jz.dmp.modules.controller;
import com.jz.dmp.modules.model.DmpNavigationTree; import javax.servlet.http.HttpServletRequest;
import com.jz.dmp.modules.service.DmpNavigationTreeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import com.jz.common.bean.BaseBeanResponse;
import com.jz.common.constant.StatuConstant;
import com.jz.dmp.modules.controller.bean.DmpNavigationTreeDto;
import com.jz.dmp.modules.controller.bean.DmpNavigationTreeRequest;
import com.jz.dmp.modules.model.DmpNavigationTree;
import com.jz.dmp.modules.service.DmpNavigationTreeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
/** /**
* DMP资源导航树(DmpNavigationTree)表控制层 * DMP资源导航树(DmpNavigationTree)表控制层
...@@ -38,5 +46,46 @@ public class DmpNavigationTreeController { ...@@ -38,5 +46,46 @@ public class DmpNavigationTreeController {
public DmpNavigationTree selectOne(Integer id) { public DmpNavigationTree selectOne(Integer id) {
return this.dmpNavigationTreeService.queryById(id); return this.dmpNavigationTreeService.queryById(id);
} }
/**列表查询DMP资源导航树
* @param dmpNavigationTreeRequest
* @return
*/
@RequestMapping(method = RequestMethod.POST, value = "/findList")
@ApiOperation(value = "列表查询DMP资源导航树", notes = "列表查询DMP资源导航树")
public BaseBeanResponse<DmpNavigationTreeDto> findList(@RequestBody DmpNavigationTreeRequest dmpNavigationTreeRequest, HttpServletRequest httpRequest){
BaseBeanResponse<DmpNavigationTreeDto> baseBeanResponse = new BaseBeanResponse<DmpNavigationTreeDto>();
try {
baseBeanResponse = dmpNavigationTreeService.findList(dmpNavigationTreeRequest, httpRequest);
} catch (Exception e) {
baseBeanResponse.setMessage("查询失败");
baseBeanResponse.setCode(StatuConstant.FAILURE_CODE);
e.printStackTrace();
}
return baseBeanResponse;
}
/**新增DMP资源导航树
* @param dmpNavigationTreeRequest
* @return
*/
@RequestMapping(method = RequestMethod.POST, value = "/add")
@ApiOperation(value = "新增DMP资源导航树", notes = "新增DMP资源导航树")
public BaseBeanResponse<DmpNavigationTree> add(@RequestBody DmpNavigationTree dmpNavigationTree, HttpServletRequest httpRequest){
BaseBeanResponse<DmpNavigationTree> baseBeanResponse = new BaseBeanResponse<DmpNavigationTree>();
try {
DmpNavigationTree dmpNavigationTreeDb = dmpNavigationTreeService.insert(dmpNavigationTree);
baseBeanResponse.setCode(StatuConstant.CODE_SUCCESS);
baseBeanResponse.setMessage("新增成功");
baseBeanResponse.setData(dmpNavigationTreeDb);
} catch (Exception e) {
baseBeanResponse.setMessage("新增失败");
baseBeanResponse.setCode(StatuConstant.FAILURE_CODE);
e.printStackTrace();
}
return baseBeanResponse;
}
} }
\ No newline at end of file
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;
}
}
...@@ -25,6 +25,7 @@ import com.jz.dmp.modules.service.sys.DmpPermissionService; ...@@ -25,6 +25,7 @@ import com.jz.dmp.modules.service.sys.DmpPermissionService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
/** /**
...@@ -161,12 +162,15 @@ public class DmpPermissionController { ...@@ -161,12 +162,15 @@ public class DmpPermissionController {
*/ */
@RequestMapping(method = RequestMethod.POST, value = "/findListByParentCode") @RequestMapping(method = RequestMethod.POST, value = "/findListByParentCode")
@ApiOperation(value = "获取当前用户指定资源", notes = "根据父级资源编码,获取当前登录用户所有资源") @ApiOperation(value = "获取当前用户指定资源", notes = "根据父级资源编码,获取当前登录用户所有资源")
@ApiImplicitParam(name = "parentCode", value = "父资源编码") @ApiImplicitParams({
public BaseBeanResponse<DmpPermissionDto> findListByParentCode(@RequestParam(name = "parentCode", required = true) String parentCode, HttpServletRequest httpRequest){ @ApiImplicitParam(name = "parentCode", value = "父资源编码"),
@ApiImplicitParam(name = "type", value = "请求类型:0:用户项目下资源;1:用户系统级别资源")
})
public BaseBeanResponse<DmpPermissionDto> findListByParentCode(@RequestParam(name = "parentCode", required = true) String parentCode, @RequestParam(name = "type", required = true) String type, HttpServletRequest httpRequest){
BaseBeanResponse<DmpPermissionDto> baseBeanResponse = new BaseBeanResponse<DmpPermissionDto>(); BaseBeanResponse<DmpPermissionDto> baseBeanResponse = new BaseBeanResponse<DmpPermissionDto>();
try { try {
baseBeanResponse = dmpPermissionService.findListByParentCode(parentCode, httpRequest); baseBeanResponse = dmpPermissionService.findListByParentCode(parentCode, type, httpRequest);
} catch (Exception e) { } catch (Exception e) {
baseBeanResponse.setMessage("查询失败"); baseBeanResponse.setMessage("查询失败");
baseBeanResponse.setCode(StatuConstant.FAILURE_CODE); baseBeanResponse.setCode(StatuConstant.FAILURE_CODE);
......
...@@ -4,6 +4,7 @@ import java.util.ArrayList; ...@@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.util.CollectionUtils;
import com.jz.dmp.modules.model.DmpPermission; import com.jz.dmp.modules.model.DmpPermission;
...@@ -30,9 +31,11 @@ public class MyDmpPermissionConverter { ...@@ -30,9 +31,11 @@ public class MyDmpPermissionConverter {
public List<DmpPermissionDto> domain2dto(List<DmpPermission> dmpPermissions) { public List<DmpPermissionDto> domain2dto(List<DmpPermission> dmpPermissions) {
List<DmpPermissionDto> dmpPermissionDtos = new ArrayList<DmpPermissionDto>(); List<DmpPermissionDto> dmpPermissionDtos = new ArrayList<DmpPermissionDto>();
dmpPermissions.stream().forEach(x -> { if (!CollectionUtils.isEmpty(dmpPermissions)) {
dmpPermissionDtos.add(domain2dto(x)); dmpPermissions.stream().forEach(x -> {
}); dmpPermissionDtos.add(domain2dto(x));
});
}
return dmpPermissionDtos; return dmpPermissionDtos;
} }
...@@ -46,9 +49,12 @@ public class MyDmpPermissionConverter { ...@@ -46,9 +49,12 @@ public class MyDmpPermissionConverter {
public List<DmpPermission> dto2domain(List<DmpPermissionDto> dmpPermissionDtos) { public List<DmpPermission> dto2domain(List<DmpPermissionDto> dmpPermissionDtos) {
List<DmpPermission> dmpPermissions = new ArrayList<DmpPermission>(); List<DmpPermission> dmpPermissions = new ArrayList<DmpPermission>();
dmpPermissionDtos.stream().forEach(x -> {
dmpPermissions.add(domain2dto(x)); if (!CollectionUtils.isEmpty(dmpPermissionDtos)) {
}); dmpPermissionDtos.stream().forEach(x -> {
dmpPermissions.add(domain2dto(x));
});
}
return dmpPermissions; return dmpPermissions;
} }
......
package com.jz.dmp.modules.dao; 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.DmpDevelopTaskDto;
import com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListDto; import com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListDto;
import com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListReq; import com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListReq;
import com.jz.dmp.modules.model.DmpDevelopTask; import com.jz.dmp.modules.model.DmpDevelopTask;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
public interface DmpDevelopTaskDao { public interface DmpDevelopTaskDao {
...@@ -36,4 +38,12 @@ public interface DmpDevelopTaskDao { ...@@ -36,4 +38,12 @@ public interface DmpDevelopTaskDao {
List<DataDevTaskListDto> queryDevTaskListPage(DataDevTaskListReq req) throws Exception; List<DataDevTaskListDto> queryDevTaskListPage(DataDevTaskListReq req) throws Exception;
List<DataDevTaskListDto> queryTaskTreeInfo(Map params) throws Exception; List<DataDevTaskListDto> queryTaskTreeInfo(Map params) throws Exception;
/**条件查询任务开发
* @param param
* @return
* @throws Exception
*/
public List<DmpDevelopTask> findList(Map<String, Object> param)throws Exception;
} }
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;
}
}
...@@ -127,6 +127,9 @@ public class DmpMember implements UserDetails{ ...@@ -127,6 +127,9 @@ public class DmpMember implements UserDetails{
@ApiModelProperty(value = "用户当前项目资源") @ApiModelProperty(value = "用户当前项目资源")
private List<DmpPermission> memberProjectPermissionList; private List<DmpPermission> memberProjectPermissionList;
@ApiModelProperty(value = "用户资源")
private List<DmpPermission> permissionList;
@ApiModelProperty(value = "权限") @ApiModelProperty(value = "权限")
private List<? extends GrantedAuthority> authorities; private List<? extends GrantedAuthority> authorities;
...@@ -290,6 +293,14 @@ public class DmpMember implements UserDetails{ ...@@ -290,6 +293,14 @@ public class DmpMember implements UserDetails{
this.memberProjectPermissionList = memberProjectPermissionList; this.memberProjectPermissionList = memberProjectPermissionList;
} }
public List<DmpPermission> getPermissionList() {
return permissionList;
}
public void setPermissionList(List<DmpPermission> permissionList) {
this.permissionList = permissionList;
}
public void setAuthorities(List<? extends GrantedAuthority> authorities) { public void setAuthorities(List<? extends GrantedAuthority> authorities) {
this.authorities = authorities; this.authorities = authorities;
} }
......
package com.jz.dmp.modules.service;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import com.jz.common.bean.BaseBeanResponse;
import com.jz.common.bean.BaseResponse;
import com.jz.common.bean.PageInfoResponse;
import com.jz.dmp.modules.controller.bean.DmpDevelopTaskHistoryDto;
import com.jz.dmp.modules.controller.bean.DmpDevelopTaskHistoryRequest;
import com.jz.dmp.modules.model.DmpDevelopTaskHistory;
/**
* 任务历史版本服务接口
* @author ybz
*
*/
public interface DmpDevelopTaskHistoryService {
/**条件分頁查询所有任务历史版本
* @param dmpDevelopTaskHistoryRequest
* @param httpRequest
* @return
* @throws Exception
*/
public PageInfoResponse<DmpDevelopTaskHistoryDto> findListWithPage(DmpDevelopTaskHistoryRequest dmpDevelopTaskHistoryRequest, HttpServletRequest httpRequest)throws Exception;
/**条件查询所有任务历史版本
* @param dmpDevelopTaskHistoryRequest
* @param httpRequest
* @return
* @throws Exception
*/
public BaseBeanResponse<DmpDevelopTaskHistoryDto> findList(DmpDevelopTaskHistoryRequest dmpDevelopTaskHistoryRequest, HttpServletRequest httpRequest)throws Exception;
/**新增任务历史版本
* @param dmpDevelopTaskHistory
* @param httpRequest
* @return
* @throws Exception
*/
public BaseBeanResponse<DmpDevelopTaskHistory> add(DmpDevelopTaskHistory dmpDevelopTaskHistory, HttpServletRequest httpRequest)throws Exception;
/**主键查询任务历史版本
* @param id
* @param httpRequest
* @return
* @throws Exception
*/
public BaseBeanResponse<DmpDevelopTaskHistoryDto> findById(Integer id, HttpServletRequest httpRequest)throws Exception;
/**修改任务历史版本
* @param dmpDevelopTaskHistory
* @param httpRequest
* @return
* @throws Exception
*/
public BaseBeanResponse<DmpDevelopTaskHistory> edit(DmpDevelopTaskHistory dmpDevelopTaskHistory, HttpServletRequest httpRequest)throws Exception;
/**主键删除任务历史版本
* @param id
* @param httpRequest
* @return
* @throws Exception
*/
public BaseResponse deleteById(Integer id, HttpServletRequest httpRequest)throws Exception;
/**主键软删除任务历史版本
* @param id
* @param httpRequest
* @return
* @throws Exception
*/
public BaseResponse softDeleteById(Integer id, HttpServletRequest httpRequest)throws Exception;
/**条件删除任务历史版本
* @param dmpDevelopTaskHistoryRequest
* @param httpRequest
* @return
* @throws Exception
*/
public BaseResponse delete(DmpDevelopTaskHistoryRequest dmpDevelopTaskHistoryRequest, HttpServletRequest httpRequest)throws Exception;
/**条件软删除任务历史版本
* @param dmpDevelopTaskHistoryRequest
* @param httpRequest
* @return
* @throws Exception
*/
public BaseResponse softDelete(DmpDevelopTaskHistoryRequest dmpDevelopTaskHistoryRequest, HttpServletRequest httpRequest)throws Exception;
/**
* @Title: deleteByIds
* @Description: TODO(根据主键批量删除)
* @param @param idList
* @param @param httpRequest
* @param @return
* @param @throws Exception 参数
* @return BaseResponse 返回类型
* @throws
*/
public BaseResponse deleteByIds(List<Integer> idList, HttpServletRequest httpRequest)throws Exception;
/**
* @Title: softDeleteByIds
* @Description: TODO(根据主键批量软删除)
* @param @param idList
* @param @param httpRequest
* @param @return
* @param @throws Exception 参数
* @return BaseResponse 返回类型
* @throws
*/
public BaseResponse softDeleteByIds(List<Integer> idList, HttpServletRequest httpRequest)throws Exception;
/**
* @Title: taskVersionRollback
* @Description: TODO(任务版本回滚)
* @param @param id
* @param @param httpRequest
* @param @return
* @param @throws Exception 参数
* @return BaseResponse 返回类型
* @throws
*/
public BaseResponse taskVersionRollback(Integer id, HttpServletRequest httpRequest)throws Exception;
}
package com.jz.dmp.modules.service; package com.jz.dmp.modules.service;
import javax.servlet.http.HttpServletRequest;
import com.jz.common.constant.JsonResult; import com.jz.common.constant.JsonResult;
import com.jz.common.page.PageInfoResponse; import com.jz.common.page.PageInfoResponse;
import com.jz.dmp.modules.controller.dataOperation.bean.DataDevExamplesListDto; import com.jz.dmp.modules.controller.dataOperation.bean.DataDevExamplesListDto;
import com.jz.dmp.modules.controller.dataOperation.bean.DataDevExamplesListReq; import com.jz.dmp.modules.controller.dataOperation.bean.DataDevExamplesListReq;
import com.jz.dmp.modules.controller.bean.DmpDevelopTaskDto;
import com.jz.dmp.modules.controller.bean.DmpDevelopTaskRequest;
import com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListDto; import com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListDto;
import com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListReq; import com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListReq;
import com.jz.dmp.modules.model.DmpDevelopTask; import com.jz.dmp.modules.model.DmpDevelopTask;
...@@ -44,4 +48,13 @@ public interface DmpDevelopTaskService { ...@@ -44,4 +48,13 @@ public interface DmpDevelopTaskService {
* @since 2021-01-14 * @since 2021-01-14
*/ */
PageInfoResponse<DataDevExamplesListDto> queryDevExamplesListPage(DataDevExamplesListReq req) throws Exception; PageInfoResponse<DataDevExamplesListDto> queryDevExamplesListPage(DataDevExamplesListReq req) throws Exception;
/**条件分頁查询所有任务开发
* @param dmpDevelopTaskRequest
* @param httpRequest
* @return
* @throws Exception
*/
public com.jz.common.bean.PageInfoResponse<DmpDevelopTaskDto> findListWithPage(DmpDevelopTaskRequest dmpDevelopTaskRequest, HttpServletRequest httpRequest)throws Exception;
} }
\ No newline at end of file
package com.jz.dmp.modules.service; package com.jz.dmp.modules.service;
import com.jz.dmp.modules.model.DmpNavigationTree;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletRequest;
import com.jz.common.bean.BaseBeanResponse;
import com.jz.dmp.modules.controller.bean.DmpNavigationTreeDto;
import com.jz.dmp.modules.controller.bean.DmpNavigationTreeRequest;
import com.jz.dmp.modules.model.DmpNavigationTree;
/** /**
* DMP资源导航树(DmpNavigationTree)表服务接口 * DMP资源导航树(DmpNavigationTree)表服务接口
* *
...@@ -35,7 +40,7 @@ public interface DmpNavigationTreeService { ...@@ -35,7 +40,7 @@ public interface DmpNavigationTreeService {
* @param dmpNavigationTree 实例对象 * @param dmpNavigationTree 实例对象
* @return 实例对象 * @return 实例对象
*/ */
DmpNavigationTree insert(DmpNavigationTree dmpNavigationTree); DmpNavigationTree insert(DmpNavigationTree dmpNavigationTree)throws Exception;
/** /**
* 修改数据 * 修改数据
...@@ -52,5 +57,14 @@ public interface DmpNavigationTreeService { ...@@ -52,5 +57,14 @@ public interface DmpNavigationTreeService {
* @return 是否成功 * @return 是否成功
*/ */
boolean deleteById(Integer id); boolean deleteById(Integer id);
/**条件查询所有DMP资源导航树
* @param dmpNavigationTreeRequest
* @param httpRequest
* @return
* @throws Exception
*/
public BaseBeanResponse<DmpNavigationTreeDto> findList(DmpNavigationTreeRequest dmpNavigationTreeRequest, HttpServletRequest httpRequest)throws Exception;
} }
\ No newline at end of file
package com.jz.dmp.modules.service.impl;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import javax.servlet.http.HttpServletRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
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.common.persistence.BaseService;
import com.jz.dmp.modules.controller.bean.DmpDevelopTaskHistoryDto;
import com.jz.dmp.modules.controller.bean.DmpDevelopTaskHistoryRequest;
import com.jz.dmp.modules.dao.DmpDevelopTaskHistoryMapper;
import com.jz.dmp.modules.model.DmpDevelopTaskHistory;
import com.jz.dmp.modules.service.DmpDevelopTaskHistoryService;
/**
* 任务历史版本服务的实现?
*
* @author ybz
*
*/
@Service("dmpDevelopTaskHistoryService")
public class DmpDevelopTaskHistoryServiceImpl extends BaseService implements DmpDevelopTaskHistoryService {
private static Logger logger = LoggerFactory.getLogger(DmpDevelopTaskHistoryServiceImpl.class);
@Autowired
private DmpDevelopTaskHistoryMapper dmpDevelopTaskHistoryMapper;
/*
* (non-Javadoc)
*
* @see
* com.ycxc.vmts.service.DmpDevelopTaskHistoryService#findList(com.ycxc.vmts.controller.bas.
* bean.DmpDevelopTaskHistoryRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
public PageInfoResponse<DmpDevelopTaskHistoryDto> findListWithPage(DmpDevelopTaskHistoryRequest dmpDevelopTaskHistoryRequest, HttpServletRequest httpRequest)
throws Exception {
PageInfoResponse<DmpDevelopTaskHistoryDto> pageInfoResponse = new PageInfoResponse<>();
Map<String, Object> param = new HashMap<>();
//主键
if (dmpDevelopTaskHistoryRequest.getId() != null) {
param.put("id", dmpDevelopTaskHistoryRequest.getId());
}
//所属任务(关联任务主键)
if (dmpDevelopTaskHistoryRequest.getTaskId() != null) {
param.put("taskId", dmpDevelopTaskHistoryRequest.getTaskId());
}
//tree ID
if (dmpDevelopTaskHistoryRequest.getTreeId() != null) {
param.put("treeId", dmpDevelopTaskHistoryRequest.getTreeId());
}
//数据源ID
if (dmpDevelopTaskHistoryRequest.getDatasourceId() != null) {
param.put("datasourceId", dmpDevelopTaskHistoryRequest.getDatasourceId());
}
//任务类型
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getTaskType())) {
param.put("taskType", dmpDevelopTaskHistoryRequest.getTaskType());
}
//类型
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getType())) {
param.put("type", dmpDevelopTaskHistoryRequest.getType());
}
//调度类型
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getScheduleType())) {
param.put("scheduleType", dmpDevelopTaskHistoryRequest.getScheduleType());
}
//是否已提交
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getIsSubmit())) {
param.put("isSubmit", dmpDevelopTaskHistoryRequest.getIsSubmit());
}
//描述
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getTaskDesc())) {
param.put("taskDesc", dmpDevelopTaskHistoryRequest.getTaskDesc());
}
//脚本
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getScript())) {
param.put("script", dmpDevelopTaskHistoryRequest.getScript());
}
//flow_header
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getFlowHeader())) {
param.put("flowHeader", dmpDevelopTaskHistoryRequest.getFlowHeader());
}
//flow_json
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getFlowJson())) {
param.put("flowJson", dmpDevelopTaskHistoryRequest.getFlowJson());
}
//版本
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getVersion())) {
param.put("version", dmpDevelopTaskHistoryRequest.getVersion());
}
//is_gziped
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getIsGziped())) {
param.put("isGziped", dmpDevelopTaskHistoryRequest.getIsGziped());
}
//任务数据状态
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getTaskDataStatus())) {
param.put("taskDataStatus", dmpDevelopTaskHistoryRequest.getTaskDataStatus());
}
//任务创建用户ID
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getTaskCreateUserId())) {
param.put("taskCreateUserId", dmpDevelopTaskHistoryRequest.getTaskCreateUserId());
}
//任务创建时间起
if (dmpDevelopTaskHistoryRequest.getTaskCreateTimeStart() != null) {
param.put("taskCreateTimeStart", dmpDevelopTaskHistoryRequest.getTaskCreateTimeStart());
}
//任务创建时间止
if (dmpDevelopTaskHistoryRequest.getTaskCreateTimeEnd() != null) {
param.put("taskCreateTimeEnd", dmpDevelopTaskHistoryRequest.getTaskCreateTimeEnd());
}
//任务修改用户ID
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getTaskUpdateUserId())) {
param.put("taskUpdateUserId", dmpDevelopTaskHistoryRequest.getTaskUpdateUserId());
}
//任务修改时间起
if (dmpDevelopTaskHistoryRequest.getTaskUpdateTimeStart() != null) {
param.put("taskUpdateTimeStart", dmpDevelopTaskHistoryRequest.getTaskUpdateTimeStart());
}
//任务修改时间止
if (dmpDevelopTaskHistoryRequest.getTaskUpdateTimeEnd() != null) {
param.put("taskUpdateTimeEnd", dmpDevelopTaskHistoryRequest.getTaskUpdateTimeEnd());
}
//备注
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getRemark())) {
param.put("remark", dmpDevelopTaskHistoryRequest.getRemark());
}
//数据状态(0:删除,1,未删除)
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getDataStatus())) {
param.put("dataStatus", dmpDevelopTaskHistoryRequest.getDataStatus());
}
//创建用户ID
if (dmpDevelopTaskHistoryRequest.getCreateUserId() != null) {
param.put("createUserId", dmpDevelopTaskHistoryRequest.getCreateUserId());
}
//创建时间起
if (dmpDevelopTaskHistoryRequest.getCreateTimeStart() != null) {
param.put("createTimeStart", dmpDevelopTaskHistoryRequest.getCreateTimeStart());
}
//创建时间止
if (dmpDevelopTaskHistoryRequest.getCreateTimeEnd() != null) {
param.put("createTimeEnd", dmpDevelopTaskHistoryRequest.getCreateTimeEnd());
}
//修改用户ID
if (dmpDevelopTaskHistoryRequest.getUpdateUserId() != null) {
param.put("updateUserId", dmpDevelopTaskHistoryRequest.getUpdateUserId());
}
//修改时间起
if (dmpDevelopTaskHistoryRequest.getUpdateTimeStart() != null) {
param.put("updateTimeStart", dmpDevelopTaskHistoryRequest.getUpdateTimeStart());
}
//修改时间止
if (dmpDevelopTaskHistoryRequest.getUpdateTimeEnd() != null) {
param.put("updateTimeEnd", dmpDevelopTaskHistoryRequest.getUpdateTimeEnd());
}
PageHelper.startPage(dmpDevelopTaskHistoryRequest.getPageNum(), dmpDevelopTaskHistoryRequest.getPageSize());
List<DmpDevelopTaskHistoryDto> list = dmpDevelopTaskHistoryMapper.findList(param);
PageInfo<DmpDevelopTaskHistoryDto> pageInfo = new PageInfo<>(list);
pageInfoResponse.setCode(StatuConstant.SUCCESS_CODE);
pageInfoResponse.setMessage("查询成功");
pageInfoResponse.setData(pageInfo);
return pageInfoResponse;
}
/*
* (non-Javadoc)
*
* @see
* com.ycxc.vmts.service.DmpDevelopTaskHistoryService#findList(com.ycxc.vmts.controller.bas.
* bean.DmpDevelopTaskHistoryRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
public BaseBeanResponse<DmpDevelopTaskHistoryDto> findList(DmpDevelopTaskHistoryRequest dmpDevelopTaskHistoryRequest, HttpServletRequest httpRequest)
throws Exception {
BaseBeanResponse<DmpDevelopTaskHistoryDto> baseBeanResponse = new BaseBeanResponse<>();
Map<String, Object> param = new HashMap<>();
//主键
if (dmpDevelopTaskHistoryRequest.getId() != null) {
param.put("id", dmpDevelopTaskHistoryRequest.getId());
}
//所属任务(关联任务主键)
if (dmpDevelopTaskHistoryRequest.getTaskId() != null) {
param.put("taskId", dmpDevelopTaskHistoryRequest.getTaskId());
}
//tree ID
if (dmpDevelopTaskHistoryRequest.getTreeId() != null) {
param.put("treeId", dmpDevelopTaskHistoryRequest.getTreeId());
}
//数据源ID
if (dmpDevelopTaskHistoryRequest.getDatasourceId() != null) {
param.put("datasourceId", dmpDevelopTaskHistoryRequest.getDatasourceId());
}
//任务类型
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getTaskType())) {
param.put("taskType", dmpDevelopTaskHistoryRequest.getTaskType());
}
//类型
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getType())) {
param.put("type", dmpDevelopTaskHistoryRequest.getType());
}
//调度类型
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getScheduleType())) {
param.put("scheduleType", dmpDevelopTaskHistoryRequest.getScheduleType());
}
//是否已提交
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getIsSubmit())) {
param.put("isSubmit", dmpDevelopTaskHistoryRequest.getIsSubmit());
}
//描述
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getTaskDesc())) {
param.put("taskDesc", dmpDevelopTaskHistoryRequest.getTaskDesc());
}
//脚本
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getScript())) {
param.put("script", dmpDevelopTaskHistoryRequest.getScript());
}
//flow_header
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getFlowHeader())) {
param.put("flowHeader", dmpDevelopTaskHistoryRequest.getFlowHeader());
}
//flow_json
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getFlowJson())) {
param.put("flowJson", dmpDevelopTaskHistoryRequest.getFlowJson());
}
//版本
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getVersion())) {
param.put("version", dmpDevelopTaskHistoryRequest.getVersion());
}
//is_gziped
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getIsGziped())) {
param.put("isGziped", dmpDevelopTaskHistoryRequest.getIsGziped());
}
//任务数据状态
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getTaskDataStatus())) {
param.put("taskDataStatus", dmpDevelopTaskHistoryRequest.getTaskDataStatus());
}
//任务创建用户ID
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getTaskCreateUserId())) {
param.put("taskCreateUserId", dmpDevelopTaskHistoryRequest.getTaskCreateUserId());
}
//任务创建时间起
if (dmpDevelopTaskHistoryRequest.getTaskCreateTimeStart() != null) {
param.put("taskCreateTimeStart", dmpDevelopTaskHistoryRequest.getTaskCreateTimeStart());
}
//任务创建时间止
if (dmpDevelopTaskHistoryRequest.getTaskCreateTimeEnd() != null) {
param.put("taskCreateTimeEnd", dmpDevelopTaskHistoryRequest.getTaskCreateTimeEnd());
}
//任务修改用户ID
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getTaskUpdateUserId())) {
param.put("taskUpdateUserId", dmpDevelopTaskHistoryRequest.getTaskUpdateUserId());
}
//任务修改时间起
if (dmpDevelopTaskHistoryRequest.getTaskUpdateTimeStart() != null) {
param.put("taskUpdateTimeStart", dmpDevelopTaskHistoryRequest.getTaskUpdateTimeStart());
}
//任务修改时间止
if (dmpDevelopTaskHistoryRequest.getTaskUpdateTimeEnd() != null) {
param.put("taskUpdateTimeEnd", dmpDevelopTaskHistoryRequest.getTaskUpdateTimeEnd());
}
//备注
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getRemark())) {
param.put("remark", dmpDevelopTaskHistoryRequest.getRemark());
}
//数据状态(0:删除,1,未删除)
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getDataStatus())) {
param.put("dataStatus", dmpDevelopTaskHistoryRequest.getDataStatus());
}
//创建用户ID
if (dmpDevelopTaskHistoryRequest.getCreateUserId() != null) {
param.put("createUserId", dmpDevelopTaskHistoryRequest.getCreateUserId());
}
//创建时间起
if (dmpDevelopTaskHistoryRequest.getCreateTimeStart() != null) {
param.put("createTimeStart", dmpDevelopTaskHistoryRequest.getCreateTimeStart());
}
//创建时间止
if (dmpDevelopTaskHistoryRequest.getCreateTimeEnd() != null) {
param.put("createTimeEnd", dmpDevelopTaskHistoryRequest.getCreateTimeEnd());
}
//修改用户ID
if (dmpDevelopTaskHistoryRequest.getUpdateUserId() != null) {
param.put("updateUserId", dmpDevelopTaskHistoryRequest.getUpdateUserId());
}
//修改时间起
if (dmpDevelopTaskHistoryRequest.getUpdateTimeStart() != null) {
param.put("updateTimeStart", dmpDevelopTaskHistoryRequest.getUpdateTimeStart());
}
//修改时间止
if (dmpDevelopTaskHistoryRequest.getUpdateTimeEnd() != null) {
param.put("updateTimeEnd", dmpDevelopTaskHistoryRequest.getUpdateTimeEnd());
}
List<DmpDevelopTaskHistoryDto> list = dmpDevelopTaskHistoryMapper.findList(param);
baseBeanResponse.setCode(StatuConstant.SUCCESS_CODE);
baseBeanResponse.setMessage("查询成功");
baseBeanResponse.setDatas(list);
return baseBeanResponse;
}
/*
* (non-Javadoc)
*
* @see
* com.ycxc.vmts.service.DmpDevelopTaskHistoryService#add(com.ycxc.vmts.entity.DmpDevelopTaskHistory,
* javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional(rollbackFor = Exception.class)
public BaseBeanResponse<DmpDevelopTaskHistory> add(DmpDevelopTaskHistory dmpDevelopTaskHistory, HttpServletRequest httpRequest) throws Exception {
BaseBeanResponse<DmpDevelopTaskHistory> baseBeanResponse = new BaseBeanResponse<>();
// 创建人
dmpDevelopTaskHistory.setCreateUserId(getHttpRequestUserId(httpRequest));
// 创建时间
dmpDevelopTaskHistory.setCreateTime(new Date());
dmpDevelopTaskHistoryMapper.insertSelective(dmpDevelopTaskHistory);
baseBeanResponse.setCode(StatuConstant.SUCCESS_CODE);
baseBeanResponse.setMessage("新增成功");
baseBeanResponse.setData(dmpDevelopTaskHistory);
return baseBeanResponse;
}
/*
* (non-Javadoc)
*
* @see
* com.ycxc.vmts.service.DmpDevelopTaskHistoryService#edit(com.ycxc.vmts.entity.DmpDevelopTaskHistory,
* javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional(rollbackFor = Exception.class)
public BaseBeanResponse<DmpDevelopTaskHistory> edit(DmpDevelopTaskHistory dmpDevelopTaskHistory, HttpServletRequest httpRequest) throws Exception {
BaseBeanResponse<DmpDevelopTaskHistory> baseBeanResponse = new BaseBeanResponse<>();
// 修改人
dmpDevelopTaskHistory.setUpdateUserId(getHttpRequestUserId(httpRequest));
// 修改时间
dmpDevelopTaskHistory.setUpdateTime(new Date());
dmpDevelopTaskHistoryMapper.updateByPrimaryKeySelective(dmpDevelopTaskHistory);
baseBeanResponse.setCode(StatuConstant.SUCCESS_CODE);
baseBeanResponse.setMessage("修改成功");
baseBeanResponse.setData(dmpDevelopTaskHistory);
return baseBeanResponse;
}
/*
* (non-Javadoc)
*
* @see
* com.ycxc.vmts.service.DmpDevelopTaskHistoryService#findById(com.ycxc.vmts.controller.bas.
* bean.DmpDevelopTaskHistoryRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
public BaseBeanResponse<DmpDevelopTaskHistoryDto> findById(Integer id, HttpServletRequest httpRequest)
throws Exception {
BaseBeanResponse<DmpDevelopTaskHistoryDto> baseBeanResponse = new BaseBeanResponse<>();
DmpDevelopTaskHistoryDto dmpDevelopTaskHistoryDto = dmpDevelopTaskHistoryMapper.findById(id);
baseBeanResponse.setCode(StatuConstant.SUCCESS_CODE);
baseBeanResponse.setMessage("查询成功");
baseBeanResponse.setData(dmpDevelopTaskHistoryDto);
return baseBeanResponse;
}
/*
* (non-Javadoc)
*
* @see
* com.ycxc.vmts.service.DmpDevelopTaskHistoryService#deleteById(com.ycxc.vmts.controller.bas.
* bean.DmpDevelopTaskHistoryRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional(rollbackFor = Exception.class)
public BaseResponse deleteById(Integer id, HttpServletRequest httpRequest) throws Exception {
BaseResponse baseResponse = new BaseResponse();
dmpDevelopTaskHistoryMapper.deleteByPrimaryKey(id);
baseResponse.setCode(StatuConstant.SUCCESS_CODE);
baseResponse.setMessage("删除成功");
return baseResponse;
}
/*
* (non-Javadoc)
*
* @see
* com.ycxc.vmts.service.DmpDevelopTaskHistoryService#deleteById(com.ycxc.vmts.controller.bas.
* bean.DmpDevelopTaskHistoryRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional(rollbackFor = Exception.class)
public BaseResponse softDeleteById(Integer id, HttpServletRequest httpRequest) throws Exception {
BaseResponse baseResponse = new BaseResponse();
dmpDevelopTaskHistoryMapper.softDeleteByPrimaryKey(id);
baseResponse.setCode(StatuConstant.SUCCESS_CODE);
baseResponse.setMessage("软删除成功");
return baseResponse;
}
/*
* (non-Javadoc)
*
* @see
* com.ycxc.vmts.service.DmpDevelopTaskHistoryService#deleteById(com.ycxc.vmts.controller.bas.
* bean.DmpDevelopTaskHistoryRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional(rollbackFor = Exception.class)
public BaseResponse delete(DmpDevelopTaskHistoryRequest dmpDevelopTaskHistoryRequest, HttpServletRequest httpRequest) throws Exception {
BaseResponse baseResponse = new BaseResponse();
Map<String, Object> param = new HashMap<>();
//主键
if (dmpDevelopTaskHistoryRequest.getId() != null) {
param.put("id", dmpDevelopTaskHistoryRequest.getId());
}
//所属任务(关联任务主键)
if (dmpDevelopTaskHistoryRequest.getTaskId() != null) {
param.put("taskId", dmpDevelopTaskHistoryRequest.getTaskId());
}
//tree ID
if (dmpDevelopTaskHistoryRequest.getTreeId() != null) {
param.put("treeId", dmpDevelopTaskHistoryRequest.getTreeId());
}
//数据源ID
if (dmpDevelopTaskHistoryRequest.getDatasourceId() != null) {
param.put("datasourceId", dmpDevelopTaskHistoryRequest.getDatasourceId());
}
//任务类型
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getTaskType())) {
param.put("taskType", dmpDevelopTaskHistoryRequest.getTaskType());
}
//类型
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getType())) {
param.put("type", dmpDevelopTaskHistoryRequest.getType());
}
//调度类型
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getScheduleType())) {
param.put("scheduleType", dmpDevelopTaskHistoryRequest.getScheduleType());
}
//是否已提交
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getIsSubmit())) {
param.put("isSubmit", dmpDevelopTaskHistoryRequest.getIsSubmit());
}
//描述
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getTaskDesc())) {
param.put("taskDesc", dmpDevelopTaskHistoryRequest.getTaskDesc());
}
//脚本
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getScript())) {
param.put("script", dmpDevelopTaskHistoryRequest.getScript());
}
//flow_header
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getFlowHeader())) {
param.put("flowHeader", dmpDevelopTaskHistoryRequest.getFlowHeader());
}
//flow_json
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getFlowJson())) {
param.put("flowJson", dmpDevelopTaskHistoryRequest.getFlowJson());
}
//版本
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getVersion())) {
param.put("version", dmpDevelopTaskHistoryRequest.getVersion());
}
//is_gziped
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getIsGziped())) {
param.put("isGziped", dmpDevelopTaskHistoryRequest.getIsGziped());
}
//任务数据状态
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getTaskDataStatus())) {
param.put("taskDataStatus", dmpDevelopTaskHistoryRequest.getTaskDataStatus());
}
//任务创建用户ID
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getTaskCreateUserId())) {
param.put("taskCreateUserId", dmpDevelopTaskHistoryRequest.getTaskCreateUserId());
}
//任务创建时间起
if (dmpDevelopTaskHistoryRequest.getTaskCreateTimeStart() != null) {
param.put("taskCreateTimeStart", dmpDevelopTaskHistoryRequest.getTaskCreateTimeStart());
}
//任务创建时间止
if (dmpDevelopTaskHistoryRequest.getTaskCreateTimeEnd() != null) {
param.put("taskCreateTimeEnd", dmpDevelopTaskHistoryRequest.getTaskCreateTimeEnd());
}
//任务修改用户ID
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getTaskUpdateUserId())) {
param.put("taskUpdateUserId", dmpDevelopTaskHistoryRequest.getTaskUpdateUserId());
}
//任务修改时间起
if (dmpDevelopTaskHistoryRequest.getTaskUpdateTimeStart() != null) {
param.put("taskUpdateTimeStart", dmpDevelopTaskHistoryRequest.getTaskUpdateTimeStart());
}
//任务修改时间止
if (dmpDevelopTaskHistoryRequest.getTaskUpdateTimeEnd() != null) {
param.put("taskUpdateTimeEnd", dmpDevelopTaskHistoryRequest.getTaskUpdateTimeEnd());
}
//备注
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getRemark())) {
param.put("remark", dmpDevelopTaskHistoryRequest.getRemark());
}
//数据状态(0:删除,1,未删除)
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getDataStatus())) {
param.put("dataStatus", dmpDevelopTaskHistoryRequest.getDataStatus());
}
//创建用户ID
if (dmpDevelopTaskHistoryRequest.getCreateUserId() != null) {
param.put("createUserId", dmpDevelopTaskHistoryRequest.getCreateUserId());
}
//创建时间起
if (dmpDevelopTaskHistoryRequest.getCreateTimeStart() != null) {
param.put("createTimeStart", dmpDevelopTaskHistoryRequest.getCreateTimeStart());
}
//创建时间止
if (dmpDevelopTaskHistoryRequest.getCreateTimeEnd() != null) {
param.put("createTimeEnd", dmpDevelopTaskHistoryRequest.getCreateTimeEnd());
}
//修改用户ID
if (dmpDevelopTaskHistoryRequest.getUpdateUserId() != null) {
param.put("updateUserId", dmpDevelopTaskHistoryRequest.getUpdateUserId());
}
//修改时间起
if (dmpDevelopTaskHistoryRequest.getUpdateTimeStart() != null) {
param.put("updateTimeStart", dmpDevelopTaskHistoryRequest.getUpdateTimeStart());
}
//修改时间止
if (dmpDevelopTaskHistoryRequest.getUpdateTimeEnd() != null) {
param.put("updateTimeEnd", dmpDevelopTaskHistoryRequest.getUpdateTimeEnd());
}
dmpDevelopTaskHistoryMapper.delete(param);
baseResponse.setCode(StatuConstant.SUCCESS_CODE);
baseResponse.setMessage("删除成功");
return baseResponse;
}
/*
* (non-Javadoc)
*
* @see
* com.ycxc.vmts.service.DmpDevelopTaskHistoryService#deleteById(com.ycxc.vmts.controller.bas.
* bean.DmpDevelopTaskHistoryRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional(rollbackFor = Exception.class)
public BaseResponse softDelete(DmpDevelopTaskHistoryRequest dmpDevelopTaskHistoryRequest, HttpServletRequest httpRequest) throws Exception {
BaseResponse baseResponse = new BaseResponse();
Map<String, Object> param = new HashMap<>();
//主键
if (dmpDevelopTaskHistoryRequest.getId() != null) {
param.put("id", dmpDevelopTaskHistoryRequest.getId());
}
//所属任务(关联任务主键)
if (dmpDevelopTaskHistoryRequest.getTaskId() != null) {
param.put("taskId", dmpDevelopTaskHistoryRequest.getTaskId());
}
//tree ID
if (dmpDevelopTaskHistoryRequest.getTreeId() != null) {
param.put("treeId", dmpDevelopTaskHistoryRequest.getTreeId());
}
//数据源ID
if (dmpDevelopTaskHistoryRequest.getDatasourceId() != null) {
param.put("datasourceId", dmpDevelopTaskHistoryRequest.getDatasourceId());
}
//任务类型
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getTaskType())) {
param.put("taskType", dmpDevelopTaskHistoryRequest.getTaskType());
}
//类型
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getType())) {
param.put("type", dmpDevelopTaskHistoryRequest.getType());
}
//调度类型
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getScheduleType())) {
param.put("scheduleType", dmpDevelopTaskHistoryRequest.getScheduleType());
}
//是否已提交
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getIsSubmit())) {
param.put("isSubmit", dmpDevelopTaskHistoryRequest.getIsSubmit());
}
//描述
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getTaskDesc())) {
param.put("taskDesc", dmpDevelopTaskHistoryRequest.getTaskDesc());
}
//脚本
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getScript())) {
param.put("script", dmpDevelopTaskHistoryRequest.getScript());
}
//flow_header
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getFlowHeader())) {
param.put("flowHeader", dmpDevelopTaskHistoryRequest.getFlowHeader());
}
//flow_json
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getFlowJson())) {
param.put("flowJson", dmpDevelopTaskHistoryRequest.getFlowJson());
}
//版本
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getVersion())) {
param.put("version", dmpDevelopTaskHistoryRequest.getVersion());
}
//is_gziped
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getIsGziped())) {
param.put("isGziped", dmpDevelopTaskHistoryRequest.getIsGziped());
}
//任务数据状态
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getTaskDataStatus())) {
param.put("taskDataStatus", dmpDevelopTaskHistoryRequest.getTaskDataStatus());
}
//任务创建用户ID
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getTaskCreateUserId())) {
param.put("taskCreateUserId", dmpDevelopTaskHistoryRequest.getTaskCreateUserId());
}
//任务创建时间起
if (dmpDevelopTaskHistoryRequest.getTaskCreateTimeStart() != null) {
param.put("taskCreateTimeStart", dmpDevelopTaskHistoryRequest.getTaskCreateTimeStart());
}
//任务创建时间止
if (dmpDevelopTaskHistoryRequest.getTaskCreateTimeEnd() != null) {
param.put("taskCreateTimeEnd", dmpDevelopTaskHistoryRequest.getTaskCreateTimeEnd());
}
//任务修改用户ID
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getTaskUpdateUserId())) {
param.put("taskUpdateUserId", dmpDevelopTaskHistoryRequest.getTaskUpdateUserId());
}
//任务修改时间起
if (dmpDevelopTaskHistoryRequest.getTaskUpdateTimeStart() != null) {
param.put("taskUpdateTimeStart", dmpDevelopTaskHistoryRequest.getTaskUpdateTimeStart());
}
//任务修改时间止
if (dmpDevelopTaskHistoryRequest.getTaskUpdateTimeEnd() != null) {
param.put("taskUpdateTimeEnd", dmpDevelopTaskHistoryRequest.getTaskUpdateTimeEnd());
}
//备注
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getRemark())) {
param.put("remark", dmpDevelopTaskHistoryRequest.getRemark());
}
//数据状态(0:删除,1,未删除)
if (!StringUtils.isEmpty(dmpDevelopTaskHistoryRequest.getDataStatus())) {
param.put("dataStatus", dmpDevelopTaskHistoryRequest.getDataStatus());
}
//创建用户ID
if (dmpDevelopTaskHistoryRequest.getCreateUserId() != null) {
param.put("createUserId", dmpDevelopTaskHistoryRequest.getCreateUserId());
}
//创建时间起
if (dmpDevelopTaskHistoryRequest.getCreateTimeStart() != null) {
param.put("createTimeStart", dmpDevelopTaskHistoryRequest.getCreateTimeStart());
}
//创建时间止
if (dmpDevelopTaskHistoryRequest.getCreateTimeEnd() != null) {
param.put("createTimeEnd", dmpDevelopTaskHistoryRequest.getCreateTimeEnd());
}
//修改用户ID
if (dmpDevelopTaskHistoryRequest.getUpdateUserId() != null) {
param.put("updateUserId", dmpDevelopTaskHistoryRequest.getUpdateUserId());
}
//修改时间起
if (dmpDevelopTaskHistoryRequest.getUpdateTimeStart() != null) {
param.put("updateTimeStart", dmpDevelopTaskHistoryRequest.getUpdateTimeStart());
}
//修改时间止
if (dmpDevelopTaskHistoryRequest.getUpdateTimeEnd() != null) {
param.put("updateTimeEnd", dmpDevelopTaskHistoryRequest.getUpdateTimeEnd());
}
dmpDevelopTaskHistoryMapper.softDelete(param);
baseResponse.setCode(StatuConstant.SUCCESS_CODE);
baseResponse.setMessage("软删除成功");
return baseResponse;
}
/**
*批量删除
*/
@Override
@Transactional(rollbackFor=Exception.class)
public BaseResponse deleteByIds(List<Integer> idList, HttpServletRequest httpRequest) throws Exception {
BaseResponse baseResponse = new BaseResponse();
dmpDevelopTaskHistoryMapper.deleteByIds(idList);
baseResponse.setCode(StatuConstant.SUCCESS_CODE);
baseResponse.setMessage("删除成功");
return baseResponse;
}
/**
*批量软删除
*/
@Override
@Transactional(rollbackFor=Exception.class)
public BaseResponse softDeleteByIds(List<Integer> idList, HttpServletRequest httpRequest) throws Exception {
BaseResponse baseResponse = new BaseResponse();
dmpDevelopTaskHistoryMapper.softDeleteByIds(idList);
baseResponse.setCode(StatuConstant.SUCCESS_CODE);
baseResponse.setMessage("软删除成功");
return baseResponse;
}
/**
*任务版本回滚
*/
@Override
public BaseResponse taskVersionRollback(Integer id, HttpServletRequest httpRequest)
throws Exception {
//修改task表中任务信息
//重新发布到azkaban
return null;
}
}
package com.jz.dmp.modules.service.impl; package com.jz.dmp.modules.service.impl;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
import javax.servlet.http.HttpServletRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.jz.agent.service.DmpDsAgentService; import com.jz.agent.service.DmpDsAgentService;
import com.jz.common.constant.JsonResult; import com.jz.common.constant.JsonResult;
import com.jz.common.constant.ResultCode; import com.jz.common.constant.ResultCode;
import com.jz.common.constant.StatuConstant;
import com.jz.common.page.PageInfoResponse; import com.jz.common.page.PageInfoResponse;
import com.jz.common.utils.DateUtils; import com.jz.common.utils.DateUtils;
import com.jz.common.utils.JsonMapper; import com.jz.common.utils.JsonMapper;
...@@ -14,12 +29,19 @@ import com.jz.dmp.agent.DmpAgentResult; ...@@ -14,12 +29,19 @@ import com.jz.dmp.agent.DmpAgentResult;
import com.jz.dmp.azkaban.dao.ExecutionFlowsMapper; import com.jz.dmp.azkaban.dao.ExecutionFlowsMapper;
import com.jz.dmp.modules.controller.dataOperation.bean.DataDevExamplesListDto; import com.jz.dmp.modules.controller.dataOperation.bean.DataDevExamplesListDto;
import com.jz.dmp.modules.controller.dataOperation.bean.DataDevExamplesListReq; import com.jz.dmp.modules.controller.dataOperation.bean.DataDevExamplesListReq;
import com.jz.dmp.modules.controller.bean.DmpDevelopTaskDto;
import com.jz.dmp.modules.controller.bean.DmpDevelopTaskRequest;
import com.jz.dmp.modules.controller.bean.MyDmpDevelopTaskConverter;
import com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListDto; import com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListDto;
import com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListReq; import com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListReq;
import com.jz.dmp.modules.dao.DmpDevelopTaskDao; import com.jz.dmp.modules.dao.DmpDevelopTaskDao;
import com.jz.dmp.modules.dao.DmpProjectDao; import com.jz.dmp.modules.dao.DmpProjectDao;
import com.jz.dmp.modules.dao.DmpSyncingDatasourceTypeDao; import com.jz.dmp.modules.dao.DmpSyncingDatasourceTypeDao;
import com.jz.dmp.modules.model.*; import com.jz.dmp.modules.model.DmpAgentDatasourceInfo;
import com.jz.dmp.modules.model.DmpDevelopTask;
import com.jz.dmp.modules.model.DmpProjectSystemInfo;
import com.jz.dmp.modules.model.DmpSyncingDatasource;
import com.jz.dmp.modules.model.DmpSyncingDatasourceType;
import com.jz.dmp.modules.service.DmpDevelopTaskService; import com.jz.dmp.modules.service.DmpDevelopTaskService;
import com.jz.dmp.modules.service.DmpSyncingDatasourceService; import com.jz.dmp.modules.service.DmpSyncingDatasourceService;
import com.jz.dmp.modules.service.OfflineSynchService; import com.jz.dmp.modules.service.OfflineSynchService;
...@@ -759,6 +781,157 @@ public class DmpDevelopTaskServiceImpl implements DmpDevelopTaskService { ...@@ -759,6 +781,157 @@ public class DmpDevelopTaskServiceImpl implements DmpDevelopTaskService {
return pageInfoResponse; return pageInfoResponse;
} }
/*
* (non-Javadoc)
*
* @see
* com.ycxc.vmts.service.DmpDevelopTaskService#findList(com.ycxc.vmts.controller.bas.
* bean.DmpDevelopTaskRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
public com.jz.common.bean.PageInfoResponse<DmpDevelopTaskDto> findListWithPage(DmpDevelopTaskRequest dmpDevelopTaskRequest, HttpServletRequest httpRequest)
throws Exception {
com.jz.common.bean.PageInfoResponse<DmpDevelopTaskDto> pageInfoResponse = new com.jz.common.bean.PageInfoResponse<>();
Map<String, Object> param = new HashMap<>();
//ID
if (dmpDevelopTaskRequest.getId() != null) {
param.put("id", dmpDevelopTaskRequest.getId());
}
//tree ID
if (dmpDevelopTaskRequest.getTreeId() != null) {
param.put("treeId", dmpDevelopTaskRequest.getTreeId());
}
//数据源ID
if (dmpDevelopTaskRequest.getDatasourceId() != null) {
param.put("datasourceId", dmpDevelopTaskRequest.getDatasourceId());
}
//任务类型
if (!StringUtils.isEmpty(dmpDevelopTaskRequest.getTaskType())) {
param.put("taskType", dmpDevelopTaskRequest.getTaskType());
}
//类型
if (!StringUtils.isEmpty(dmpDevelopTaskRequest.getType())) {
param.put("type", dmpDevelopTaskRequest.getType());
}
//调度类型
if (!StringUtils.isEmpty(dmpDevelopTaskRequest.getScheduleType())) {
param.put("scheduleType", dmpDevelopTaskRequest.getScheduleType());
}
//是否已提交
if (!StringUtils.isEmpty(dmpDevelopTaskRequest.getIsSubmit())) {
param.put("isSubmit", dmpDevelopTaskRequest.getIsSubmit());
}
//描述
if (!StringUtils.isEmpty(dmpDevelopTaskRequest.getTaskDesc())) {
param.put("taskDesc", dmpDevelopTaskRequest.getTaskDesc());
}
//脚本
if (!StringUtils.isEmpty(dmpDevelopTaskRequest.getScript())) {
param.put("script", dmpDevelopTaskRequest.getScript());
}
//数据状态
if (!StringUtils.isEmpty(dmpDevelopTaskRequest.getDataStatus())) {
param.put("dataStatus", dmpDevelopTaskRequest.getDataStatus());
}
//创建用户ID
if (!StringUtils.isEmpty(dmpDevelopTaskRequest.getCreateUserId())) {
param.put("createUserId", dmpDevelopTaskRequest.getCreateUserId());
}
//数据创建时间起
if (dmpDevelopTaskRequest.getCreateTimeStart() != null) {
param.put("createTimeStart", dmpDevelopTaskRequest.getCreateTimeStart());
}
//数据创建时间止
if (dmpDevelopTaskRequest.getCreateTimeEnd() != null) {
param.put("createTimeEnd", dmpDevelopTaskRequest.getCreateTimeEnd());
}
//创建用户ID
if (!StringUtils.isEmpty(dmpDevelopTaskRequest.getUpdateUserId())) {
param.put("updateUserId", dmpDevelopTaskRequest.getUpdateUserId());
}
//数据更新时间起
if (dmpDevelopTaskRequest.getUpdateTimeStart() != null) {
param.put("updateTimeStart", dmpDevelopTaskRequest.getUpdateTimeStart());
}
//数据更新时间止
if (dmpDevelopTaskRequest.getUpdateTimeEnd() != null) {
param.put("updateTimeEnd", dmpDevelopTaskRequest.getUpdateTimeEnd());
}
//校验状态:SUCCEED 成功, FAIL 失败
if (!StringUtils.isEmpty(dmpDevelopTaskRequest.getChkResult())) {
param.put("chkResult", dmpDevelopTaskRequest.getChkResult());
}
//同步状态:SUCCEED 成功,FAIL 失败
if (!StringUtils.isEmpty(dmpDevelopTaskRequest.getSyncResult())) {
param.put("syncResult", dmpDevelopTaskRequest.getSyncResult());
}
//最终校验时间起
if (dmpDevelopTaskRequest.getChkTimeStart() != null) {
param.put("chkTimeStart", dmpDevelopTaskRequest.getChkTimeStart());
}
//最终校验时间止
if (dmpDevelopTaskRequest.getChkTimeEnd() != null) {
param.put("chkTimeEnd", dmpDevelopTaskRequest.getChkTimeEnd());
}
//最终同步时间起
if (dmpDevelopTaskRequest.getSyncTimeStart() != null) {
param.put("syncTimeStart", dmpDevelopTaskRequest.getSyncTimeStart());
}
//最终同步时间止
if (dmpDevelopTaskRequest.getSyncTimeEnd() != null) {
param.put("syncTimeEnd", dmpDevelopTaskRequest.getSyncTimeEnd());
}
//
if (!StringUtils.isEmpty(dmpDevelopTaskRequest.getFlowHeader())) {
param.put("flowHeader", dmpDevelopTaskRequest.getFlowHeader());
}
//
if (!StringUtils.isEmpty(dmpDevelopTaskRequest.getFlowJson())) {
param.put("flowJson", dmpDevelopTaskRequest.getFlowJson());
}
//
if (!StringUtils.isEmpty(dmpDevelopTaskRequest.getVersion())) {
param.put("version", dmpDevelopTaskRequest.getVersion());
}
//
if (dmpDevelopTaskRequest.getIsGziped() != null) {
param.put("isGziped", dmpDevelopTaskRequest.getIsGziped());
}
//源数据库ID
if (!StringUtils.isEmpty(dmpDevelopTaskRequest.getSourceDbId())) {
param.put("sourceDbId", dmpDevelopTaskRequest.getSourceDbId());
}
//源数据库名称
if (!StringUtils.isEmpty(dmpDevelopTaskRequest.getSourceDbName())) {
param.put("sourceDbName", dmpDevelopTaskRequest.getSourceDbName());
}
//源数据表名称
if (!StringUtils.isEmpty(dmpDevelopTaskRequest.getSourceTableName())) {
param.put("sourceTableName", dmpDevelopTaskRequest.getSourceTableName());
}
//目标数据库名称
if (!StringUtils.isEmpty(dmpDevelopTaskRequest.getTargetDbName())) {
param.put("targetDbName", dmpDevelopTaskRequest.getTargetDbName());
}
//目标数据表名称
if (!StringUtils.isEmpty(dmpDevelopTaskRequest.getTargetTableName())) {
param.put("targetTableName", dmpDevelopTaskRequest.getTargetTableName());
}
PageHelper.startPage(dmpDevelopTaskRequest.getPageNum(), dmpDevelopTaskRequest.getPageSize());
List<DmpDevelopTask> list = dmpDevelopTaskDao.findList(param);
List<DmpDevelopTaskDto> dtos = MyDmpDevelopTaskConverter.INSTANCE().domain2dto(list);
PageInfo<DmpDevelopTaskDto> pageInfo = new PageInfo<>(dtos);
pageInfoResponse.setCode(StatuConstant.SUCCESS_CODE);
pageInfoResponse.setMessage("查询成功");
pageInfoResponse.setData(pageInfo);
return pageInfoResponse;
}
/** /**
* 数据运维-执行任务 * 数据运维-执行任务
* *
......
package com.jz.dmp.modules.service.impl; package com.jz.dmp.modules.service.impl;
import com.jz.dmp.modules.dao.DmpNavigationTreeDao; import java.util.Date;
import com.jz.dmp.modules.model.DmpNavigationTree; import java.util.List;
import com.jz.dmp.modules.service.DmpNavigationTreeService;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import javax.annotation.Resource; import com.jz.common.bean.BaseBeanResponse;
import java.util.List; import com.jz.common.constant.StatuConstant;
import com.jz.common.persistence.BaseService;
import com.jz.dmp.modules.controller.bean.DmpNavigationTreeDto;
import com.jz.dmp.modules.controller.bean.DmpNavigationTreeRequest;
import com.jz.dmp.modules.controller.bean.MyDmpNavigationTreeConverter;
import com.jz.dmp.modules.dao.DmpNavigationTreeDao;
import com.jz.dmp.modules.model.DmpNavigationTree;
import com.jz.dmp.modules.service.DmpNavigationTreeService;
/** /**
* DMP资源导航树(DmpNavigationTree)表服务实现类 * DMP资源导航树(DmpNavigationTree)表服务实现类
...@@ -16,7 +26,7 @@ import java.util.List; ...@@ -16,7 +26,7 @@ import java.util.List;
* @since 2020-12-29 15:08:16 * @since 2020-12-29 15:08:16
*/ */
@Service("dmpNavigationTreeService") @Service("dmpNavigationTreeService")
public class DmpNavigationTreeServiceImpl implements DmpNavigationTreeService { public class DmpNavigationTreeServiceImpl extends BaseService implements DmpNavigationTreeService {
@Autowired @Autowired
private DmpNavigationTreeDao dmpNavigationTreeDao; private DmpNavigationTreeDao dmpNavigationTreeDao;
...@@ -49,9 +59,14 @@ public class DmpNavigationTreeServiceImpl implements DmpNavigationTreeService { ...@@ -49,9 +59,14 @@ public class DmpNavigationTreeServiceImpl implements DmpNavigationTreeService {
* *
* @param dmpNavigationTree 实例对象 * @param dmpNavigationTree 实例对象
* @return 实例对象 * @return 实例对象
* @throws Exception
*/ */
@Override @Override
public DmpNavigationTree insert(DmpNavigationTree dmpNavigationTree) { public DmpNavigationTree insert(DmpNavigationTree dmpNavigationTree) throws Exception {
// 创建人
dmpNavigationTree.setCreateUserId(getHttpRequestUserId(null).toString());
// 创建时间
dmpNavigationTree.setCreateTime(new Date());
this.dmpNavigationTreeDao.insert(dmpNavigationTree); this.dmpNavigationTreeDao.insert(dmpNavigationTree);
return dmpNavigationTree; return dmpNavigationTree;
} }
...@@ -78,4 +93,76 @@ public class DmpNavigationTreeServiceImpl implements DmpNavigationTreeService { ...@@ -78,4 +93,76 @@ public class DmpNavigationTreeServiceImpl implements DmpNavigationTreeService {
public boolean deleteById(Integer id) { public boolean deleteById(Integer id) {
return this.dmpNavigationTreeDao.deleteById(id) > 0; return this.dmpNavigationTreeDao.deleteById(id) > 0;
} }
/*
* (non-Javadoc)
*
* @see
* com.ycxc.vmts.service.DmpNavigationTreeService#findList(com.ycxc.vmts.controller.bas.
* bean.DmpNavigationTreeRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
public BaseBeanResponse<DmpNavigationTreeDto> findList(DmpNavigationTreeRequest dmpNavigationTreeRequest, HttpServletRequest httpRequest)
throws Exception {
BaseBeanResponse<DmpNavigationTreeDto> baseBeanResponse = new BaseBeanResponse<>();
DmpNavigationTree dmpNavigationTree = new DmpNavigationTree();
//ID
if (dmpNavigationTreeRequest.getId() != null) {
dmpNavigationTree.setId(dmpNavigationTreeRequest.getId());
}
//项目ID
if (dmpNavigationTreeRequest.getProjectId() != null) {
dmpNavigationTree.setProjectId(dmpNavigationTreeRequest.getProjectId());
}
//树类别
if (!StringUtils.isEmpty(dmpNavigationTreeRequest.getCategory())) {
dmpNavigationTree.setCategory(dmpNavigationTreeRequest.getCategory());
}
//树类型
if (!StringUtils.isEmpty(dmpNavigationTreeRequest.getType())) {
dmpNavigationTree.setType(dmpNavigationTreeRequest.getType());
}
//名称
if (!StringUtils.isEmpty(dmpNavigationTreeRequest.getName())) {
dmpNavigationTree.setName(dmpNavigationTreeRequest.getName());
}
//序号
if (dmpNavigationTreeRequest.getTreeSort() != null) {
dmpNavigationTree.setTreeSort(dmpNavigationTreeRequest.getTreeSort());
}
//是否叶子节点(0:否,1:是)
if (!StringUtils.isEmpty(dmpNavigationTreeRequest.getIsLevel())) {
dmpNavigationTree.setIsLevel(dmpNavigationTreeRequest.getIsLevel());
}
//是否启用(0:否,1:是)
if (!StringUtils.isEmpty(dmpNavigationTreeRequest.getIsEnable())) {
dmpNavigationTree.setIsEnable(dmpNavigationTreeRequest.getIsEnable());
}
//父节点ID
if (dmpNavigationTreeRequest.getParentId() != null) {
dmpNavigationTree.setParentId(dmpNavigationTreeRequest.getParentId());
}
//数据状态
if (!StringUtils.isEmpty(dmpNavigationTreeRequest.getDataStatus())) {
dmpNavigationTree.setDataStatus(dmpNavigationTreeRequest.getDataStatus());
}
//创建用户ID
if (!StringUtils.isEmpty(dmpNavigationTreeRequest.getCreateUserId())) {
dmpNavigationTree.setCreateUserId(dmpNavigationTreeRequest.getCreateUserId());
}
//创建用户ID
if (!StringUtils.isEmpty(dmpNavigationTreeRequest.getUpdateUserId())) {
dmpNavigationTree.setUpdateUserId(dmpNavigationTreeRequest.getUpdateUserId());
}
List<DmpNavigationTree> list = dmpNavigationTreeDao.queryAll(dmpNavigationTree);
List<DmpNavigationTreeDto> dtos = MyDmpNavigationTreeConverter.INSTANCE().domain2dto(list);
baseBeanResponse.setCode(StatuConstant.SUCCESS_CODE);
baseBeanResponse.setMessage("查询成功");
baseBeanResponse.setDatas(dtos);
return baseBeanResponse;
}
} }
\ No newline at end of file
...@@ -101,6 +101,6 @@ public interface DmpPermissionService { ...@@ -101,6 +101,6 @@ public interface DmpPermissionService {
* @throws * @throws
*/ */
public BaseBeanResponse<DmpPermissionDto> findListByParentCode(String parentCode, public BaseBeanResponse<DmpPermissionDto> findListByParentCode(String parentCode,
HttpServletRequest httpRequest)throws Exception; String type, HttpServletRequest httpRequest)throws Exception;
} }
...@@ -467,6 +467,15 @@ public class DmpMemberServiceImpl extends BaseService implements DmpMemberServic ...@@ -467,6 +467,15 @@ public class DmpMemberServiceImpl extends BaseService implements DmpMemberServic
List<DmpPermission> memberProjPermissions = dmpPermissionService.findPermissionByRoles(memberProjectRoles); List<DmpPermission> memberProjPermissions = dmpPermissionService.findPermissionByRoles(memberProjectRoles);
member.setMemberProjectPermissionList(memberProjPermissions); member.setMemberProjectPermissionList(memberProjPermissions);
List<DmpPermission> permissions = new ArrayList<DmpPermission>();
if (!CollectionUtils.isEmpty(memberProjPermissions)) {
permissions.addAll(memberProjPermissions);
}
if (!CollectionUtils.isEmpty(member.getMemberPermissionList())) {
permissions.addAll(member.getMemberPermissionList());
}
member.setPermissionList(permissions);
//修改session上用户信息 //修改session上用户信息
//生成当所有授权 //生成当所有授权
List<GrantedAuthority> grantedAuthorities = new ArrayList<GrantedAuthority>(authentication.getAuthorities()); List<GrantedAuthority> grantedAuthorities = new ArrayList<GrantedAuthority>(authentication.getAuthorities());
......
...@@ -350,7 +350,7 @@ public class DmpPermissionServiceImpl extends BaseService implements DmpPermissi ...@@ -350,7 +350,7 @@ public class DmpPermissionServiceImpl extends BaseService implements DmpPermissi
*/ */
@Override @Override
public BaseBeanResponse<DmpPermissionDto> findListByParentCode(String parentCode, public BaseBeanResponse<DmpPermissionDto> findListByParentCode(String parentCode,
HttpServletRequest httpRequest) throws Exception { String type, HttpServletRequest httpRequest) throws Exception {
BaseBeanResponse<DmpPermissionDto> baseBeanResponse = new BaseBeanResponse<>(); BaseBeanResponse<DmpPermissionDto> baseBeanResponse = new BaseBeanResponse<>();
...@@ -362,7 +362,23 @@ public class DmpPermissionServiceImpl extends BaseService implements DmpPermissi ...@@ -362,7 +362,23 @@ public class DmpPermissionServiceImpl extends BaseService implements DmpPermissi
return baseBeanResponse; return baseBeanResponse;
} }
List<DmpPermission> dmpPermissions = dmpPermissionMapper.findByRoles(currentUser.getMemberProjectRoleList()); List<DmpPermission> dmpPermissions = new ArrayList<DmpPermission>();
if ("0".equals(type)) {
dmpPermissions = dmpPermissionMapper.findByRoles(currentUser.getMemberProjectRoleList());
}else if("1".equals(type)) {
dmpPermissions = dmpPermissionMapper.findByRoles(currentUser.getMemberRoleList());
}else {
List<DmpPermission> list1 = dmpPermissionMapper.findByRoles(currentUser.getMemberProjectRoleList());
List<DmpPermission> list2 = dmpPermissionMapper.findByRoles(currentUser.getMemberRoleList());
List<DmpPermission> permissions = new ArrayList<DmpPermission>();
if (!CollectionUtils.isEmpty(list1)) {
permissions.addAll(list1);
}
if (!CollectionUtils.isEmpty(list2)) {
permissions.addAll(list2);
}
dmpPermissions = permissions;
}
//整理资源为树形结构 //整理资源为树形结构
List<DmpPermission> permissions = permissionArrangeTree(parentCode, dmpPermissions); List<DmpPermission> permissions = permissionArrangeTree(parentCode, dmpPermissions);
......
<?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.modules.dao.DmpDevelopTaskHistoryMapper" >
<resultMap id="BaseResultMap" type="com.jz.dmp.modules.model.DmpDevelopTaskHistory">
<result column="id" property="id" jdbcType="INTEGER" />
<result column="task_id" property="taskId" jdbcType="INTEGER" />
<result column="tree_id" property="treeId" jdbcType="INTEGER" />
<result column="datasource_id" property="datasourceId" jdbcType="INTEGER" />
<result column="task_type" property="taskType" jdbcType="CHAR" />
<result column="type" property="type" jdbcType="CHAR" />
<result column="schedule_type" property="scheduleType" jdbcType="CHAR" />
<result column="is_submit" property="isSubmit" jdbcType="CHAR" />
<result column="task_desc" property="taskDesc" jdbcType="VARCHAR" />
<result column="script" property="script" jdbcType="BLOB"
typeHandler="com.jz.common.persistence.CBTHandler" />
<result column="flow_header" property="flowHeader" jdbcType="VARCHAR" />
<result column="flow_json" property="flowJson" jdbcType="BLOB"
typeHandler="com.jz.common.persistence.CBTHandler" />
<result column="version" property="version" jdbcType="VARCHAR" />
<result column="is_gziped" property="isGziped" jdbcType="VARCHAR" />
<result column="task_data_status" property="taskDataStatus" jdbcType="CHAR" />
<result column="task_create_user_id" property="taskCreateUserId" jdbcType="CHAR" />
<result column="task_create_time" property="taskCreateTime" jdbcType="TIMESTAMP" />
<result column="task_update_user_id" property="taskUpdateUserId" jdbcType="CHAR" />
<result column="task_update_time" property="taskUpdateTime" jdbcType="TIMESTAMP" />
<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.modules.controller.bean.DmpDevelopTaskHistoryDto" extends="BaseResultMap">
<!-- /*$BaseDtoResultMapContent$*/ -->
</resultMap>
<sql id="Base_Column_List">
id, task_id, tree_id, datasource_id, task_type,
type, schedule_type, is_submit, task_desc, script,
flow_header, flow_json, version, is_gziped, task_data_status,
task_create_user_id, task_create_time, task_update_user_id, task_update_time, 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_develop_task_history
where id = #{id,jdbcType=INTEGER}
AND data_status='1'
</select>
<!-- 根据主键删除任务历史版本 -->
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from dmp_develop_task_history
where id = #{id,jdbcType=INTEGER}
</delete>
<!-- 根据主键软删除任务历史版本 -->
<update id="softDeleteByPrimaryKey" parameterType="java.lang.String">
update dmp_develop_task_history
<set>
data_status = '0'
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<!-- 条件删除任务历史版本 -->
<delete id="delete" parameterType="java.lang.String">
delete from dmp_develop_task_history
<where>
<if test="id != null" >
AND id = #{id,jdbcType=INTEGER}
</if>
<if test="taskId != null" >
AND task_id = #{taskId,jdbcType=INTEGER}
</if>
<if test="treeId != null" >
AND tree_id = #{treeId,jdbcType=INTEGER}
</if>
<if test="datasourceId != null" >
AND datasource_id = #{datasourceId,jdbcType=INTEGER}
</if>
<if test="taskType != null" >
AND task_type = #{taskType,jdbcType=CHAR}
</if>
<if test="type != null" >
AND type = #{type,jdbcType=CHAR}
</if>
<if test="scheduleType != null" >
AND schedule_type = #{scheduleType,jdbcType=CHAR}
</if>
<if test="isSubmit != null" >
AND is_submit = #{isSubmit,jdbcType=CHAR}
</if>
<if test="taskDesc != null" >
AND task_desc = #{taskDesc,jdbcType=VARCHAR}
</if>
<if test="script != null" >
AND script = #{script,jdbcType=BLOB, typeHandler=com.jz.common.persistence.CBTHandler}
</if>
<if test="flowHeader != null" >
AND flow_header = #{flowHeader,jdbcType=VARCHAR}
</if>
<if test="flowJson != null" >
AND flow_json = #{flowJson,jdbcType=BLOB, typeHandler=com.jz.common.persistence.CBTHandler}
</if>
<if test="version != null" >
AND version = #{version,jdbcType=VARCHAR}
</if>
<if test="isGziped != null" >
AND is_gziped = #{isGziped,jdbcType=VARCHAR}
</if>
<if test="taskDataStatus != null" >
AND task_data_status = #{taskDataStatus,jdbcType=CHAR}
</if>
<if test="taskCreateUserId != null" >
AND task_create_user_id = #{taskCreateUserId,jdbcType=CHAR}
</if>
<if test="taskCreateTimeStart != null" >
AND task_create_time >= #{taskCreateTimeStart,jdbcType=TIMESTAMP}
</if>
<if test="taskCreateTimeEnd != null" >
AND task_create_time <![CDATA[ <= ]]> #{taskCreateTimeEnd,jdbcType=TIMESTAMP}
</if>
<if test="taskUpdateUserId != null" >
AND task_update_user_id = #{taskUpdateUserId,jdbcType=CHAR}
</if>
<if test="taskUpdateTimeStart != null" >
AND task_update_time >= #{taskUpdateTimeStart,jdbcType=TIMESTAMP}
</if>
<if test="taskUpdateTimeEnd != null" >
AND task_update_time <![CDATA[ <= ]]> #{taskUpdateTimeEnd,jdbcType=TIMESTAMP}
</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_develop_task_history
<set>
data_status = '0'
</set>
<where>
<if test="id != null" >
AND id = #{id,jdbcType=INTEGER}
</if>
<if test="taskId != null" >
AND task_id = #{taskId,jdbcType=INTEGER}
</if>
<if test="treeId != null" >
AND tree_id = #{treeId,jdbcType=INTEGER}
</if>
<if test="datasourceId != null" >
AND datasource_id = #{datasourceId,jdbcType=INTEGER}
</if>
<if test="taskType != null" >
AND task_type = #{taskType,jdbcType=CHAR}
</if>
<if test="type != null" >
AND type = #{type,jdbcType=CHAR}
</if>
<if test="scheduleType != null" >
AND schedule_type = #{scheduleType,jdbcType=CHAR}
</if>
<if test="isSubmit != null" >
AND is_submit = #{isSubmit,jdbcType=CHAR}
</if>
<if test="taskDesc != null" >
AND task_desc = #{taskDesc,jdbcType=VARCHAR}
</if>
<if test="script != null" >
AND script = #{script,jdbcType=BLOB, typeHandler=com.jz.common.persistence.CBTHandler}
</if>
<if test="flowHeader != null" >
AND flow_header = #{flowHeader,jdbcType=VARCHAR}
</if>
<if test="flowJson != null" >
AND flow_json = #{flowJson,jdbcType=BLOB, typeHandler=com.jz.common.persistence.CBTHandler}
</if>
<if test="version != null" >
AND version = #{version,jdbcType=VARCHAR}
</if>
<if test="isGziped != null" >
AND is_gziped = #{isGziped,jdbcType=VARCHAR}
</if>
<if test="taskDataStatus != null" >
AND task_data_status = #{taskDataStatus,jdbcType=CHAR}
</if>
<if test="taskCreateUserId != null" >
AND task_create_user_id = #{taskCreateUserId,jdbcType=CHAR}
</if>
<if test="taskCreateTimeStart != null" >
AND task_create_time >= #{taskCreateTimeStart,jdbcType=TIMESTAMP}
</if>
<if test="taskCreateTimeEnd != null" >
AND task_create_time <![CDATA[ <= ]]> #{taskCreateTimeEnd,jdbcType=TIMESTAMP}
</if>
<if test="taskUpdateUserId != null" >
AND task_update_user_id = #{taskUpdateUserId,jdbcType=CHAR}
</if>
<if test="taskUpdateTimeStart != null" >
AND task_update_time >= #{taskUpdateTimeStart,jdbcType=TIMESTAMP}
</if>
<if test="taskUpdateTimeEnd != null" >
AND task_update_time <![CDATA[ <= ]]> #{taskUpdateTimeEnd,jdbcType=TIMESTAMP}
</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.modules.model.DmpDevelopTaskHistory">
insert into dmp_develop_task_history (
id, task_id, tree_id, datasource_id, task_type,
type, schedule_type, is_submit, task_desc, script,
flow_header, flow_json, version, is_gziped, task_data_status,
task_create_user_id, task_create_time, task_update_user_id, task_update_time, remark,
data_status, create_user_id, create_time, update_user_id, update_time
)
values (
#{id,jdbcType=INTEGER}, #{taskId,jdbcType=INTEGER}, #{treeId,jdbcType=INTEGER}, #{datasourceId,jdbcType=INTEGER}, #{taskType,jdbcType=CHAR},
#{type,jdbcType=CHAR}, #{scheduleType,jdbcType=CHAR}, #{isSubmit,jdbcType=CHAR}, #{taskDesc,jdbcType=VARCHAR}, #{script,jdbcType=BLOB, typeHandler=com.jz.common.persistence.CBTHandler},
#{flowHeader,jdbcType=VARCHAR}, #{flowJson,jdbcType=BLOB, typeHandler=com.jz.common.persistence.CBTHandler}, #{version,jdbcType=VARCHAR}, #{isGziped,jdbcType=VARCHAR}, #{taskDataStatus,jdbcType=CHAR},
#{taskCreateUserId,jdbcType=CHAR}, #{taskCreateTime,jdbcType=TIMESTAMP}, #{taskUpdateUserId,jdbcType=CHAR}, #{taskUpdateTime,jdbcType=TIMESTAMP}, #{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.modules.model.DmpDevelopTaskHistory">
insert into dmp_develop_task_history (
id, task_id, tree_id, datasource_id, task_type,
type, schedule_type, is_submit, task_desc, script,
flow_header, flow_json, version, is_gziped, task_data_status,
task_create_user_id, task_create_time, task_update_user_id, task_update_time, remark,
data_status, create_user_id, create_time, update_user_id, update_time
)
values
<foreach collection="list" item="item" separator=",">
(
#{item.id,jdbcType=INTEGER}, #{item.taskId,jdbcType=INTEGER}, #{item.treeId,jdbcType=INTEGER}, #{item.datasourceId,jdbcType=INTEGER}, #{item.taskType,jdbcType=CHAR},
#{item.type,jdbcType=CHAR}, #{item.scheduleType,jdbcType=CHAR}, #{item.isSubmit,jdbcType=CHAR}, #{item.taskDesc,jdbcType=VARCHAR}, #{item.script,jdbcType=BLOB, typeHandler=com.jz.common.persistence.CBTHandler},
#{item.flowHeader,jdbcType=VARCHAR}, #{item.flowJson,jdbcType=BLOB, typeHandler=com.jz.common.persistence.CBTHandler}, #{item.version,jdbcType=VARCHAR}, #{item.isGziped,jdbcType=VARCHAR}, #{item.taskDataStatus,jdbcType=CHAR},
#{item.taskCreateUserId,jdbcType=CHAR}, #{item.taskCreateTime,jdbcType=TIMESTAMP}, #{item.taskUpdateUserId,jdbcType=CHAR}, #{item.taskUpdateTime,jdbcType=TIMESTAMP}, #{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.modules.model.DmpDevelopTaskHistory">
insert into dmp_develop_task_history
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null" >
id,
</if>
<if test="taskId != null" >
task_id,
</if>
<if test="treeId != null" >
tree_id,
</if>
<if test="datasourceId != null" >
datasource_id,
</if>
<if test="taskType != null" >
task_type,
</if>
<if test="type != null" >
type,
</if>
<if test="scheduleType != null" >
schedule_type,
</if>
<if test="isSubmit != null" >
is_submit,
</if>
<if test="taskDesc != null" >
task_desc,
</if>
<if test="script != null" >
script,
</if>
<if test="flowHeader != null" >
flow_header,
</if>
<if test="flowJson != null" >
flow_json,
</if>
<if test="version != null" >
version,
</if>
<if test="isGziped != null" >
is_gziped,
</if>
<if test="taskDataStatus != null" >
task_data_status,
</if>
<if test="taskCreateUserId != null" >
task_create_user_id,
</if>
<if test="taskCreateTime != null" >
task_create_time,
</if>
<if test="taskUpdateUserId != null" >
task_update_user_id,
</if>
<if test="taskUpdateTime != null" >
task_update_time,
</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="id != null" >
#{id,jdbcType=INTEGER},
</if>
<if test="taskId != null" >
#{taskId,jdbcType=INTEGER},
</if>
<if test="treeId != null" >
#{treeId,jdbcType=INTEGER},
</if>
<if test="datasourceId != null" >
#{datasourceId,jdbcType=INTEGER},
</if>
<if test="taskType != null" >
#{taskType,jdbcType=CHAR},
</if>
<if test="type != null" >
#{type,jdbcType=CHAR},
</if>
<if test="scheduleType != null" >
#{scheduleType,jdbcType=CHAR},
</if>
<if test="isSubmit != null" >
#{isSubmit,jdbcType=CHAR},
</if>
<if test="taskDesc != null" >
#{taskDesc,jdbcType=VARCHAR},
</if>
<if test="script != null" >
#{script,jdbcType=BLOB, typeHandler=com.jz.common.persistence.CBTHandler},
</if>
<if test="flowHeader != null" >
#{flowHeader,jdbcType=VARCHAR},
</if>
<if test="flowJson != null" >
#{flowJson,jdbcType=BLOB, typeHandler=com.jz.common.persistence.CBTHandler},
</if>
<if test="version != null" >
#{version,jdbcType=VARCHAR},
</if>
<if test="isGziped != null" >
#{isGziped,jdbcType=VARCHAR},
</if>
<if test="taskDataStatus != null" >
#{taskDataStatus,jdbcType=CHAR},
</if>
<if test="taskCreateUserId != null" >
#{taskCreateUserId,jdbcType=CHAR},
</if>
<if test="taskCreateTime != null" >
#{taskCreateTime,jdbcType=TIMESTAMP},
</if>
<if test="taskUpdateUserId != null" >
#{taskUpdateUserId,jdbcType=CHAR},
</if>
<if test="taskUpdateTime != null" >
#{taskUpdateTime,jdbcType=TIMESTAMP},
</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.modules.model.DmpDevelopTaskHistory">
update dmp_develop_task_history set
id = #{id,jdbcType=INTEGER},
task_id = #{taskId,jdbcType=INTEGER},
tree_id = #{treeId,jdbcType=INTEGER},
datasource_id = #{datasourceId,jdbcType=INTEGER},
task_type = #{taskType,jdbcType=CHAR},
type = #{type,jdbcType=CHAR},
schedule_type = #{scheduleType,jdbcType=CHAR},
is_submit = #{isSubmit,jdbcType=CHAR},
task_desc = #{taskDesc,jdbcType=VARCHAR},
script = #{script,jdbcType=BLOB, typeHandler=com.jz.common.persistence.CBTHandler},
flow_header = #{flowHeader,jdbcType=VARCHAR},
flow_json = #{flowJson,jdbcType=BLOB, typeHandler=com.jz.common.persistence.CBTHandler},
version = #{version,jdbcType=VARCHAR},
is_gziped = #{isGziped,jdbcType=VARCHAR},
task_data_status = #{taskDataStatus,jdbcType=CHAR},
task_create_user_id = #{taskCreateUserId,jdbcType=CHAR},
task_create_time = #{taskCreateTime,jdbcType=TIMESTAMP},
task_update_user_id = #{taskUpdateUserId,jdbcType=CHAR},
task_update_time = #{taskUpdateTime,jdbcType=TIMESTAMP},
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 id = #{id,jdbcType=INTEGER}
</update>
<!-- 选择性修改任务历史版本 -->
<update id="updateByPrimaryKeySelective" parameterType="com.jz.dmp.modules.model.DmpDevelopTaskHistory">
update dmp_develop_task_history
<set>
<if test="id != null" >
id = #{id,jdbcType=INTEGER},
</if>
<if test="taskId != null" >
task_id = #{taskId,jdbcType=INTEGER},
</if>
<if test="treeId != null" >
tree_id = #{treeId,jdbcType=INTEGER},
</if>
<if test="datasourceId != null" >
datasource_id = #{datasourceId,jdbcType=INTEGER},
</if>
<if test="taskType != null" >
task_type = #{taskType,jdbcType=CHAR},
</if>
<if test="type != null" >
type = #{type,jdbcType=CHAR},
</if>
<if test="scheduleType != null" >
schedule_type = #{scheduleType,jdbcType=CHAR},
</if>
<if test="isSubmit != null" >
is_submit = #{isSubmit,jdbcType=CHAR},
</if>
<if test="taskDesc != null" >
task_desc = #{taskDesc,jdbcType=VARCHAR},
</if>
<if test="script != null" >
script = #{script,jdbcType=BLOB, typeHandler=com.jz.common.persistence.CBTHandler},
</if>
<if test="flowHeader != null" >
flow_header = #{flowHeader,jdbcType=VARCHAR},
</if>
<if test="flowJson != null" >
flow_json = #{flowJson,jdbcType=BLOB, typeHandler=com.jz.common.persistence.CBTHandler},
</if>
<if test="version != null" >
version = #{version,jdbcType=VARCHAR},
</if>
<if test="isGziped != null" >
is_gziped = #{isGziped,jdbcType=VARCHAR},
</if>
<if test="taskDataStatus != null" >
task_data_status = #{taskDataStatus,jdbcType=CHAR},
</if>
<if test="taskCreateUserId != null" >
task_create_user_id = #{taskCreateUserId,jdbcType=CHAR},
</if>
<if test="taskCreateTime != null" >
task_create_time = #{taskCreateTime,jdbcType=TIMESTAMP},
</if>
<if test="taskUpdateUserId != null" >
task_update_user_id = #{taskUpdateUserId,jdbcType=CHAR},
</if>
<if test="taskUpdateTime != null" >
task_update_time = #{taskUpdateTime,jdbcType=TIMESTAMP},
</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 id = #{id,jdbcType=INTEGER}
</update>
<!-- 条件查询任务历史版本 -->
<select id="findList" resultMap="BaseDtoResultMap">
SELECT
<include refid="BaseDto_Column_List"/>
FROM dmp_develop_task_history
<where>
<if test="id != null" >
AND id = #{id,jdbcType=INTEGER}
</if>
<if test="taskId != null" >
AND task_id = #{taskId,jdbcType=INTEGER}
</if>
<if test="treeId != null" >
AND tree_id = #{treeId,jdbcType=INTEGER}
</if>
<if test="datasourceId != null" >
AND datasource_id = #{datasourceId,jdbcType=INTEGER}
</if>
<if test="taskType != null" >
AND task_type = #{taskType,jdbcType=CHAR}
</if>
<if test="type != null" >
AND type = #{type,jdbcType=CHAR}
</if>
<if test="scheduleType != null" >
AND schedule_type = #{scheduleType,jdbcType=CHAR}
</if>
<if test="isSubmit != null" >
AND is_submit = #{isSubmit,jdbcType=CHAR}
</if>
<if test="taskDesc != null" >
AND task_desc = #{taskDesc,jdbcType=VARCHAR}
</if>
<if test="script != null" >
AND script = #{script,jdbcType=BLOB, typeHandler=com.jz.common.persistence.CBTHandler}
</if>
<if test="flowHeader != null" >
AND flow_header = #{flowHeader,jdbcType=VARCHAR}
</if>
<if test="flowJson != null" >
AND flow_json = #{flowJson,jdbcType=BLOB, typeHandler=com.jz.common.persistence.CBTHandler}
</if>
<if test="version != null" >
AND version = #{version,jdbcType=VARCHAR}
</if>
<if test="isGziped != null" >
AND is_gziped = #{isGziped,jdbcType=VARCHAR}
</if>
<if test="taskDataStatus != null" >
AND task_data_status = #{taskDataStatus,jdbcType=CHAR}
</if>
<if test="taskCreateUserId != null" >
AND task_create_user_id = #{taskCreateUserId,jdbcType=CHAR}
</if>
<if test="taskCreateTimeStart != null" >
AND task_create_time >= #{taskCreateTimeStart,jdbcType=TIMESTAMP}
</if>
<if test="taskCreateTimeEnd != null" >
AND task_create_time <![CDATA[ <= ]]> #{taskCreateTimeEnd,jdbcType=TIMESTAMP}
</if>
<if test="taskUpdateUserId != null" >
AND task_update_user_id = #{taskUpdateUserId,jdbcType=CHAR}
</if>
<if test="taskUpdateTimeStart != null" >
AND task_update_time >= #{taskUpdateTimeStart,jdbcType=TIMESTAMP}
</if>
<if test="taskUpdateTimeEnd != null" >
AND task_update_time <![CDATA[ <= ]]> #{taskUpdateTimeEnd,jdbcType=TIMESTAMP}
</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_develop_task_history
where id = #{id,jdbcType=INTEGER}
AND data_status='1'
</select>
<!-- 根据主键批量删除任务历史版本 -->
<delete id="deleteByIds">
delete from dmp_develop_task_history
where id in
<foreach collection="idList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<!-- 根据主键批量软删除任务历史版本 -->
<update id="softDeleteByIds">
update dmp_develop_task_history
<set>
data_status = '0'
</set>
where id in
<foreach collection="idList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</update>
</mapper>
<?xml version="1.0" encoding="UTF-8" ?> <?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" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.jz.dmp.modules.dao.DmpDevelopTaskDao" > <mapper namespace="com.jz.dmp.modules.dao.DmpDevelopTaskDao">
<resultMap id="DmpDevelopTaskResultMap"
type="com.jz.dmp.modules.model.DmpDevelopTask">
<id column="id" property="id" jdbcType="INTEGER" />
<result column="task_type" property="taskType" jdbcType="CHAR" />
<result column="type" property="type" jdbcType="CHAR" />
<result column="schedule_type" property="scheduleType"
jdbcType="CHAR" />
<result column="is_submit" property="isSubmit" jdbcType="CHAR" />
<result column="task_desc" property="taskDesc"
jdbcType="VARCHAR" />
<result column="script" property="script" jdbcType="BLOB"
typeHandler="com.jz.common.persistence.CBTHandler" />
<result column="flow_json" property="flowJson" jdbcType="BLOB"
typeHandler="com.jz.common.persistence.CBTHandler" />
<result column="flow_header" property="flowHeader"
jdbcType="VARCHAR" />
<result column="version" property="version" jdbcType="VARCHAR" />
<result column="data_status" property="dataStatus"
jdbcType="CHAR" />
<result column="tree_id" property="treeId" jdbcType="INTEGER" />
<result column="is_gziped" property="isGziped" jdbcType="INTEGER" />
<!-- <result column="chk_result" property="chkResult" javaType="VARCHAR"/> -->
<!-- <result column="sync_result" property="syncResult" javaType="VARCHAR"/> -->
</resultMap>
<sql id="FIND_ALL_COLUMN">
id,task_type,type,schedule_type,is_submit,task_desc,script,data_status,create_user_id,create_time,update_user_id,update_time,tree_id,flow_header,
flow_json, version,is_gziped
</sql>
<select id="getDmpTaskAndTreeInfo" parameterType="string" resultType="map"> <select id="getDmpTaskAndTreeInfo" parameterType="string" resultType="map">
select select
...@@ -137,6 +166,25 @@ ...@@ -137,6 +166,25 @@
<if test="treeIdOrName != null and treeIdOrName != ''"> and t1.name like concat('%',#{treeIdOrName},'%') </if> <if test="treeIdOrName != null and treeIdOrName != ''"> and t1.name like concat('%',#{treeIdOrName},'%') </if>
<if test="taskType != null and taskType!= ''"> and t1.type=#{taskType} </if> <if test="taskType != null and taskType!= ''"> and t1.type=#{taskType} </if>
</select> </select>
<select id="findList" resultMap="DmpDevelopTaskResultMap">
SELECT
<include refid="FIND_ALL_COLUMN" />
FROM dmp_develop_task WHERE 1=1
<if test="taskType != null">AND task_type = #{taskType}</if>
<if test="type != null">AND type = #{type}</if>
<if test="scheduleType != null">AND schedule_type = #{scheduleType}</if>
<if test="isSubmit != null">AND is_submit = #{isSubmit}</if>
<if test="taskDesc != null">AND task_desc = #{taskDesc}</if>
<if test="script != null">AND script = #{script, jdbcType=BLOB,
typeHandler=com.jz.common.persistence.CBTHandler}</if>
<if test="dataStatus != null">AND data_status = #{dataStatus}</if>
<if test="treeId != null">AND tree_id = #{treeId}</if>
<if test="flowHeader != null">AND flow_header = #{flowHeader}</if>
<if test="flowJson != null">AND flow_json = #{flowJson}</if>
<if test="version != null">AND version = #{version}</if>
<if test="gziped != null">AND is_gziped = #{gziped}</if>
</select>
<select id="queryTaskTreeInfo" resultType="com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListDto"> <select id="queryTaskTreeInfo" resultType="com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListDto">
select select
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<!-- 封装用户项目角色信息 --> <!-- 封装用户项目角色信息 -->
<select id="getRoleNamesByUserid" resultType="java.lang.String"> <select id="getRoleNamesByUserid" resultType="java.lang.String">
select role.role_name select DISTINCT role.role_name
from dmp_member_project_role mprole left join dmp_role role on mprole.role_id = role.role_id from dmp_member_project_role mprole left join dmp_role role on mprole.role_id = role.role_id
where mprole.user_id=#{userId,jdbcType=INTEGER} where mprole.user_id=#{userId,jdbcType=INTEGER}
</select> </select>
......
...@@ -301,7 +301,7 @@ ...@@ -301,7 +301,7 @@
<!-- 项目角色用户人数统计 --> <!-- 项目角色用户人数统计 -->
<select id="projRoleStat" resultType="map"> <select id="projRoleStat" resultType="map">
select select
role.role_code AS roleCode,role.role_name AS roleName,COUNT(1) AS statCount role.role_code AS roleCode,role.role_name AS roleName,COUNT(DISTINCT member.user_id) AS statCount
from dmp_member_project_role mprole from dmp_member_project_role mprole
left join dmp_role role on mprole.role_id=role.role_id left join dmp_role role on mprole.role_id=role.role_id
left join dmp_member member on mprole.user_id=member.user_id left join dmp_member member on mprole.user_id=member.user_id
......
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