完成自动充值流程
This commit is contained in:
@@ -95,6 +95,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="status == 'RECEIVED'">
|
||||
, receive_time = sysdate()
|
||||
</if>
|
||||
<if test="status == 'PROCESSING'">
|
||||
, start_time = sysdate()
|
||||
</if>
|
||||
<if test="status == 'CANCELLED' or status == 'FAILED' or status == 'SUCCESS' or status == 'TIMEOUT'">
|
||||
, finish_time = sysdate()
|
||||
</if>
|
||||
@@ -111,6 +114,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="status == 'RECEIVED'">
|
||||
, receive_time = sysdate()
|
||||
</if>
|
||||
<if test="status == 'PROCESSING'">
|
||||
, start_time = sysdate()
|
||||
</if>
|
||||
<if test="status == 'CANCELLED' or status == 'FAILED' or status == 'SUCCESS' or status == 'TIMEOUT'">
|
||||
, finish_time = sysdate()
|
||||
</if>
|
||||
@@ -135,9 +141,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
inner join af_order o on o.id = t.order_id
|
||||
where t.user_name = #{userName}
|
||||
and t.device_code = #{deviceCode}
|
||||
and t.status in ('CREATED', 'PUSHED')
|
||||
and t.status in ('CREATED', 'PUSHED', 'RECEIVED', 'PROCESSING')
|
||||
order by t.create_time asc, t.id asc
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<update id="updateTaskResult">
|
||||
update af_dispatch_task
|
||||
set status = #{status},
|
||||
fail_reason = #{failReason},
|
||||
result_json = #{resultJson},
|
||||
finish_time = sysdate(),
|
||||
update_by = #{updateBy},
|
||||
update_time = sysdate()
|
||||
where id = #{id}
|
||||
and status = #{expectStatus}
|
||||
</update>
|
||||
|
||||
<select id="selectActiveTaskByUserDevice" resultMap="AfDispatchTaskResult">
|
||||
<include refid="selectAfDispatchTaskVo"/>
|
||||
where user_name = #{userName}
|
||||
and device_code = #{deviceCode}
|
||||
and status in ('CREATED', 'PUSHED', 'RECEIVED', 'PROCESSING')
|
||||
order by create_time asc, id asc
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -22,4 +22,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
order by id asc
|
||||
</select>
|
||||
|
||||
<insert id="insertStepLog" parameterType="com.ruoyi.system.domain.af.AfTaskStepLog" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into af_task_step_log (task_id, step_code, step_name, step_status, message, payload_json, create_time)
|
||||
values (#{taskId}, #{stepCode}, #{stepName}, #{stepStatus}, #{message}, #{payloadJson}, sysdate())
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user