模型依赖增加字段

This commit is contained in:
西大锐 2024-05-31 09:48:02 +08:00
parent 12b91800b9
commit 12effaf354
2 changed files with 58 additions and 6 deletions

View File

@ -23,7 +23,14 @@ public class ModelDependency implements Serializable {
* 当前模型id
*/
private Integer currentModelId;
/**
/**
* 实验实例id
*/
private Integer expInsId;
/**
* 父模型
*/
private String parentModels;
@ -48,6 +55,10 @@ public class ModelDependency implements Serializable {
*/
private String projectDependency;
/**
* 版本
*/
private String version;
/**
@ -88,6 +99,14 @@ public class ModelDependency implements Serializable {
this.currentModelId = currentModelId;
}
public Integer getExpInsId() {
return expInsId;
}
public void setExpInsId(Integer expInsId) {
this.expInsId = expInsId;
}
public String getParentModels() {
return parentModels;
}
@ -136,6 +155,15 @@ public class ModelDependency implements Serializable {
this.projectDependency = projectDependency;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public String getCreateBy() {
return createBy;
}

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>