select id, name, subject_id, paper_type, grade_level, score, question_count, suggest_time, limit_start_time, limit_end_time, frame_text_content_id, create_user, create_time, deleted, task_exam_id,guide, version, version_id, report_template_id from t_exam_paper select tp.id, tp.name, tp.subject_id, tel.level_name, tp.paper_type, tp.grade_level, tp.score, tp.question_count, tp.suggest_time, tp.limit_start_time, tp.limit_end_time, tp.frame_text_content_id, tp.create_user, tp.create_time, tp.deleted, tp.task_exam_id, tp.guide, tp.level_id, tp.level_name, tel.question_template_id, tel.question_template_name, ttc.content, tp.version, tp.version_id, tp.report_template_id from t_exam_paper tp, t_exam_level tel, t_text_content ttc select max(tep.version) from t_exam_paper tep insert into t_exam_paper name, subject_id, paper_type, grade_level, score, question_count, suggest_time, limit_start_time, limit_end_time, frame_text_content_id, create_user, create_time, deleted, task_exam_id, guide, level_id, level_name, last_id, question_content, version, version_id, report_template_id, #{name}, #{subjectId}, '1', '1', #{score}, #{questionCount}, #{suggestTime}, #{limitStartTime}, #{limitEndTime}, #{frameTextContentId}, #{createUser}, #{createTime}, 0, #{taskExamId}, #{guide}, #{levelId}, #{levelName}, #{lastId}, #{questionContent}, #{version}, #{versionId}, #{reportTemplateId}, update t_exam_paper name = #{name}, subject_id = #{subjectId}, paper_type = #{paperType}, grade_level = #{gradeLevel}, score = #{score}, question_count = #{questionCount}, suggest_time = #{suggestTime}, limit_start_time = #{limitStartTime}, limit_end_time = #{limitEndTime}, frame_text_content_id = #{frameTextContentId}, create_user = #{createUser}, create_time = #{createTime}, deleted = #{deleted}, task_exam_id = #{taskExamId}, guide = #{guide}, level_id = #{levelId}, level_name = #{levelName}, report_template_id = #{reportTemplateId}, where id = #{id} update t_exam_paper version = #{version}, version_id = #{versionId}, where id = #{id} delete from t_exam_paper where id = #{id} delete from t_exam_paper where id in #{id} update t_exam_paper set deleted = 2 where id in #{id}