|
|
|
@@ -7,6 +7,7 @@ |
|
|
|
<result property="name" column="name" jdbcType="VARCHAR"/> |
|
|
|
<result property="workflowId" column="workflow_id" jdbcType="INTEGER"/> |
|
|
|
<result property="globalParam" column="global_param" jdbcType="VARCHAR"/> |
|
|
|
<result property="statusList" column="status_list" jdbcType="VARCHAR"/> |
|
|
|
<result property="description" column="description" jdbcType="VARCHAR"/> |
|
|
|
<result property="createBy" column="create_by" jdbcType="VARCHAR"/> |
|
|
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
|
|
|
@@ -18,7 +19,7 @@ |
|
|
|
<!--查询单个--> |
|
|
|
<select id="queryById" resultMap="ExperimentMap"> |
|
|
|
select |
|
|
|
id, name,workflow_id, global_param, description, create_by, create_time, update_by, update_time, state |
|
|
|
id, name,workflow_id, global_param, status_list,status_list, description, create_by, create_time, update_by, update_time, state |
|
|
|
from experiment |
|
|
|
where id = #{id} and state = 1 |
|
|
|
</select> |
|
|
|
@@ -26,7 +27,7 @@ |
|
|
|
<!--根据experiment查询--> |
|
|
|
<select id="queryByExperiment" resultMap="ExperimentMap"> |
|
|
|
select |
|
|
|
id,name, workflow_id, global_param, description, create_by, create_time, update_by, update_time, state |
|
|
|
id,name, workflow_id, global_param, status_list, description, create_by, create_time, update_by, update_time, state |
|
|
|
from experiment |
|
|
|
<where> |
|
|
|
state = 1 |
|
|
|
@@ -42,6 +43,9 @@ |
|
|
|
<if test="experiment.globalParam != null and experiment.globalParam != ''"> |
|
|
|
and global_param = #{experiment.globalParam} |
|
|
|
</if> |
|
|
|
<if test="experiment.statusList != null and experiment.statusList != ''"> |
|
|
|
status_list = #{experiment.statusList}, |
|
|
|
</if> |
|
|
|
<if test="experiment.description != null and experiment.description != ''"> |
|
|
|
and description = #{experiment.description} |
|
|
|
</if> |
|
|
|
@@ -63,7 +67,7 @@ |
|
|
|
<!--查询指定行数据--> |
|
|
|
<select id="queryAllByLimit" resultMap="ExperimentMap"> |
|
|
|
select |
|
|
|
id,name, workflow_id, global_param, description, create_by, create_time, update_by, update_time, state |
|
|
|
id,name, workflow_id, global_param, status_list, description, create_by, create_time, update_by, update_time, state |
|
|
|
from experiment |
|
|
|
<where> |
|
|
|
state = 1 |
|
|
|
@@ -79,6 +83,9 @@ |
|
|
|
<if test="experiment.globalParam != null and experiment.globalParam != ''"> |
|
|
|
and global_param = #{experiment.globalParam} |
|
|
|
</if> |
|
|
|
<if test="experiment.statusList != null and experiment.statusList != ''"> |
|
|
|
status_list = #{experiment.statusList}, |
|
|
|
</if> |
|
|
|
<if test="experiment.description != null and experiment.description != ''"> |
|
|
|
and description = #{experiment.description} |
|
|
|
</if> |
|
|
|
@@ -117,6 +124,9 @@ |
|
|
|
<if test="experiment.globalParam != null and experiment.globalParam != ''"> |
|
|
|
and global_param = #{experiment.globalParam} |
|
|
|
</if> |
|
|
|
<if test="experiment.statusList != null and experiment.statusList != ''"> |
|
|
|
status_list = #{experiment.statusList}, |
|
|
|
</if> |
|
|
|
<if test="experiment.description != null and experiment.description != ''"> |
|
|
|
and description = #{experiment.description} |
|
|
|
</if> |
|
|
|
@@ -137,24 +147,24 @@ |
|
|
|
|
|
|
|
<!--新增所有列--> |
|
|
|
<insert id="insert" keyProperty="id" useGeneratedKeys="true"> |
|
|
|
insert into experiment(name,workflow_id, global_param, description, create_by, create_time, update_by, update_time, state) |
|
|
|
values (#{name},#{workflowId}, #{globalParam}, #{description}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{state}) |
|
|
|
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}) |
|
|
|
</insert> |
|
|
|
|
|
|
|
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true"> |
|
|
|
insert into experiment(name,workflow_id, global_param, description, create_by, create_time, update_by, update_time, state) |
|
|
|
insert into experiment(name,workflow_id, global_param, status_list, description, create_by, create_time, update_by, update_time, state) |
|
|
|
values |
|
|
|
<foreach collection="entities" item="entity" separator=","> |
|
|
|
(#{entity.name},#{entity.workflowId}, #{entity.globalParam}, #{entity.description}, #{entity.createBy}, #{entity.createTime}, |
|
|
|
(#{entity.name},#{entity.workflowId}, #{entity.globalParam},#{entity.statusList}, #{entity.description}, #{entity.createBy}, #{entity.createTime}, |
|
|
|
#{entity.updateBy}, #{entity.updateTime}, #{entity.state}) |
|
|
|
</foreach> |
|
|
|
</insert> |
|
|
|
|
|
|
|
<insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true"> |
|
|
|
insert into experiment(name,workflow_id, global_param, description, create_by, create_time, update_by, update_time, state) |
|
|
|
insert into experiment(name,workflow_id, global_param, status_list, description, create_by, create_time, update_by, update_time, state) |
|
|
|
values |
|
|
|
<foreach collection="entities" item="entity" separator=","> |
|
|
|
(#{entity.name},#{entity.workflowId}, #{entity.globalParam}, #{entity.description}, #{entity.createBy}, #{entity.createTime}, |
|
|
|
(#{entity.name},#{entity.workflowId}, #{entity.globalParam}, #{entity.statusList}, #{entity.description}, #{entity.createBy}, #{entity.createTime}, |
|
|
|
#{entity.updateBy}, #{entity.updateTime}, #{entity.state}) |
|
|
|
</foreach> |
|
|
|
on duplicate key update |
|
|
|
@@ -182,6 +192,9 @@ |
|
|
|
<if test="globalParam != null and globalParam != ''"> |
|
|
|
global_param = #{globalParam}, |
|
|
|
</if> |
|
|
|
<if test="statusList != null and statusList != ''"> |
|
|
|
status_list = #{statusList}, |
|
|
|
</if> |
|
|
|
<if test="description != null and description != ''"> |
|
|
|
description = #{description}, |
|
|
|
</if> |
|
|
|
|