This commit is contained in:
fans 2023-10-18 13:46:32 +08:00
parent bfd7400390
commit c6f2d5eaa7
17 changed files with 1715 additions and 0 deletions

View File

@ -0,0 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>ruoyi</artifactId>
<groupId>com.ruoyi</groupId>
<version>3.8.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>management-platform</artifactId>
<dependencies>
<!-- 通用工具-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.5</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
<version>4.5</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4.13</version>
</dependency>
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-generator</artifactId>
</dependency>
<dependency>
<groupId>io.kubernetes</groupId>
<artifactId>client-java</artifactId>
<version>16.0.3</version>
</dependency>
<dependency>
<groupId>com.github.docker-java</groupId>
<artifactId>docker-java</artifactId>
<version>3.1.1</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,83 @@
package com.ruoyi.platform.dao;
import com.ruoyi.platform.entity.Component;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Pageable;
import java.util.List;
/**
* (Component)表数据库访问层
*
* @author makejava
* @since 2023-10-18 13:36:35
*/
public interface ComponentDao {
/**
* 通过ID查询单条数据
*
* @param id 主键
* @return 实例对象
*/
Component queryById(Integer id);
/**
* 查询指定行数据
*
* @param component 查询条件
* @param pageable 分页对象
* @return 对象列表
*/
List<Component> queryAllByLimit(Component component, @Param("pageable") Pageable pageable);
/**
* 统计总行数
*
* @param component 查询条件
* @return 总行数
*/
long count(Component component);
/**
* 新增数据
*
* @param component 实例对象
* @return 影响行数
*/
int insert(Component component);
/**
* 批量新增数据MyBatis原生foreach方法
*
* @param entities List<Component> 实例对象列表
* @return 影响行数
*/
int insertBatch(@Param("entities") List<Component> entities);
/**
* 批量新增或按主键更新数据MyBatis原生foreach方法
*
* @param entities List<Component> 实例对象列表
* @return 影响行数
* @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常请自行校验入参
*/
int insertOrUpdateBatch(@Param("entities") List<Component> entities);
/**
* 修改数据
*
* @param component 实例对象
* @return 影响行数
*/
int update(Component component);
/**
* 通过主键删除数据
*
* @param id 主键
* @return 影响行数
*/
int deleteById(Integer id);
}

View File

@ -0,0 +1,84 @@
package com.ruoyi.platform.dao;
import com.ruoyi.platform.entity.Experiment;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Pageable;
import java.util.List;
/**
* (Experiment)表数据库访问层
*
* @author makejava
* @since 2023-10-18 13:37:48
*/
public interface ExperimentDao {
/**
* 通过ID查询单条数据
*
* @param id 主键
* @return 实例对象
*/
Experiment queryById(Integer id);
/**
* 查询指定行数据
*
* @param experiment 查询条件
* @param pageable 分页对象
* @return 对象列表
*/
List<Experiment> queryAllByLimit(Experiment experiment, @Param("pageable") Pageable pageable);
/**
* 统计总行数
*
* @param experiment 查询条件
* @return 总行数
*/
long count(Experiment experiment);
/**
* 新增数据
*
* @param experiment 实例对象
* @return 影响行数
*/
int insert(Experiment experiment);
/**
* 批量新增数据MyBatis原生foreach方法
*
* @param entities List<Experiment> 实例对象列表
* @return 影响行数
*/
int insertBatch(@Param("entities") List<Experiment> entities);
/**
* 批量新增或按主键更新数据MyBatis原生foreach方法
*
* @param entities List<Experiment> 实例对象列表
* @return 影响行数
* @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常请自行校验入参
*/
int insertOrUpdateBatch(@Param("entities") List<Experiment> entities);
/**
* 修改数据
*
* @param experiment 实例对象
* @return 影响行数
*/
int update(Experiment experiment);
/**
* 通过主键删除数据
*
* @param id 主键
* @return 影响行数
*/
int deleteById(Integer id);
}

View File

