select algo.`id`, algo.`type`, algo.sub_type_id, algo.`name`, algo.`status`, algo.error, algo.start_time, algo.completed_time, algo.cost_second, algo.create_by, algo.create_time, algo.update_by, algo.update_time, algo.remark, sub.name as sub_name from t_algorithm as algo left join t_algorithm_sub_type as sub on algo.sub_type_id = sub.id
insert into t_algorithm
`type`,sub_type_id,`name`,status,error,start_time,completed_time,cost_second,create_by,create_time,update_by,update_time,remark,#{type},#{subTypeId},#{name},#{status},#{error},#{startTime},#{completedTime},#{costSecond},#{createBy},#{createTime},#{updateBy},#{updateTime},#{remark},
update t_algorithm
type = #{type},sub_type_id = #{subTypeId},`name` = #{name},status = #{status},error = #{error},start_time = #{startTime},completed_time = #{completedTime},cost_second = #{costSecond},create_by = #{createBy},create_time = #{createTime},update_by = #{updateBy},update_time = #{updateTime},remark = #{remark},
where id = #{id}
delete from t_algorithm where id = #{id}
delete from t_algorithm where sub_type_id = #{id}
delete from t_algorithm where id in
#{id}
update t_algorithm
set start_time = #{startTime}, completed_time = null, cost_second = null
where id = #{id}
update t_algorithm
set completed_time = #{completedTime}
where id = #{id}
update t_algorithm
set cost_second = #{costSecond}
where id = #{id}
update t_algorithm
set status = #{statusCode}
where id = #{id}