|
@@ -6,7 +6,6 @@ import com.qmth.themis.business.cache.bean.ExamActivityCacheBean;
|
|
|
import com.qmth.themis.business.cache.bean.ExamCacheBean;
|
|
|
import com.qmth.themis.business.cache.bean.ExamCourseCacheBean;
|
|
|
import com.qmth.themis.business.cache.bean.ExamStudentCacheBean;
|
|
|
-import com.qmth.themis.business.constant.SystemConstant;
|
|
|
import com.qmth.themis.business.dao.TEExamActivityMapper;
|
|
|
import com.qmth.themis.business.dto.MqDto;
|
|
|
import com.qmth.themis.business.dto.response.MonitorStreamDto;
|
|
@@ -333,13 +332,8 @@ public class TEExamActivityServiceImpl extends ServiceImpl<TEExamActivityMapper,
|
|
|
String errorColumn = e.getCause().toString();
|
|
|
String columnStr = errorColumn.substring(errorColumn.lastIndexOf("key") + 3, errorColumn.length())
|
|
|
.replaceAll("'", "");
|
|
|
- if (Objects.nonNull(columnStr) && columnStr.contains(SystemConstant.SQL_UNIQUE_ERROR)) {
|
|
|
- throw new BusinessException(
|
|
|
- "机构id[" + teExamActivityList.get(0).getExamId() + "]下的" + FieldUniqueEnum.t_e_exam_activity_examId_code_Idx.getCode() + "数据不允许重复插入");
|
|
|
- } else {
|
|
|
- throw new BusinessException(
|
|
|
- "机构id[" + teExamActivityList.get(0).getExamId() + "]下的" + FieldUniqueEnum.convertToCode(columnStr) + "数据不允许重复插入");
|
|
|
- }
|
|
|
+ throw new BusinessException(
|
|
|
+ "机构id[" + teExamActivityList.get(0).getExamId() + "]下的" + FieldUniqueEnum.convertToCode(columnStr) + "数据不允许重复插入");
|
|
|
} else if (e instanceof BusinessException) {
|
|
|
throw new BusinessException(e.getMessage());
|
|
|
} else {
|