@ -0,0 +1,83 @@
package com.ruoyi.platform.dao;
import com.ruoyi.platform.entity.Workflow;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Pageable;
import java.util.List;
/**
* DAG workflow(Workflow)表数据库访问层
*
* @author makejava
* @since 2023-10-18 13:41:09
*/
public interface WorkflowDao {
/**
* 通过ID查询单条数据
*
* @param id 主键
* @return 实例对象
*/
Workflow queryById(Long id);
/**
* 查询指定行数据
*
* @param workflow 查询条件
* @param pageable 分页对象
* @return 对象列表
*/
List<Workflow> queryAllByLimit(Workflow workflow, @Param("pageable") Pageable pageable);
/**
* 统计总行数
*
* @param workflow 查询条件
* @return 总行数
*/
long count(Workflow workflow);
/**
* 新增数据
*
* @param workflow 实例对象
* @return 影响行数
*/
int insert(Workflow workflow);
/**
* 批量新增数据MyBatis原生foreach方法
*
* @param entities List<Workflow> 实例对象列表
* @return 影响行数
*/
int insertBatch(@Param("entities") List<Workflow> entities);
/**
* 批量新增或按主键更新数据MyBatis原生foreach方法
*
* @param entities List<Workflow> 实例对象列表
* @return 影响行数
* @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常请自行校验入参
*/
int insertOrUpdateBatch(@Param("entities") List<Workflow> entities);
/**
* 修改数据
*
* @param workflow 实例对象
* @return 影响行数
*/
int update(Workflow workflow);
/**
* 通过主键删除数据
*
* @param id 主键
* @return 影响行数
*/
int deleteById(Long id);
}

View File

