xiatian 8 mēneši atpakaļ
vecāks
revīzija
383ee087ae

+ 2 - 0
src/main/java/cn/com/qmth/scancentral/service/impl/StudentImportServiceImpl.java

@@ -14,6 +14,7 @@ import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.scheduling.annotation.Async;
 import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
 
 import com.qmth.boot.core.exception.ParameterException;
 
@@ -62,6 +63,7 @@ public class StudentImportServiceImpl implements StudentImportService {
     }
 
     @Async
+    @Transactional
     @Override
     public void studentImport(String taskId, List<String> lines, Long examId, String subjectCode, Integer yearConfig,
             Integer yearHalfConfig) {

+ 2 - 2
src/main/resources/mapper/ExamRoomMapper.xml

@@ -28,7 +28,7 @@
         </if>
         order by t.subject_code,t.campus_code,t.exam_site,t.exam_room
     </select>
-    <update id="modifyByExamAndSubject">
+    <insert id="modifyByExamAndSubject">
     	INSERT INTO sc_exam_room (
     	`exam_id`,
 	    `subject_code`,
@@ -46,7 +46,7 @@
         where t.exam_id=#{examId}
 	        and t.subject_code=#{subjectCode}
         group by t.exam_site,t.exam_room,t.campus_code,t.province
-    </update>
+    </insert>
     
     <select id="listCampusByExamId" resultType="cn.com.qmth.scancentral.vo.CampusVo">
         SELECT