|
@@ -114,10 +114,17 @@ public class CourseProjectTypeServiceImpl extends ServiceImpl<CourseProjectTypeM
|
|
|
longs.add(1);
|
|
|
longs.add(0);
|
|
|
courseProjectTypeQueryBo.setStatus(longs);
|
|
|
- Collection<CourseProjectTypeVo> courseProjectTypeVos = baseMapper.queryList(courseProjectTypeQueryBo);
|
|
|
- if (!CollectionUtils.isEmpty(courseProjectTypeVos)){
|
|
|
+ Integer count = baseMapper.selectCount(new LambdaQueryWrapper<CourseProjectType>()
|
|
|
+ .eq(CourseProjectType::getProjectName, entity.getProjectName())
|
|
|
+ .eq(CourseProjectType::getEducationId, entity.getEducationId())
|
|
|
+ .in(CourseProjectType::getStatus, longs));
|
|
|
+ if (count > 0){
|
|
|
throw new RuntimeException("项目重复");
|
|
|
}
|
|
|
+// Collection<CourseProjectTypeVo> courseProjectTypeVos = baseMapper.queryList(courseProjectTypeQueryBo);
|
|
|
+// if (!CollectionUtils.isEmpty(courseProjectTypeVos)){
|
|
|
+// throw new RuntimeException("项目重复");
|
|
|
+// }
|
|
|
//TODO 做一些数据校验,如唯一约束
|
|
|
}
|
|
|
|