| @@ -10,6 +10,8 @@ | |||
| <result property="status" column="status" jdbcType="VARCHAR"/> | |||
| <result property="nodesStatus" column="nodes_status" jdbcType="VARCHAR"/> | |||
| <result property="nodesLogs" column="nodes_logs" jdbcType="VARCHAR"/> | |||
| <result property="startTime" column="start_time" jdbcType="TIMESTAMP"/> | |||
| <result property="finishTime" column="finish_time" jdbcType="TIMESTAMP"/> | |||
| <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,21 +23,21 @@ | |||
| <!--查询单个--> | |||
| <select id="queryById" resultMap="ExperimentInsMap"> | |||
| select id, experiment_id, argo_ins_name, argo_ins_ns, status, nodes_status, nodes_logs, create_by, create_time, update_by, update_time, state | |||
| select id, experiment_id, argo_ins_name, argo_ins_ns, status, nodes_status, nodes_logs, start_time, finish_time, create_by, create_time, update_by, update_time, state | |||
| from experiment_ins | |||
| where id = #{id} and state = 1 | |||
| </select> | |||
| <!--查询列表--> | |||
| <select id="getByExperimentId" resultMap="ExperimentInsMap"> | |||
| select id, experiment_id, argo_ins_name, argo_ins_ns, status, nodes_status, nodes_logs, create_by, create_time, update_by, update_time, state | |||
| select id, experiment_id, argo_ins_name, argo_ins_ns, status, nodes_status, nodes_logs, start_time, finish_time, create_by, create_time, update_by, update_time, state | |||
| from experiment_ins | |||
| where experiment_id = #{experiment_id} and state = 1 order by create_time limit 5 | |||
| </select> | |||
| <select id="queryByExperiment" resultMap="ExperimentInsMap"> | |||
| select | |||
| id, experiment_id, argo_ins_name, argo_ins_ns, status, nodes_status, nodes_logs, create_by, create_time, update_by, update_time, state | |||
| id, experiment_id, argo_ins_name, argo_ins_ns, status, nodes_status, nodes_logs, start_time, finish_time, create_by, create_time, update_by, update_time, state | |||
| from experiment_ins | |||
| <where> | |||
| state = 1 | |||
| @@ -60,6 +62,12 @@ | |||
| <if test="experimentIns.nodesLogs != null and experimentIns.nodesLogs != ''"> | |||
| and nodes_logs = #{experimentIns.nodesLogs} | |||
| </if> | |||
| <if test="experimentIns.startTime != null and experimentIns.startTime != ''"> | |||
| and start_time = #{experimentIns.startTime} | |||
| </if> | |||
| <if test="experimentIns.finishTime != null and experimentIns.finishTime != ''"> | |||
| and finish_time = #{experimentIns.finishTime} | |||
| </if> | |||
| <if test="experimentIns.createBy != null and experimentIns.createBy != ''"> | |||
| and create_by = #{experimentIns.createBy} | |||
| </if> | |||
| @@ -78,7 +86,7 @@ | |||
| <!--查询指定行数据--> | |||
| <select id="queryAllByLimit" resultMap="ExperimentInsMap"> | |||
| select | |||
| id, experiment_id, argo_ins_name, argo_ins_ns, status, nodes_status, nodes_logs, create_by, create_time, update_by, update_time, state | |||
| id, experiment_id, argo_ins_name, argo_ins_ns, status, nodes_status, nodes_logs, start_time, finish_time, create_by, create_time, update_by, update_time, state | |||
| from experiment_ins | |||
| <where> | |||
| state = 1 | |||
| @@ -103,6 +111,12 @@ | |||
| <if test="experimentIns.nodesLogs != null and experimentIns.nodesLogs != ''"> | |||
| and nodes_logs = #{experimentIns.nodesLogs} | |||
| </if> | |||
| <if test="experimentIns.startTime != null and experimentIns.startTime != ''"> | |||
| and start_time = #{experimentIns.startTime} | |||
| </if> | |||
| <if test="experimentIns.finishTime != null and experimentIns.finishTime != ''"> | |||
| and finish_time = #{experimentIns.finishTime} | |||
| </if> | |||
| <if test="experimentIns.createBy != null and experimentIns.createBy != ''"> | |||
| and create_by = #{experimentIns.createBy} | |||
| </if> | |||
| @@ -147,6 +161,12 @@ | |||
| <if test="experimentIns.nodesLogs != null and experimentIns.nodesLogs != ''"> | |||
| and nodes_logs = #{experimentIns.nodesLogs} | |||
| </if> | |||
| <if test="experimentIns.startTime != null and experimentIns.startTime != ''"> | |||
| and start_time = #{experimentIns.startTime} | |||
| </if> | |||
| <if test="experimentIns.finishTime != null and experimentIns.finishTime != ''"> | |||
| and finish_time = #{experimentIns.finishTime} | |||
| </if> | |||
| <if test="experimentIns.createBy != null and experimentIns.createBy != ''"> | |||
| and create_by = #{experimentIns.createBy} | |||
| </if> | |||
| @@ -164,25 +184,25 @@ | |||
| <!--新增所有列--> | |||
| <insert id="insert" keyProperty="id" useGeneratedKeys="true"> | |||
| insert into experiment_ins(experiment_id,argo_ins_name,argo_ins_ns,status,nodes_status,nodes_logs,create_by,create_time,update_by,update_time,state) | |||
| values (#{experimentIns.experimentId},#{experimentIns.argoInsName},#{experimentIns.argoInsNs},#{experimentIns.status},#{experimentIns.nodesStatus},#{experimentIns.nodesLogs},#{experimentIns.createBy},#{experimentIns.createTime},#{experimentIns.updateBy},#{experimentIns.updateTime},#{experimentIns.state}) | |||
| insert into experiment_ins(experiment_id,argo_ins_name,argo_ins_ns,status,nodes_status,nodes_logs,start_time,finish_time,create_by,create_time,update_by,update_time,state) | |||
| values (#{experimentIns.experimentId},#{experimentIns.argoInsName},#{experimentIns.argoInsNs},#{experimentIns.status},#{experimentIns.nodesStatus},#{experimentIns.nodesLogs},#{experimentIns.startTime},#{experimentIns.finishTime},#{experimentIns.createBy},#{experimentIns.createTime},#{experimentIns.updateBy},#{experimentIns.updateTime},#{experimentIns.state}) | |||
| </insert> | |||
| <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true"> | |||
| insert into | |||
| experiment_ins(experiment_id,argo_ins_name,argo_ins_ns,status,nodes_status,nodes_logs,create_by,create_time,update_by,update_time,state) | |||
| experiment_ins(experiment_id,argo_ins_name,argo_ins_ns,status,nodes_status,nodes_logs,start_time,finish_time,create_by,create_time,update_by,update_time,state) | |||
| values | |||
| <foreach collection="entities" item="entity" separator=","> | |||
| (#{entity.experimentId},#{entity.argoInsName},#{entity.argoInsNs},#{entity.status},#{entity.nodesStatus},#{entity.nodesLogs},#{entity.createBy},#{entity.createTime},#{entity.updateBy},#{entity.updateTime},#{entity.state}) | |||
| (#{entity.experimentId},#{entity.argoInsName},#{entity.argoInsNs},#{entity.status},#{entity.nodesStatus},#{entity.nodesLogs},#{entity.startTime},#{entity.finishTime},#{entity.createBy},#{entity.createTime},#{entity.updateBy},#{entity.updateTime},#{entity.state}) | |||
| </foreach> | |||
| </insert> | |||
| <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true"> | |||
| insert into | |||
| experiment_ins(experiment_id,argo_ins_name,argo_ins_ns,status,nodes_status,create_by,create_time,update_by,update_time,state) | |||
| experiment_ins(experiment_id,argo_ins_name,argo_ins_ns,status,nodes_status,start_time,finish_time,create_by,create_time,update_by,update_time,state) | |||
| values | |||
| <foreach collection="entities" item="entity" separator=","> | |||
| (#{entity.experimentId},#{entity.argoInsName},#{entity.argoInsNs},#{entity.status},#{entity.nodesStatus},#{entity.nodesLogs},#{entity.createBy},#{entity.createTime},#{entity.updateBy},#{entity.updateTime},#{entity.state}) | |||
| (#{entity.experimentId},#{entity.argoInsName},#{entity.argoInsNs},#{entity.status},#{entity.nodesStatus},#{entity.startTime},#{entity.finishTime},#{entity.createBy},#{entity.createTime},#{entity.updateBy},#{entity.updateTime},#{entity.state}) | |||
| </foreach> | |||
| on duplicate key update | |||
| experiment_id = values(experiment_id)argo_ins_name = values(argo_ins_name)argo_ins_ns = | |||
| @@ -211,6 +231,12 @@ | |||
| <if test="experimentIns.nodesLogs != null and experimentIns.nodesLogs != ''"> | |||
| nodes_logs = #{experimentIns.nodesLogs}, | |||
| </if> | |||
| <if test="experimentIns.startTime != null and experimentIns.startTime != ''"> | |||
| start_time = #{experimentIns.startTime}, | |||
| </if> | |||
| <if test="experimentIns.finishTime != null and experimentIns.finishTime != ''"> | |||
| finish_time = #{experimentIns.finishTime}, | |||
| </if> | |||
| <if test="experimentIns.createBy != null and experimentIns.createBy != ''"> | |||
| create_by = #{experimentIns.createBy}, | |||
| </if> | |||