|
@@ -111,7 +111,7 @@ public class ExamConfigServiceImpl extends ServiceImpl<ExamConfigMapper, ExamCon
|
|
|
*/
|
|
*/
|
|
|
private void validEntityBeforeSave(ExamConfig entity){
|
|
private void validEntityBeforeSave(ExamConfig entity){
|
|
|
//TODO 做一些数据校验,如唯一约束
|
|
//TODO 做一些数据校验,如唯一约束
|
|
|
- if(checkMajorCategoryIdUnique(entity)){
|
|
|
|
|
|
|
+ if(Validator.isNotNull(entity.getCategoryId())&&checkMajorCategoryIdUnique(entity)){
|
|
|
throw new CustomException("该分类ID配置已存在");
|
|
throw new CustomException("该分类ID配置已存在");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|