select task_id, process_instance_id, operation_name, operation, approval_mode, message, finish_time, node_id, node_type, state, start_time, user_info, mark from wk_hi_operation update wk_hi_operation set state = #{state}, finish_time = sysdate() where process_instance_id = #{processInstanceId} and node_id = #{nodeId} and mark = 0 insert into wk_hi_operation task_id, node_id, process_instance_id, operation_name, operation, approval_mode, message, node_type, state, start_time, finish_time, user_info, #{taskId}, #{nodeId}, #{processInstanceId}, #{operationName}, #{operation}, #{approvalMode}, #{message}, #{nodeType}, #{state}, #{startTime}, #{finishTime}, #{userInfo}, update wk_hi_operation finish_time = #{finishTime}, state = #{state}, user_info = #{userInfo}, message = #{message}, where process_instance_id = #{processInstanceId} and node_id = #{nodeId} update wk_hi_operation when task_id = #{item.taskId} then #{item.finishTime} when task_id = #{item.taskId} then #{item.state} when task_id = #{item.taskId} then #{item.mark} when task_id = #{item.taskId} then #{item.userInfo} when task_id = #{item.taskId} then #{item.message} where task_id in #{item.taskId}