Browse Source

模型依赖字段修改

pull/56/head
西大锐 1 year ago
parent
commit
7ac6a37a36
2 changed files with 22 additions and 22 deletions
  1. +6
    -6
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/ModelDependency.java
  2. +16
    -16
      ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/ModelDependencyDaoMapper.xml

+ 6
- 6
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/ModelDependency.java View File

@@ -24,9 +24,9 @@ public class ModelDependency implements Serializable {
*/ */
private Integer currentModelId; private Integer currentModelId;
/** /**
* 父模型id
* 父模型
*/ */
private Integer parentModelId;
private String parentModels;
/** /**
* 引用项目 * 引用项目
*/ */
@@ -88,12 +88,12 @@ public class ModelDependency implements Serializable {
this.currentModelId = currentModelId; this.currentModelId = currentModelId;
} }


public Integer getParentModelId() {
return parentModelId;
public String getParentModels() {
return parentModels;
} }


public void setParentModelId(Integer parentModelId) {
this.parentModelId = parentModelId;
public void setParentModels(String parentModels) {
this.parentModels = parentModels;
} }


public String getRefItem() { public String getRefItem() {


+ 16
- 16
ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/ModelDependencyDaoMapper.xml View File

@@ -5,7 +5,7 @@
<resultMap type="com.ruoyi.platform.domain.ModelDependency" id="ModelDependencyMap"> <resultMap type="com.ruoyi.platform.domain.ModelDependency" id="ModelDependencyMap">
<result property="id" column="id" jdbcType="INTEGER"/> <result property="id" column="id" jdbcType="INTEGER"/>
<result property="currentModelId" column="current_model_id" jdbcType="INTEGER"/> <result property="currentModelId" column="current_model_id" jdbcType="INTEGER"/>
<result property="parentModelId" column="parent_model_id" jdbcType="INTEGER"/>
<result property="parentModels" column="parent_models" jdbcType="VARCHAR"/>
<result property="refItem" column="ref_item" jdbcType="VARCHAR"/> <result property="refItem" column="ref_item" jdbcType="VARCHAR"/>
<result property="trainTask" column="train_task" jdbcType="VARCHAR"/> <result property="trainTask" column="train_task" jdbcType="VARCHAR"/>
<result property="trainDataset" column="train_dataset" jdbcType="VARCHAR"/> <result property="trainDataset" column="train_dataset" jdbcType="VARCHAR"/>
@@ -21,7 +21,7 @@
<!--查询单个--> <!--查询单个-->
<select id="queryById" resultMap="ModelDependencyMap"> <select id="queryById" resultMap="ModelDependencyMap">
select select
id,current_model_id,parent_model_id,ref_item,train_task,train_dataset,test_dataset,project_dependency,create_by,create_time,update_by,update_time,state
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
from model_dependency from model_dependency
where id = #{id} where id = #{id}
</select> </select>
@@ -29,7 +29,7 @@
<!--查询指定行数据--> <!--查询指定行数据-->
<select id="queryAllByLimit" resultMap="ModelDependencyMap"> <select id="queryAllByLimit" resultMap="ModelDependencyMap">
select select
id,current_model_id,parent_model_id,ref_item,train_task,train_dataset,test_dataset,project_dependency,create_by,create_time,update_by,update_time,state
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
from model_dependency from model_dependency
<where> <where>
<if test="modelDependency.id != null"> <if test="modelDependency.id != null">
@@ -38,8 +38,8 @@
<if test="modelDependency.currentModelId != null"> <if test="modelDependency.currentModelId != null">
and current_model_id = #{modelDependency.currentModelId} and current_model_id = #{modelDependency.currentModelId}
</if> </if>
<if test="modelDependency.parentModelId != null">
and parent_model_id = #{modelDependency.parentModelId}
<if test="modelDependency.parentModels != null">
and parent_models = #{modelDependency.parentModels}
</if> </if>
<if test="modelDependency.refItem != null and modelDependency.refItem != ''"> <if test="modelDependency.refItem != null and modelDependency.refItem != ''">
and ref_item = #{modelDependency.refItem} and ref_item = #{modelDependency.refItem}
@@ -86,8 +86,8 @@
<if test="modelDependency.currentModelId != null"> <if test="modelDependency.currentModelId != null">
and current_model_id = #{modelDependency.currentModelId} and current_model_id = #{modelDependency.currentModelId}
</if> </if>
<if test="modelDependency.parentModelId != null">
and parent_model_id = #{modelDependency.parentModelId}
<if test="modelDependency.parentModels != null">
and parent_models = #{modelDependency.parentModels}
</if> </if>
<if test="modelDependency.refItem != null and modelDependency.refItem != ''"> <if test="modelDependency.refItem != null and modelDependency.refItem != ''">
and ref_item = #{modelDependency.refItem} and ref_item = #{modelDependency.refItem}
@@ -126,7 +126,7 @@
<insert id="insert" keyProperty="id" useGeneratedKeys="true"> <insert id="insert" keyProperty="id" useGeneratedKeys="true">
insert into model_dependency ( insert into model_dependency (
current_model_id, current_model_id,
parent_model_id,
parent_models,
ref_item, ref_item,
train_task, train_task,
train_dataset, train_dataset,
@@ -140,7 +140,7 @@
) )
values ( values (
#{currentModelId}, #{currentModelId},
#{parentModelId},
#{parentModels},
#{refItem}, #{refItem},
#{trainTask}, #{trainTask},
#{trainDataset}, #{trainDataset},
@@ -158,7 +158,7 @@
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true"> <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
insert into model_dependency ( insert into model_dependency (
current_model_id, current_model_id,
parent_model_id,
parent_models,
ref_item, ref_item,
train_task, train_task,
train_dataset, train_dataset,
@@ -174,7 +174,7 @@
<foreach collection="entities" item="entity" separator=","> <foreach collection="entities" item="entity" separator=",">
( (
#{entity.currentModelId}, #{entity.currentModelId},
#{entity.parentModelId},
#{entity.parentModels},
#{entity.refItem}, #{entity.refItem},
#{entity.trainTask}, #{entity.trainTask},
#{entity.trainDataset}, #{entity.trainDataset},
@@ -191,13 +191,13 @@




<insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true"> <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
insert into model_dependency(current_model_idparent_model_idref_itemtrain_tasktrain_datasettest_datasetcreate_bycreate_timeupdate_byupdate_timestate)
insert into model_dependency(current_model_idparent_modelsref_itemtrain_tasktrain_datasettest_datasetcreate_bycreate_timeupdate_byupdate_timestate)
values values
<foreach collection="entities" item="entity" separator=","> <foreach collection="entities" item="entity" separator=",">
(#{entity.currentModelId}#{entity.parentModelId}#{entity.refItem}#{entity.trainTask}#{entity.trainDataset}#{entity.testDataset}#{entity.createBy}#{entity.createTime}#{entity.updateBy}#{entity.updateTime}#{entity.state})
(#{entity.currentModelId}#{entity.parentModels}#{entity.refItem}#{entity.trainTask}#{entity.trainDataset}#{entity.testDataset}#{entity.createBy}#{entity.createTime}#{entity.updateBy}#{entity.updateTime}#{entity.state})
</foreach> </foreach>
on duplicate key update on duplicate key update
current_model_id = values(current_model_id)parent_model_id = values(parent_model_id)ref_item = values(ref_item)train_task = values(train_task)train_dataset = values(train_dataset)test_dataset = values(test_dataset)create_by = values(create_by)create_time = values(create_time)update_by = values(update_by)update_time = values(update_time)state = values(state)
current_model_id = values(current_model_id)parent_models = values(parent_models)ref_item = values(ref_item)train_task = values(train_task)train_dataset = values(train_dataset)test_dataset = values(test_dataset)create_by = values(create_by)create_time = values(create_time)update_by = values(update_by)update_time = values(update_time)state = values(state)
</insert> </insert>


<!--通过主键修改数据--> <!--通过主键修改数据-->
@@ -207,8 +207,8 @@ current_model_id = values(current_model_id)parent_model_id = values(parent_model
<if test="modelDependency.currentModelId != null"> <if test="modelDependency.currentModelId != null">
current_model_id = #{modelDependency.currentModelId}, current_model_id = #{modelDependency.currentModelId},
</if> </if>
<if test="modelDependency.parentModelId != null">
parent_model_id = #{modelDependency.parentModelId},
<if test="modelDependency.parentModels != null">
parent_models = #{modelDependency.parentModels},
</if> </if>
<if test="modelDependency.refItem != null and modelDependency.refItem != ''"> <if test="modelDependency.refItem != null and modelDependency.refItem != ''">
ref_item = #{modelDependency.refItem}, ref_item = #{modelDependency.refItem},


Loading…
Cancel
Save