Browse Source

新增tag

pull/7/head
fanshuai 1 year ago
parent
commit
59239df2e1
5 changed files with 59 additions and 18 deletions
  1. +9
    -0
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/Dataset.java
  2. +11
    -0
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/Models.java
  3. +19
    -9
      ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/DatasetDaoMapper.xml
  4. +1
    -1
      ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/ExperimentDaoMapper.xml
  5. +19
    -8
      ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/ModelsDaoMapper.xml

+ 9
- 0
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/Dataset.java View File

@@ -26,6 +26,8 @@ public class Dataset implements Serializable {

@ApiModelProperty(name = "data_type")
private Integer dataType;
@ApiModelProperty(name = "data_tag")
private Integer dataTag;
/**
* 创建者
*/
@@ -100,6 +102,13 @@ public class Dataset implements Serializable {
public void setDataType(Integer dataType) {
this.dataType = dataType;
}
public Integer getDataTag() {
return dataTag;
}

public void setDataTag(Integer dataTag) {
this.dataTag = dataTag;
}

public String getCreateBy() {
return createBy;


+ 11
- 0
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/Models.java View File

@@ -28,6 +28,8 @@ public class Models implements Serializable {
// private String url;
@ApiModelProperty(name = "model_type")
private Integer modelType;
@ApiModelProperty(name = "model_tag")
private Integer modelTag;
/**
* 创建者
*/
@@ -103,6 +105,15 @@ public class Models implements Serializable {
this.modelType = modelType;
}

public Integer getModelTag() {
return modelTag;
}

public void setModelTag(Integer modelTag) {
this.modelTag = modelTag;
}


public String getCreateBy() {
return createBy;
}


+ 19
- 9
ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/DatasetDaoMapper.xml View File

@@ -7,6 +7,7 @@
<result property="name" column="name" jdbcType="VARCHAR"/>
<result property="description" column="description" jdbcType="VARCHAR"/>
<result property="dataType" column="data_type" jdbcType="INTEGER"/>
<result property="dataTag" column="data_tag" 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"/>
@@ -17,7 +18,7 @@
<!--查询单个-->
<select id="queryById" resultMap="DatasetMap">
select
id,name,description,data_type,create_by,create_time,update_by,update_time,state
id,name,description,data_type,data_tag,create_by,create_time,update_by,update_time,state
from dataset
where id = #{id} and state = 1
</select>
@@ -25,7 +26,7 @@
<!--查询指定行数据-->
<select id="queryAllByLimit" resultMap="DatasetMap">
select
id,name,description,data_type,create_by,create_time,update_by,update_time,state
id,name,description,data_type,data_tag,create_by,create_time,update_by,update_time,state
from dataset
<where>
state = 1
@@ -41,6 +42,9 @@
<if test="dataset.dataType != null">
and data_type = #{dataset.dataType}
</if>
<if test="dataset.dataTag != null">
and data_tag = #{dataset.dataTag}
</if>
<if test="dataset.createBy != null and dataset.createBy != ''">
and create_by = #{dataset.createBy}
</if>
@@ -78,6 +82,9 @@
<if test="dataset.dataType != null">
and data_type = #{dataset.dataType}
</if>
<if test="dataset.dataTag != null">
and data_tag = #{dataset.dataTag}
</if>
<if test="dataset.createBy != null and dataset.createBy != ''">
and create_by = #{dataset.createBy}
</if>
@@ -98,26 +105,26 @@

<!--新增所有列-->
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
insert into dataset(name,description,data_type,create_by,create_time,update_by,update_time,state)
values (#{dataset.name},#{dataset.description},#{dataset.dataType},#{dataset.createBy},#{dataset.createTime},#{dataset.updateBy},#{dataset.updateTime},#{dataset.state})
insert into dataset(name,description,data_type,data_tag,create_by,create_time,update_by,update_time,state)
values (#{dataset.name},#{dataset.description},#{dataset.dataType},#{dataset.dataTag},#{dataset.createBy},#{dataset.createTime},#{dataset.updateBy},#{dataset.updateTime},#{dataset.state})
</insert>

<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
insert into dataset(name,description,data_type,create_by,create_time,update_by,update_time,state)
insert into dataset(name,description,data_type,data_tag,create_by,create_time,update_by,update_time,state)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.name}#{entity.description}#{entity.dataType}#{entity.createBy}#{entity.createTime}#{entity.updateBy}#{entity.updateTime}#{entity.state})
(#{entity.name}#{entity.description}#{entity.dataType}#{entity.dataTag}#{entity.createBy}#{entity.createTime}#{entity.updateBy}#{entity.updateTime}#{entity.state})
</foreach>
</insert>

<insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
insert into dataset(name,description,data_type,create_by,create_time,update_by,update_time,state)
insert into dataset(name,description,data_type,data_tag,create_by,create_time,update_by,update_time,state)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.name}#{entity.description}#{entity.dataType}#{entity.createBy}#{entity.createTime}#{entity.updateBy}#{entity.updateTime}#{entity.state})
(#{entity.name}#{entity.description}#{entity.dataType}#{entity.dataTag}#{entity.createBy}#{entity.createTime}#{entity.updateBy}#{entity.updateTime}#{entity.state})
</foreach>
on duplicate key update
name = values(name)description = values(description)data_type = values(data_type)create_by = values(create_by)create_time = values(create_time)update_by = values(update_by)update_time = values(update_time)state = values(state)
name = values(name)description = values(description)data_type = values(data_type)data_tag = values(data_tag)create_by = values(create_by)create_time = values(create_time)update_by = values(update_by)update_time = values(update_time)state = values(state)
</insert>

<!--通过主键修改数据-->
@@ -133,6 +140,9 @@
<if test="dataset.dataType != null">
data_type = #{dataset.dataType},
</if>
<if test="dataset.dataTag != null">
and data_tag = #{dataset.dataTag}
</if>
<if test="dataset.createBy != null and dataset.createBy != ''">
create_by = #{dataset.createBy},
</if>


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

@@ -148,7 +148,7 @@
<!--新增所有列-->
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
insert into experiment(name,workflow_id, global_param, status_list, description, create_by, create_time, update_by, update_time, state)
values (#{name},#{workflowId}, #{globalParam},#{statusList}, #{description}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{state})
values (#{experiment.name},#{experiment.workflowId}, #{experiment.globalParam},#{experiment.statusList}, #{experiment.description}, #{experiment.createBy}, #{experiment.createTime}, #{experiment.updateBy}, #{experiment.updateTime}, #{experiment.state})
</insert>

<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">


+ 19
- 8
ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/ModelsDaoMapper.xml View File

@@ -7,6 +7,7 @@
<result property="name" column="name" jdbcType="VARCHAR"/>
<result property="description" column="description" jdbcType="VARCHAR"/>
<result property="modelType" column="model_type" jdbcType="INTEGER"/>
<result property="modelTag" column="model_tag" 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"/>
@@ -17,7 +18,7 @@
<!--查询单个-->
<select id="queryById" resultMap="ModelsMap">
select
id, name, description, model_type, create_by, create_time, update_by, update_time, state
id, name, description, model_type,model_tag, create_by, create_time, update_by, update_time, state
from models
where id = #{id} and state = 1
</select>
@@ -25,7 +26,7 @@
<!--查询指定行数据-->
<select id="queryAllByLimit" resultMap="ModelsMap">
select
id, name, description, model_type, create_by, create_time, update_by, update_time, state
id, name, description, model_type,model_tag, create_by, create_time, update_by, update_time, state
from models
<where>
state = 1
@@ -41,6 +42,9 @@
<if test="models.modelType != null">
and model_type = #{models.modelType}
</if>
<if test="models.modelTag != null">
and model_tag = #{models.modelTag}
</if>
<if test="models.createBy != null and models.createBy != ''">
and create_by = #{models.createBy}
</if>
@@ -78,6 +82,9 @@
<if test="models.modelType != null">
and model_type = #{models.modelType}
</if>
<if test="models.modelTag != null">
and model_tag = #{models.modelTag}
</if>
<if test="models.createBy != null and models.createBy != ''">
and create_by = #{models.createBy}
</if>
@@ -98,28 +105,29 @@

<!--新增所有列-->
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
insert into models(name, description, model_type, create_by, create_time, update_by, update_time, state)
values (#{models.name}, #{models.description}, #{models.modelType}, #{models.createBy}, #{models.createTime}, #{models.updateBy}, #{models.updateTime}, #{models.state})
insert into models(name, description, model_type,model_tag, create_by, create_time, update_by, update_time, state)
values (#{models.name}, #{models.description}, #{models.modelType}, #{models.modelTag}, #{models.createBy}, #{models.createTime}, #{models.updateBy}, #{models.updateTime}, #{models.state})
</insert>

<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
insert into models(name, description, model_type, create_by, create_time, update_by, update_time, state)
insert into models(name, description, model_type,model_tag, create_by, create_time, update_by, update_time, state)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.name}, #{entity.description}, #{entity.modelType}, #{entity.createBy}, #{entity.createTime}, #{entity.updateBy}, #{entity.updateTime}, #{entity.state})
(#{entity.name}, #{entity.description}, #{entity.modelType}, #{entity.modelTag}, #{entity.createBy}, #{entity.createTime}, #{entity.updateBy}, #{entity.updateTime}, #{entity.state})
</foreach>
</insert>

<insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
insert into models(name, description, model_type, create_by, create_time, update_by, update_time, state)
insert into models(name, description, model_type,model_tag, create_by, create_time, update_by, update_time, state)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.name}, #{entity.description}, #{entity.modelType}, #{entity.createBy}, #{entity.createTime}, #{entity.updateBy}, #{entity.updateTime}, #{entity.state})
(#{entity.name}, #{entity.description}, #{entity.modelType}, #{entity.modelTag}, #{entity.createBy}, #{entity.createTime}, #{entity.updateBy}, #{entity.updateTime}, #{entity.state})
</foreach>
on duplicate key update
name = values(name),
description = values(description),
model_type = values(model_type),
model_tag = values(model_tag),
create_by = values(create_by),
create_time = values(create_time),
update_by = values(update_by),
@@ -140,6 +148,9 @@
<if test="models.modelType != null">
model_type = #{models.modelType},
</if>
<if test="models.modelTag != null">
model_tag = #{models.modelTag},
</if>
<if test="models.createBy != null and models.createBy != ''">
create_by = #{models.createBy},
</if>


Loading…
Cancel
Save