Merge remote-tracking branch 'origin/dev' into dev

# Conflicts:
#	ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/ModelDependency.java
This commit is contained in:
fanshuai 2024-05-31 09:55:57 +08:00
commit 1e5ab63d9e
2 changed files with 162 additions and 9 deletions

View File

@ -2,7 +2,6 @@ package com.ruoyi.platform.domain;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import lombok.Data;
import java.util.Date;
import java.io.Serializable;
@ -13,7 +12,6 @@ import java.io.Serializable;
* @author Xidaray
* @since 2024-05-29 13:51:23
*/
@Data
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
public class ModelDependency implements Serializable {
private static final long serialVersionUID = -86753423714028539L;
@ -25,9 +23,14 @@ public class ModelDependency implements Serializable {
* 当前模型id
*/
private Integer currentModelId;
/**
* 实验实例id
*/
private Integer expInsId;
private String version;
/**
/**
* 父模型
*/
private String parentModels;
@ -52,6 +55,10 @@ public class ModelDependency implements Serializable {
*/
private String projectDependency;
/**
* 版本
*/
private String version;
/**
@ -75,5 +82,127 @@ public class ModelDependency implements Serializable {
*/
private Integer state;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getCurrentModelId() {
return currentModelId;
}
public void setCurrentModelId(Integer currentModelId) {
this.currentModelId = currentModelId;
}
public Integer getExpInsId() {
return expInsId;
}
public void setExpInsId(Integer expInsId) {
this.expInsId = expInsId;
}
public String getParentModels() {
return parentModels;
}
public void setParentModels(String parentModels) {
this.parentModels = parentModels;
}
public String getRefItem() {
return refItem;
}
public void setRefItem(String refItem) {
this.refItem = refItem;
}
public String getTrainTask() {
return trainTask;
}
public void setTrainTask(String trainTask) {
this.trainTask = trainTask;
}
public String getTrainDataset() {
return trainDataset;
}
public void setTrainDataset(String trainDataset) {
this.trainDataset = trainDataset;
}
public String getTestDataset() {
return testDataset;
}
public void setTestDataset(String testDataset) {
this.testDataset = testDataset;
}
public String getProjectDependency() {
return projectDependency;
}
public void setProjectDependency(String projectDependency) {
this.projectDependency = projectDependency;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
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

@ -5,12 +5,14 @@
<resultMap type="com.ruoyi.platform.domain.ModelDependency" id="ModelDependencyMap">
<result property="id" column="id" jdbcType="INTEGER"/>
<result property="currentModelId" column="current_model_id" jdbcType="INTEGER"/>
<result property="expInsId" column="exp_ins_id" jdbcType="INTEGER"/>
<result property="parentModels" column="parent_models" jdbcType="VARCHAR"/>
<result property="refItem" column="ref_item" jdbcType="VARCHAR"/>
<result property="trainTask" column="train_task" jdbcType="VARCHAR"/>
<result property="trainDataset" column="train_dataset" jdbcType="VARCHAR"/>
<result property="testDataset" column="test_dataset" jdbcType="VARCHAR"/>
<result property="projectDependency" column="project_dependency" jdbcType="VARCHAR"/>
<result property="version" column="version" 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"/>
@ -21,7 +23,7 @@
<!--查询单个-->
<select id="queryById" resultMap="ModelDependencyMap">
select
id,current_model_id,parent_models,ref_item,train_task,train_dataset,test_dataset,project_dependency,create_by,create_time,update_by,update_time,state
id,current_model_id,expInsId,parent_models,ref_item,train_task,train_dataset,test_dataset,project_dependency,version,create_by,create_time,update_by,update_time,state
from model_dependency
where id = #{id}
</select>
@ -29,7 +31,7 @@
<!--查询指定行数据-->
<select id="queryAllByLimit" resultMap="ModelDependencyMap">
select
id,current_model_id,parent_models,ref_item,train_task,train_dataset,test_dataset,project_dependency,create_by,create_time,update_by,update_time,state
id,current_model_id,expInsId,parent_models,ref_item,train_task,train_dataset,test_dataset,project_dependency,version,create_by,create_time,update_by,update_time,state
from model_dependency
<where>
<if test="modelDependency.id != null">
@ -38,6 +40,9 @@
<if test="modelDependency.currentModelId != null">
and current_model_id = #{modelDependency.currentModelId}
</if>
<if test="modelDependency.expInsId != null">
and exp_ins_id = #{modelDependency.expInsId}
</if>
<if test="modelDependency.parentModels != null">
and parent_models = #{modelDependency.parentModels}
</if>
@ -56,6 +61,9 @@
<if test="modelDependency.projectDependency != null and modelDependency.projectDependency != ''">
and project_dependency = #{modelDependency.projectDependency}
</if>
<if test="modelDependency.version != null and modelDependency.version != ''">
and version = #{modelDependency.version}
</if>
<if test="modelDependency.createBy != null and modelDependency.createBy != ''">
and create_by = #{modelDependency.createBy}
</if>
@ -86,6 +94,9 @@
<if test="modelDependency.currentModelId != null">
and current_model_id = #{modelDependency.currentModelId}
</if>
<if test="modelDependency.expInsId != null">
and exp_ins_id = #{modelDependency.expInsId}
</if>
<if test="modelDependency.parentModels != null">
and parent_models = #{modelDependency.parentModels}
</if>
@ -104,6 +115,9 @@
<if test="modelDependency.projectDependency != null and modelDependency.projectDependency != ''">
and project_dependency = #{modelDependency.projectDependency}
</if>
<if test="modelDependency.version != null and modelDependency.version != ''">
and version = #{modelDependency.version}
</if>
<if test="modelDependency.createBy != null and modelDependency.createBy != ''">
and create_by = #{modelDependency.createBy}
</if>
@ -124,19 +138,21 @@
<!--新增所有列-->
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
insert into model_dependency (current_model_id, parent_models, ref_item, train_task, train_dataset, test_dataset, project_dependency, create_by, create_time, update_by, update_time, state)
values (#{modelDependency.currentModelId}, #{modelDependency.parentModels}, #{modelDependency.refItem}, #{modelDependency.trainTask}, #{modelDependency.trainDataset}, #{modelDependency.testDataset}, #{modelDependency.projectDependency}, #{modelDependency.createBy}, #{modelDependency.createTime}, #{modelDependency.updateBy}, #{modelDependency.updateTime}, #{modelDependency.state})
insert into model_dependency (current_model_id,expInsId, parent_models, ref_item, train_task, train_dataset, test_dataset, project_dependency,version, create_by, create_time, update_by, update_time, state)
values (#{modelDependency.currentModelId}, #{modelDependency.expInsId},#{modelDependency.parentModels}, #{modelDependency.refItem}, #{modelDependency.trainTask}, #{modelDependency.trainDataset}, #{modelDependency.testDataset}, #{modelDependency.projectDependency},#{modelDependency.version}, #{modelDependency.createBy}, #{modelDependency.createTime}, #{modelDependency.updateBy}, #{modelDependency.updateTime}, #{modelDependency.state})
</insert>
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
insert into model_dependency (
current_model_id,
expInsId,
parent_models,
ref_item,
train_task,
train_dataset,
test_dataset,
project_dependency,
version,
create_by,
create_time,
update_by,
@ -147,12 +163,14 @@
<foreach collection="entities" item="entity" separator=",">
(
#{entity.currentModelId},
#{entity.expInsId},
#{entity.parentModels},
#{entity.refItem},
#{entity.trainTask},
#{entity.trainDataset},
#{entity.testDataset},
#{projectDependency},
#{entity.projectDependency},
#{entity.version},
#{entity.createBy},
#{entity.createTime},
#{entity.updateBy},
@ -180,6 +198,9 @@ current_model_id = values(current_model_id)parent_models = values(parent_models)
<if test="modelDependency.currentModelId != null">
current_model_id = #{modelDependency.currentModelId},
</if>
<if test="modelDependency.expInsId != null">
exp_ins_id = #{modelDependency.expInsId},
</if>
<if test="modelDependency.parentModels != null">
parent_models = #{modelDependency.parentModels},
</if>
@ -198,6 +219,9 @@ current_model_id = values(current_model_id)parent_models = values(parent_models)
<if test="modelDependency.projectDependency != null and modelDependency.projectDependency != ''">
project_dependency = #{modelDependency.projectDependency},
</if>
<if test="modelDependency.version != null and modelDependency.version != ''">
version = #{modelDependency.version},
</if>
<if test="modelDependency.createBy != null and modelDependency.createBy != ''">
create_by = #{modelDependency.createBy},
</if>