@ -0,0 +1,149 @@
package com.ruoyi.platform.entity;
import java.util.Date;
import java.io.Serializable;
/**
* (Component)实体类
*
* @author makejava
* @since 2023-10-18 13:36:36
*/
public class Component implements Serializable {
private static final long serialVersionUID = 189714963458219059L;
/**
* 主键
*/
private Integer id;
/**
* 类别ID数据字典配置
*/
private Integer categoryId;
/**
* 组件name
*/
private String componentName;
/**
* 组件ID根据主键类别自动生成
*/
private String componentId;
/**
* 输入
*/
private String inParameters;
/**
* 输出
*/
private String outParameters;
/**
* 创建者
*/
private String createBy;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新者
*/
private String updateBy;
/**
* 更新时间
*/
private Date updateTime;
/**
* 0,失效 1生效
*/
private Integer state;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getCategoryId() {
return categoryId;
}
public void setCategoryId(Integer categoryId) {
this.categoryId = categoryId;
}
public String getComponentName() {
return componentName;
}
public void setComponentName(String componentName) {
this.componentName = componentName;
}
public String getComponentId() {
return componentId;
}
public void setComponentId(String componentId) {
this.componentId = componentId;
}
public String getInParameters() {
return inParameters;
}
public void setInParameters(String inParameters) {
this.inParameters = inParameters;
}
public String getOutParameters() {
return outParameters;
}
public void setOutParameters(String outParameters) {
this.outParameters = outParameters;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Integer getState() {
return state;
}
public void setState(Integer state) {
this.state = state;
}
}

View File

@ -0,0 +1,157 @@
package com.ruoyi.platform.entity;
import java.util.Date;
import java.io.Serializable;
/**
* (Experiment)实体类
*
* @author makejava
* @since 2023-10-18 13:37:48
*/
public class Experiment implements Serializable {
private static final long serialVersionUID = 107822750572849353L;
private Integer id;
private Integer workflowId;
/**
* 全局参数
*/
private String globalParam;
/**
* 简介
*/
private String describe;
/**
* argo返回name
*/
private String argoInsName;
/**
* argo返回id
*/
private String argoInsId;
/**
* 业务状态数据字典配置
*/
private Integer status;
/**
* 创建者
*/
private String createBy;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新者
*/
private String updateBy;
/**
* 更新时间
*/
private Date updateTime;
/**
* 0,失效 1生效
*/
private Integer state;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getWorkflowId() {
return workflowId;
}
public void setWorkflowId(Integer workflowId) {
this.workflowId = workflowId;
}
public String getGlobalParam() {
return globalParam;
}
public void setGlobalParam(String globalParam) {
this.globalParam = globalParam;
}
public String getDescribe() {
return describe;
}
public void setDescribe(String describe) {
this.describe = describe;
}
public String getArgoInsName() {
return argoInsName;
}
public void setArgoInsName(String argoInsName) {
this.argoInsName = argoInsName;
}
public String getArgoInsId() {
return argoInsId;
}
public void setArgoInsId(String argoInsId) {
this.argoInsId = argoInsId;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Integer getState() {
return state;
}
public void setState(Integer state) {
this.state = state;
}
}

View File

@ -0,0 +1,125 @@
package com.ruoyi.platform.entity;
import java.util.Date;
import java.io.Serializable;
/**
* DAG workflow(Workflow)实体类
*
* @author makejava
* @since 2023-10-18 13:41:09
*/
public class Workflow implements Serializable {
private static final long serialVersionUID = -61495379838862559L;
/**
* id
*/
private Long id;
/**
* 工作流名称
*/
private String name;
/**
* DAG工作流描述
*/
private String description;
/**
* DAG图
*/
private String dag;
/**
* 创建人
*/
private String createBy;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新人
*/
private String updateBy;
/**
* 更新时间
*/
private Date updateTime;
/**
* 0,失效 1生效
*/
private Integer state;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getDag() {
return dag;
}
public void setDag(String dag) {
this.dag = dag;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Integer getState() {
return state;
}
public void setState(Integer state) {
this.state = state;
}
}

View File

@ -0,0 +1,56 @@
package com.ruoyi.platform.service;
import com.ruoyi.platform.entity.Component;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
/**
* (Component)表服务接口
*
* @author makejava
* @since 2023-10-18 13:36:38
*/
public interface ComponentService {
/**
* 通过ID查询单条数据
*
* @param id 主键
* @return 实例对象
*/
Component queryById(Integer id);
/**
* 分页查询
*
* @param component 筛选条件
* @param pageRequest 分页对象
* @return 查询结果
*/
Page<Component> queryByPage(Component component, PageRequest pageRequest);
/**
* 新增数据
*
* @param component 实例对象
* @return 实例对象
*/
Component insert(Component component);
/**
* 修改数据
*
* @param component 实例对象
* @return 实例对象
*/
Component update(Component component);
/**
* 通过主键删除数据
*
* @param id 主键
* @return 是否成功
*/
boolean deleteById(Integer id);
}

View File

@ -0,0 +1,56 @@
package com.ruoyi.platform.service;
import com.ruoyi.platform.entity.Experiment;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
/**
* (Experiment)表服务接口
*
* @author makejava
* @since 2023-10-18 13:37:48
*/
public interface ExperimentService {
/**
* 通过ID查询单条数据
*
* @param id 主键
* @return 实例对象
*/
Experiment queryById(Integer id);
/**
* 分页查询
*
* @param experiment 筛选条件
* @param pageRequest 分页对象
* @return 查询结果
*/
Page<Experiment> queryByPage(Experiment experiment, PageRequest pageRequest);
/**
* 新增数据
*
* @param experiment 实例对象
* @return 实例对象
*/
Experiment insert(Experiment experiment);
/**
* 修改数据
*
* @param experiment 实例对象
* @return 实例对象
*/
Experiment update(Experiment experiment);
/**
* 通过主键删除数据
*
* @param id 主键
* @return 是否成功
*/
boolean deleteById(Integer id);
}

View File

@ -0,0 +1,56 @@
package com.ruoyi.platform.service;
import com.ruoyi.platform.entity.Workflow;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
/**
* DAG workflow(Workflow)表服务接口
*
* @author makejava
* @since 2023-10-18 13:41:09
*/
public interface WorkflowService {
/**
* 通过ID查询单条数据
*
* @param id 主键
* @return 实例对象
*/
Workflow queryById(Long id);
/**
* 分页查询
*
* @param workflow 筛选条件
* @param pageRequest 分页对象
* @return 查询结果
*/
Page<Workflow> queryByPage(Workflow workflow, PageRequest pageRequest);
/**
* 新增数据
*
* @param workflow 实例对象
* @return 实例对象
*/
Workflow insert(Workflow workflow);
/**
* 修改数据
*
* @param workflow 实例对象
* @return 实例对象
*/
Workflow update(Workflow workflow);
/**
* 通过主键删除数据
*
* @param id 主键
* @return 是否成功
*/
boolean deleteById(Long id);
}

View File

@ -0,0 +1,82 @@
package com.ruoyi.platform.service.impl;
import com.ruoyi.platform.entity.Component;
import com.ruoyi.platform.dao.ComponentDao;
import com.ruoyi.platform.service.ComponentService;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.PageRequest;
import javax.annotation.Resource;
/**
* (Component)表服务实现类
*
* @author makejava
* @since 2023-10-18 13:36:39
*/
@Service("componentService")
public class ComponentServiceImpl implements ComponentService {
@Resource
private ComponentDao componentDao;
/**
* 通过ID查询单条数据
*
* @param id 主键
* @return 实例对象
*/
@Override
public Component queryById(Integer id) {
return this.componentDao.queryById(id);
}
/**
* 分页查询
*
* @param component 筛选条件
* @param pageRequest 分页对象
* @return 查询结果
*/
@Override
public Page<Component> queryByPage(Component component, PageRequest pageRequest) {
long total = this.componentDao.count(component);
return new PageImpl<>(this.componentDao.queryAllByLimit(component, pageRequest), pageRequest, total);
}
/**
* 新增数据
*
* @param component 实例对象
* @return 实例对象
*/
@Override
public Component insert(Component component) {
this.componentDao.insert(component);
return component;
}
/**
* 修改数据
*
* @param component 实例对象
* @return 实例对象
*/
@Override
public Component update(Component component) {
this.componentDao.update(component);
return this.queryById(component.getId());
}
/**
* 通过主键删除数据
*
* @param id 主键
* @return 是否成功
*/
@Override
public boolean deleteById(Integer id) {
return this.componentDao.deleteById(id) > 0;
}
}

View File

@ -0,0 +1,82 @@
package com.ruoyi.platform.service.impl;
import com.ruoyi.platform.entity.Experiment;
import com.ruoyi.platform.dao.ExperimentDao;
import com.ruoyi.platform.service.ExperimentService;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.PageRequest;
import javax.annotation.Resource;
/**
* (Experiment)表服务实现类
*
* @author makejava
* @since 2023-10-18 13:37:48
*/
@Service("experimentService")
public class ExperimentServiceImpl implements ExperimentService {
@Resource
private ExperimentDao experimentDao;
/**
* 通过ID查询单条数据
*
* @param id 主键
* @return 实例对象
*/
@Override
public Experiment queryById(Integer id) {
return this.experimentDao.queryById(id);
}
/**
* 分页查询
*
* @param experiment 筛选条件
* @param pageRequest 分页对象
* @return 查询结果
*/
@Override
public Page<Experiment> queryByPage(Experiment experiment, PageRequest pageRequest) {
long total = this.experimentDao.count(experiment);
return new PageImpl<>(this.experimentDao.queryAllByLimit(experiment, pageRequest), pageRequest, total);
}
/**
* 新增数据
*
* @param experiment 实例对象
* @return 实例对象
*/
@Override
public Experiment insert(Experiment experiment) {
this.experimentDao.insert(experiment);
return experiment;
}
/**
* 修改数据
*
* @param experiment 实例对象
* @return 实例对象
*/
@Override
public Experiment update(Experiment experiment) {
this.experimentDao.update(experiment);
return this.queryById(experiment.getId());
}
/**
* 通过主键删除数据
*
* @param id 主键
* @return 是否成功
*/
@Override
public boolean deleteById(Integer id) {
return this.experimentDao.deleteById(id) > 0;
}
}

View File

@ -0,0 +1,82 @@
package com.ruoyi.platform.service.impl;
import com.ruoyi.platform.entity.Workflow;
import com.ruoyi.platform.dao.WorkflowDao;
import com.ruoyi.platform.service.WorkflowService;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.PageRequest;
import javax.annotation.Resource;
/**
* DAG workflow(Workflow)表服务实现类
*
* @author makejava
* @since 2023-10-18 13:41:09
*/
@Service("workflowService")
public class WorkflowServiceImpl implements WorkflowService {
@Resource
private WorkflowDao workflowDao;
/**
* 通过ID查询单条数据
*
* @param id 主键
* @return 实例对象
*/
@Override
public Workflow queryById(Long id) {
return this.workflowDao.queryById(id);
}
/**
* 分页查询
*
* @param workflow 筛选条件
* @param pageRequest 分页对象
* @return 查询结果
*/
@Override
public Page<Workflow> queryByPage(Workflow workflow, PageRequest pageRequest) {
long total = this.workflowDao.count(workflow);
return new PageImpl<>(this.workflowDao.queryAllByLimit(workflow, pageRequest), pageRequest, total);
}
/**
* 新增数据
*
* @param workflow 实例对象
* @return 实例对象
*/
@Override
public Workflow insert(Workflow workflow) {
this.workflowDao.insert(workflow);
return workflow;
}
/**
* 修改数据
*
* @param workflow 实例对象
* @return 实例对象
*/
@Override
public Workflow update(Workflow workflow) {
this.workflowDao.update(workflow);
return this.queryById(workflow.getId());
}
/**
* 通过主键删除数据
*
* @param id 主键
* @return 是否成功
*/
@Override
public boolean deleteById(Long id) {
return this.workflowDao.deleteById(id) > 0;
}
}

View File

@ -0,0 +1,188 @@
<?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.ruoyi.platform.dao.ComponentDao">
<resultMap type="com.ruoyi.platform.entity.Component" id="ComponentMap">
<result property="id" column="id" jdbcType="INTEGER"/>
<result property="categoryId" column="category_id" jdbcType="INTEGER"/>
<result property="componentName" column="component_name" jdbcType="VARCHAR"/>
<result property="componentId" column="component_id" jdbcType="VARCHAR"/>
<result property="inParameters" column="in_parameters" jdbcType="VARCHAR"/>
<result property="outParameters" column="out_parameters" jdbcType="VARCHAR"/>
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
<result property="state" column="state" jdbcType="INTEGER"/>
</resultMap>
<!--查询单个-->
<select id="queryById" resultMap="ComponentMap">
select
id, category_id, component_name, component_id, in_parameters, out_parameters, create_by, create_time, update_by, update_time, state
from component
where id = #{id}
</select>
<!--查询指定行数据-->
<select id="queryAllByLimit" resultMap="ComponentMap">
select
id, category_id, component_name, component_id, in_parameters, out_parameters, create_by, create_time, update_by, update_time, state
from component
<where>
<if test="id != null">
and id = #{id}
</if>
<if test="categoryId != null">
and category_id = #{categoryId}
</if>
<if test="componentName != null and componentName != ''">
and component_name = #{componentName}
</if>
<if test="componentId != null and componentId != ''">
and component_id = #{componentId}
</if>
<if test="inParameters != null and inParameters != ''">
and in_parameters = #{inParameters}
</if>
<if test="outParameters != null and outParameters != ''">
and out_parameters = #{outParameters}
</if>
<if test="createBy != null and createBy != ''">
and create_by = #{createBy}
</if>
<if test="createTime != null">
and create_time = #{createTime}
</if>
<if test="updateBy != null and updateBy != ''">
and update_by = #{updateBy}
</if>
<if test="updateTime != null">
and update_time = #{updateTime}
</if>
<if test="state != null">
and state = #{state}
</if>
</where>
limit #{pageable.offset}, #{pageable.pageSize}
</select>
<!--统计总行数-->
<select id="count" resultType="java.lang.Long">
select count(1)
from component
<where>
<if test="id != null">
and id = #{id}
</if>
<if test="categoryId != null">
and category_id = #{categoryId}
</if>
<if test="componentName != null and componentName != ''">
and component_name = #{componentName}
</if>
<if test="componentId != null and componentId != ''">
and component_id = #{componentId}
</if>
<if test="inParameters != null and inParameters != ''">
and in_parameters = #{inParameters}
</if>
<if test="outParameters != null and outParameters != ''">
and out_parameters = #{outParameters}
</if>
<if test="createBy != null and createBy != ''">
and create_by = #{createBy}
</if>
<if test="createTime != null">
and create_time = #{createTime}
</if>
<if test="updateBy != null and updateBy != ''">
and update_by = #{updateBy}
</if>
<if test="updateTime != null">
and update_time = #{updateTime}
</if>
<if test="state != null">
and state = #{state}
</if>
</where>
</select>
<!--新增所有列-->
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
insert into component(category_id, component_name, component_id, in_parameters, out_parameters, create_by, create_time, update_by, update_time, state)
values (#{categoryId}, #{componentName}, #{componentId}, #{inParameters}, #{outParameters}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{state})
</insert>
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
insert into component(category_id, component_name, component_id, in_parameters, out_parameters, create_by, create_time, update_by, update_time, state)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.categoryId}, #{entity.componentName}, #{entity.componentId}, #{entity.inParameters}, #{entity.outParameters}, #{entity.createBy}, #{entity.createTime}, #{entity.updateBy}, #{entity.updateTime}, #{entity.state})
</foreach>
</insert>
<insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
insert into component(category_id, component_name, component_id, in_parameters, out_parameters, create_by, create_time, update_by, update_time, state)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.categoryId}, #{entity.componentName}, #{entity.componentId}, #{entity.inParameters}, #{entity.outParameters}, #{entity.createBy}, #{entity.createTime}, #{entity.updateBy}, #{entity.updateTime}, #{entity.state})
</foreach>
on duplicate key update
category_id = values(category_id),
component_name = values(component_name),
component_id = values(component_id),
in_parameters = values(in_parameters),
out_parameters = values(out_parameters),
create_by = values(create_by),
create_time = values(create_time),
update_by = values(update_by),
update_time = values(update_time),
state = values(state)
</insert>
<!--通过主键修改数据-->
<update id="update">
update component
<set>
<if test="categoryId != null">
category_id = #{categoryId},
</if>
<if test="componentName != null and componentName != ''">
component_name = #{componentName},
</if>
<if test="componentId != null and componentId != ''">
component_id = #{componentId},
</if>
<if test="inParameters != null and inParameters != ''">
in_parameters = #{inParameters},
</if>
<if test="outParameters != null and outParameters != ''">
out_parameters = #{outParameters},
</if>
<if test="createBy != null and createBy != ''">
create_by = #{createBy},
</if>
<if test="createTime != null">
create_time = #{createTime},
</if>
<if test="updateBy != null and updateBy != ''">
update_by = #{updateBy},
</if>
<if test="updateTime != null">
update_time = #{updateTime},
</if>
<if test="state != null">
state = #{state},
</if>
</set>
where id = #{id}
</update>
<!--通过主键删除-->
<delete id="deleteById">
delete from component where id = #{id}
</delete>
</mapper>

View File

@ -0,0 +1,206 @@
<?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.ruoyi.platform.dao.ExperimentDao">
<resultMap type="com.ruoyi.platform.entity.Experiment" id="ExperimentMap">
<result property="id" column="id" jdbcType="INTEGER"/>
<result property="workflowId" column="workflow_id" jdbcType="INTEGER"/>
<result property="globalParam" column="global_param" jdbcType="VARCHAR"/>
<result property="describe" column="describe" jdbcType="VARCHAR"/>
<result property="argoInsName" column="argo_ins_name" jdbcType="VARCHAR"/>
<result property="argoInsId" column="argo_ins_id" jdbcType="VARCHAR"/>
<result property="status" column="status" jdbcType="INTEGER"/>
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
<result property="state" column="state" jdbcType="INTEGER"/>
</resultMap>
<!--查询单个-->
<select id="queryById" resultMap="ExperimentMap">
select
id, workflow_id, global_param, describe, argo_ins_name, argo_ins_id, status, create_by, create_time, update_by, update_time, state
from experiment
where id = #{id}
</select>
<!--查询指定行数据-->
<select id="queryAllByLimit" resultMap="ExperimentMap">
select
id, workflow_id, global_param, describe, argo_ins_name, argo_ins_id, status, create_by, create_time, update_by,
update_time, state
from experiment
<where>
<if test="id != null">
and id = #{id}
</if>
<if test="workflowId != null">
and workflow_id = #{workflowId}
</if>
<if test="globalParam != null and globalParam != ''">
and global_param = #{globalParam}
</if>
<if test="describe != null and describe != ''">
and describe = #{describe}
</if>
<if test="argoInsName != null and argoInsName != ''">
and argo_ins_name = #{argoInsName}
</if>
<if test="argoInsId != null and argoInsId != ''">
and argo_ins_id = #{argoInsId}
</if>
<if test="status != null">
and status = #{status}
</if>
<if test="createBy != null and createBy != ''">
and create_by = #{createBy}
</if>
<if test="createTime != null">
and create_time = #{createTime}
</if>
<if test="updateBy != null and updateBy != ''">
and update_by = #{updateBy}
</if>
<if test="updateTime != null">
and update_time = #{updateTime}
</if>
<if test="state != null">
and state = #{state}
</if>
</where>
limit #{pageable.offset}, #{pageable.pageSize}
</select>
<!--统计总行数-->
<select id="count" resultType="java.lang.Long">
select count(1)
from experiment
<where>
<if test="id != null">
and id = #{id}
</if>
<if test="workflowId != null">
and workflow_id = #{workflowId}
</if>
<if test="globalParam != null and globalParam != ''">
and global_param = #{globalParam}
</if>
<if test="describe != null and describe != ''">
and describe = #{describe}
</if>
<if test="argoInsName != null and argoInsName != ''">
and argo_ins_name = #{argoInsName}
</if>
<if test="argoInsId != null and argoInsId != ''">
and argo_ins_id = #{argoInsId}
</if>
<if test="status != null">
and status = #{status}
</if>
<if test="createBy != null and createBy != ''">
and create_by = #{createBy}
</if>
<if test="createTime != null">
and create_time = #{createTime}
</if>
<if test="updateBy != null and updateBy != ''">
and update_by = #{updateBy}
</if>
<if test="updateTime != null">
and update_time = #{updateTime}
</if>
<if test="state != null">
and state = #{state}
</if>
</where>
</select>
<!--新增所有列-->
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
insert into experiment(workflow_id, global_param, describe, argo_ins_name, argo_ins_id, status, create_by, create_time, update_by, update_time, state)
values (#{workflowId}, #{globalParam}, #{describe}, #{argoInsName}, #{argoInsId}, #{status}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{state})
</insert>
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
insert into experiment(workflow_id, global_param, describe, argo_ins_name, argo_ins_id, status, create_by,
create_time, update_by, update_time, state)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.workflowId}, #{entity.globalParam}, #{entity.describe}, #{entity.argoInsName},
#{entity.argoInsId}, #{entity.status}, #{entity.createBy}, #{entity.createTime}, #{entity.updateBy},
#{entity.updateTime}, #{entity.state})
</foreach>
</insert>
<insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
insert into experiment(workflow_id, global_param, describe, argo_ins_name, argo_ins_id, status, create_by,
create_time, update_by, update_time, state)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.workflowId}, #{entity.globalParam}, #{entity.describe}, #{entity.argoInsName},
#{entity.argoInsId}, #{entity.status}, #{entity.createBy}, #{entity.createTime}, #{entity.updateBy},
#{entity.updateTime}, #{entity.state})
</foreach>
on duplicate key update
workflow_id = values(workflow_id),
global_param = values(global_param),
describe = values(describe),
argo_ins_name = values(argo_ins_name),
argo_ins_id = values(argo_ins_id),
status = values(status),
create_by = values(create_by),
create_time = values(create_time),
update_by = values(update_by),
update_time = values(update_time),
state = values(state)
</insert>
<!--通过主键修改数据-->
<update id="update">
update experiment
<set>
<if test="workflowId != null">
workflow_id = #{workflowId},
</if>
<if test="globalParam != null and globalParam != ''">
global_param = #{globalParam},
</if>
<if test="describe != null and describe != ''">
describe = #{describe},
</if>
<if test="argoInsName != null and argoInsName != ''">
argo_ins_name = #{argoInsName},
</if>
<if test="argoInsId != null and argoInsId != ''">
argo_ins_id = #{argoInsId},
</if>
<if test="status != null">
status = #{status},
</if>
<if test="createBy != null and createBy != ''">
create_by = #{createBy},
</if>
<if test="createTime != null">
create_time = #{createTime},
</if>
<if test="updateBy != null and updateBy != ''">
update_by = #{updateBy},
</if>
<if test="updateTime != null">
update_time = #{updateTime},
</if>
<if test="state != null">
state = #{state},
</if>
</set>
where id = #{id}
</update>
<!--通过主键删除-->
<delete id="deleteById">
delete from experiment where id = #{id}
</delete>
</mapper>

View File

@ -0,0 +1,166 @@
<?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.ruoyi.platform.dao.WorkflowDao">
<resultMap type="com.ruoyi.platform.entity.Workflow" id="WorkflowMap">
<result property="id" column="id" jdbcType="INTEGER"/>
<result property="name" column="name" jdbcType="VARCHAR"/>
<result property="description" column="description" jdbcType="VARCHAR"/>
<result property="dag" column="dag" jdbcType="VARCHAR"/>
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
<result property="state" column="state" jdbcType="INTEGER"/>
</resultMap>
<!--查询单个-->
<select id="queryById" resultMap="WorkflowMap">
select
id, name, description, dag, create_by, create_time, update_by, update_time, state
from workflow
where id = #{id}
</select>
<!--查询指定行数据-->
<select id="queryAllByLimit" resultMap="WorkflowMap">
select
id, name, description, dag, create_by, create_time, update_by, update_time, state
from workflow
<where>
<if test="id != null">
and id = #{id}
</if>
<if test="name != null and name != ''">
and name = #{name}
</if>
<if test="description != null and description != ''">
and description = #{description}
</if>
<if test="dag != null and dag != ''">
and dag = #{dag}
</if>
<if test="createBy != null and createBy != ''">
and create_by = #{createBy}
</if>
<if test="createTime != null">
and create_time = #{createTime}
</if>
<if test="updateBy != null and updateBy != ''">
and update_by = #{updateBy}
</if>
<if test="updateTime != null">
and update_time = #{updateTime}
</if>
<if test="state != null">
and state = #{state}
</if>
</where>
limit #{pageable.offset}, #{pageable.pageSize}
</select>
<!--统计总行数-->
<select id="count" resultType="java.lang.Long">
select count(1)
from workflow
<where>
<if test="id != null">
and id = #{id}
</if>
<if test="name != null and name != ''">
and name = #{name}
</if>
<if test="description != null and description != ''">
and description = #{description}
</if>
<if test="dag != null and dag != ''">
and dag = #{dag}
</if>
<if test="createBy != null and createBy != ''">
and create_by = #{createBy}
</if>
<if test="createTime != null">
and create_time = #{createTime}
</if>
<if test="updateBy != null and updateBy != ''">
and update_by = #{updateBy}
</if>
<if test="updateTime != null">
and update_time = #{updateTime}
</if>
<if test="state != null">
and state = #{state}
</if>
</where>
</select>
<!--新增所有列-->
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
insert into workflow(name, description, dag, create_by, create_time, update_by, update_time, state)
values (#{name}, #{description}, #{dag}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{state})
</insert>
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
insert into workflow(name, description, dag, create_by, create_time, update_by, update_time, state)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.name}, #{entity.description}, #{entity.dag}, #{entity.createBy}, #{entity.createTime}, #{entity.updateBy}, #{entity.updateTime}, #{entity.state})
</foreach>
</insert>
<insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
insert into workflow(name, description, dag, create_by, create_time, update_by, update_time, state)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.name}, #{entity.description}, #{entity.dag}, #{entity.createBy}, #{entity.createTime}, #{entity.updateBy}, #{entity.updateTime}, #{entity.state})
</foreach>
on duplicate key update
name = values(name),
description = values(description),
dag = values(dag),
create_by = values(create_by),
create_time = values(create_time),
update_by = values(update_by),
update_time = values(update_time),
state = values(state)
</insert>
<!--通过主键修改数据-->
<update id="update">
update workflow
<set>
<if test="name != null and name != ''">
name = #{name},
</if>
<if test="description != null and description != ''">
description = #{description},
</if>
<if test="dag != null and dag != ''">
dag = #{dag},
</if>
<if test="createBy != null and createBy != ''">
create_by = #{createBy},
</if>
<if test="createTime != null">
create_time = #{createTime},
</if>
<if test="updateBy != null and updateBy != ''">
update_by = #{updateBy},
</if>
<if test="updateTime != null">
update_time = #{updateTime},
</if>
<if test="state != null">
state = #{state},
</if>
</set>
where id = #{id}
</update>
<!--通过主键删除-->
<delete id="deleteById">
delete from workflow where id = #{id}
</delete>
</mapper>

View File

@ -180,6 +180,7 @@
<module>ruoyi-quartz</module>
<module>ruoyi-generator</module>
<module>ruoyi-common</module>
<module>management-platform</module>
</modules>
<packaging>pom</packaging>