Browse Source

查询实验实例返回实验名称字段

dev-lhz
chenzhihang 1 year ago
parent
commit
83c289713f
2 changed files with 47 additions and 8 deletions
  1. +23
    -5
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/ExperimentIns.java
  2. +24
    -3
      ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/ExperimentInsDaoMapper.xml

+ 23
- 5
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/ExperimentIns.java View File

@@ -1,5 +1,6 @@
package com.ruoyi.platform.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonRawValue;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
@@ -74,10 +75,11 @@ public class ExperimentIns implements Serializable {
private Integer state;



@ApiModelProperty(value = "实验实例对应的流水线ID")
private Long workflowId;

@TableField(exist = false)
private String experimentName;

public ExperimentIns() {
}
@@ -160,13 +162,17 @@ public class ExperimentIns implements Serializable {
this.startTime = startTime;
}

public Date getStartTime() {return startTime;}
public Date getStartTime() {
return startTime;
}

public void setFinishTime(Date finishTime) {
this.finishTime = finishTime;
}

public Date getFinishTime() {return finishTime;}
public Date getFinishTime() {
return finishTime;
}


public String getCreateBy() {
@@ -209,9 +215,13 @@ public class ExperimentIns implements Serializable {
this.state = state;
}

public Long getWorkflowId() {return workflowId;}
public Long getWorkflowId() {
return workflowId;
}

public void setWorkflowId(Long workflowId) {this.workflowId = workflowId;}
public void setWorkflowId(Long workflowId) {
this.workflowId = workflowId;
}

public String getMetricRecord() {
return metricRecord;
@@ -220,5 +230,13 @@ public class ExperimentIns implements Serializable {
public void setMetricRecord(String metricRecord) {
this.metricRecord = metricRecord;
}

public String getExperimentName() {
return experimentName;
}

public void setExperimentName(String experimentName) {
this.experimentName = experimentName;
}
}


+ 24
- 3
ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/ExperimentInsDaoMapper.xml View File

@@ -20,6 +20,7 @@
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
<result property="state" column="state" jdbcType="INTEGER"/>
<result property="experimentName" column="experiment_name" jdbcType="VARCHAR"/>
</resultMap>

<!--查询非终止态的实例-->
@@ -32,9 +33,29 @@

<!--查询单个-->
<select id="queryById" resultMap="ExperimentInsMap">
select id, experiment_id, argo_ins_name, argo_ins_ns, status, nodes_status,nodes_result, nodes_logs,global_param,metric_record, start_time, finish_time, create_by, create_time, update_by, update_time, state
from experiment_ins
where id = #{id} and state = 1
select a.id,
experiment_id,
argo_ins_name,
argo_ins_ns,
status,
nodes_status,
nodes_result,
nodes_logs,
a.global_param,
metric_record,
start_time,
finish_time,
a.create_by,
a.create_time,
a.update_by,
a.update_time,
a.state,
b.name experiment_name
from experiment_ins a,
experiment b
where a.experiment_id = b.id
and a.id = #{id}
and a.state = 1
</select>

<!--查询列表-->


Loading…
Cancel
Save