|
@@ -9,6 +9,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="type" column="type" />
|
|
|
<result property="subTypeId" column="sub_type_id" />
|
|
|
<result property="name" column="name" />
|
|
|
+ <result property="status" column="status" />
|
|
|
+ <result property="error" column="error" />
|
|
|
<result property="startTime" column="start_time" />
|
|
|
<result property="completedTime" column="completed_time" />
|
|
|
<result property="costSecond" column="cost_second" />
|
|
@@ -21,7 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectAlgorithmVo">
|
|
|
- select algo.`id`, algo.`type`, algo.sub_type_id, algo.`name`, 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
|
|
|
+ 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
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectAlgorithmList" parameterType="Algorithm" resultMap="AlgorithmResult">
|
|
@@ -30,6 +32,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="type != null and type != ''"> and `type` = #{type}</if>
|
|
|
<if test="subTypeId != null "> and sub_type_id = #{subTypeId}</if>
|
|
|
<if test="name != null and name != ''"> and `name` like concat('%', #{name}, '%')</if>
|
|
|
+ <if test="status != null and status != ''"> and status = #{status}</if>
|
|
|
+ <if test="error != null and error != ''"> and error = #{error}</if>
|
|
|
<if test="startTime != null "> and start_time = #{startTime}</if>
|
|
|
<if test="completedTime != null "> and completed_time = #{completedTime}</if>
|
|
|
<if test="costSecond != null "> and cost_second = #{costSecond}</if>
|
|
@@ -47,6 +51,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="type != null">`type`,</if>
|
|
|
<if test="subTypeId != null">sub_type_id,</if>
|
|
|
<if test="name != null">`name`,</if>
|
|
|
+ <if test="status != null and status != ''">status,</if>
|
|
|
+ <if test="error != null">error,</if>
|
|
|
<if test="startTime != null">start_time,</if>
|
|
|
<if test="completedTime != null">completed_time,</if>
|
|
|
<if test="costSecond != null">cost_second,</if>
|
|
@@ -60,6 +66,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="type != null">#{type},</if>
|
|
|
<if test="subTypeId != null">#{subTypeId},</if>
|
|
|
<if test="name != null">#{name},</if>
|
|
|
+ <if test="status != null and status != ''">#{status},</if>
|
|
|
+ <if test="error != null">#{error},</if>
|
|
|
<if test="startTime != null">#{startTime},</if>
|
|
|
<if test="completedTime != null">#{completedTime},</if>
|
|
|
<if test="costSecond != null">#{costSecond},</if>
|
|
@@ -77,6 +85,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="type != null">type = #{type},</if>
|
|
|
<if test="subTypeId != null">sub_type_id = #{subTypeId},</if>
|
|
|
<if test="name != null">`name` = #{name},</if>
|
|
|
+ <if test="status != null and status != ''">status = #{status},</if>
|
|
|
+ <if test="error != null">error = #{error},</if>
|
|
|
<if test="startTime != null">start_time = #{startTime},</if>
|
|
|
<if test="completedTime != null">completed_time = #{completedTime},</if>
|
|
|
<if test="costSecond != null">cost_second = #{costSecond},</if>
|
|
@@ -142,4 +152,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</trim>
|
|
|
where id = #{id}
|
|
|
</update>
|
|
|
+
|
|
|
+ <update id="updateStatusById" parameterType="map">
|
|
|
+ update t_algorithm
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="statusCode != null">status = #{statusCode},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
</mapper>
|