id, student_user_id, teaching_class_id, task_id, task_key, help_status, help_task_snapshot, help_answer_snapshot, help_report_json, help_raw_response, help_model, help_completed_at, help_error_message, assessment_status, assessment_task_snapshot, assessment_answer_snapshot, assessment_score, assessment_report_json, assessment_raw_response, assessment_model, assessment_completed_at, assessment_error_message, create_time, update_time INSERT IGNORE INTO ai_training_evaluation ( id, student_user_id, teaching_class_id, task_id, task_key, help_status, assessment_status, create_time, update_time ) VALUES ( #{id,jdbcType=VARCHAR}, #{studentUserId,jdbcType=VARCHAR}, #{teachingClassId,jdbcType=VARCHAR}, #{taskId,jdbcType=VARCHAR}, #{taskKey,jdbcType=VARCHAR}, #{helpStatus,jdbcType=VARCHAR}, #{assessmentStatus,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP} ) UPDATE ai_training_evaluation SET help_status = 'PROCESSING', help_error_message = NULL, update_time = #{updateTime,jdbcType=TIMESTAMP} WHERE id = #{id,jdbcType=VARCHAR} AND help_status IN ('NOT_STARTED', 'FAILED', 'SUCCEEDED') UPDATE ai_training_evaluation SET assessment_status = 'PROCESSING', assessment_error_message = NULL, update_time = #{updateTime,jdbcType=TIMESTAMP} WHERE id = #{id,jdbcType=VARCHAR} AND assessment_status IN ('NOT_STARTED', 'FAILED') UPDATE ai_training_evaluation SET help_status = 'SUCCEEDED', help_task_snapshot = #{helpTaskSnapshot}, help_answer_snapshot = #{helpAnswerSnapshot}, help_report_json = #{helpReportJson}, help_raw_response = #{helpRawResponse}, help_model = #{helpModel,jdbcType=VARCHAR}, help_completed_at = #{helpCompletedAt,jdbcType=TIMESTAMP}, help_error_message = NULL, update_time = #{updateTime,jdbcType=TIMESTAMP} WHERE id = #{id,jdbcType=VARCHAR} AND help_status = 'PROCESSING' UPDATE ai_training_evaluation SET assessment_status = 'SUCCEEDED', assessment_task_snapshot = #{assessmentTaskSnapshot}, assessment_answer_snapshot = #{assessmentAnswerSnapshot}, assessment_score = #{assessmentScore,jdbcType=INTEGER}, assessment_report_json = #{assessmentReportJson}, assessment_raw_response = #{assessmentRawResponse}, assessment_model = #{assessmentModel,jdbcType=VARCHAR}, assessment_completed_at = #{assessmentCompletedAt,jdbcType=TIMESTAMP}, assessment_error_message = NULL, update_time = #{updateTime,jdbcType=TIMESTAMP} WHERE id = #{id,jdbcType=VARCHAR} AND assessment_status = 'PROCESSING' UPDATE ai_training_evaluation SET help_status = 'FAILED', help_error_message = #{errorMessage,jdbcType=VARCHAR}, update_time = #{updateTime,jdbcType=TIMESTAMP} WHERE id = #{id,jdbcType=VARCHAR} AND help_status = 'PROCESSING' UPDATE ai_training_evaluation SET assessment_status = 'FAILED', assessment_error_message = #{errorMessage,jdbcType=VARCHAR}, update_time = #{updateTime,jdbcType=TIMESTAMP} WHERE id = #{id,jdbcType=VARCHAR} AND assessment_status = 'PROCESSING'