优化调整
This commit is contained in:
@@ -14,10 +14,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="reqCode" column="req_code" />
|
||||
<result property="taskTypeCode" column="task_type_code" />
|
||||
<result property="taskCode" column="task_code" />
|
||||
<result property="retry" column="retry" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectJobCallBackVo">
|
||||
select id, type, task_no, mydoJob_Id, status, create_time,req_code,task_type_code,task_code from job_call_back
|
||||
select id, type, task_no, mydoJob_Id, status, create_time, req_code, task_type_code, task_code, retry from job_call_back
|
||||
</sql>
|
||||
|
||||
<select id="selectJobCallBackList" parameterType="JobCallBack" resultMap="JobCallBackResult">
|
||||
@@ -30,6 +31,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="reqCode != null and reqCode != ''"> and req_code = #{reqCode}</if>
|
||||
<if test="taskTypeCode != null and taskTypeCode != ''"> and task_type_code = #{taskTypeCode}</if>
|
||||
<if test="taskCode != null and taskCode != ''"> and task_code = #{taskCode}</if>
|
||||
<if test="retry != null and retry != ''"> and retry = #{retry}</if>
|
||||
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@@ -39,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
<select id="selectJobCallBackListNoSuccess" resultMap="JobCallBackResult">
|
||||
<include refid="selectJobCallBackVo"/>
|
||||
where status != '1'
|
||||
where status != '1' and retry < 10
|
||||
</select>
|
||||
|
||||
<insert id="insertJobCallBack" parameterType="JobCallBack" useGeneratedKeys="true" keyProperty="id">
|
||||
@@ -53,6 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="reqCode != null">req_code,</if>
|
||||
<if test="taskTypeCode != null">task_type_code,</if>
|
||||
<if test="taskCode != null">task_code,</if>
|
||||
<if test="retry != null">retry,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="type != null">#{type},</if>
|
||||
@@ -63,6 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="reqCode != null">#{reqCode},</if>
|
||||
<if test="taskTypeCode != null">#{taskTypeCode},</if>
|
||||
<if test="taskCode != null">#{taskCode},</if>
|
||||
<if test="retry != null">#{retry},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -77,6 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="reqCode != null">req_code = #{reqCode},</if>
|
||||
<if test="taskTypeCode != null">task_type_code = #{taskTypeCode},</if>
|
||||
<if test="taskCode != null">task_code = #{taskCode},</if>
|
||||
<if test="retry != null">retry = #{retry},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
@@ -93,7 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<select id="getTopJobCallBack" resultMap="JobCallBackResult">
|
||||
select top(1) id, type, task_no, mydoJob_Id, status, create_time,req_code,task_type_code,task_code from job_call_back
|
||||
select top(1) id, type, task_no, mydoJob_Id, status, create_time,req_code,task_type_code,task_code,retry from job_call_back
|
||||
where status = '0' and spare1 in ('0','1','2')
|
||||
order by create_time asc
|
||||
</select>
|
||||
|
||||
Reference in New Issue
Block a user