|
|
@@ -129,16 +129,12 @@ public class Demo03StudentErpServiceImpl implements Demo03StudentErpService {
|
|
|
|
|
|
@Override
|
|
|
public void deleteDemo03Course(Long id) {
|
|
|
- // 校验存在
|
|
|
- validateDemo03CourseExists(id);
|
|
|
// 删除
|
|
|
demo03CourseErpMapper.deleteById(id);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void deleteDemo03CourseListByIds(List<Long> ids) {
|
|
|
- // 校验存在
|
|
|
- validateDemo03CourseExists(ids);
|
|
|
// 删除
|
|
|
demo03CourseErpMapper.deleteByIds(ids);
|
|
|
}
|
|
|
@@ -154,13 +150,6 @@ public class Demo03StudentErpServiceImpl implements Demo03StudentErpService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void validateDemo03CourseExists(List<Long> ids) {
|
|
|
- List<Demo03CourseDO> list = demo03CourseErpMapper.selectByIds(ids);
|
|
|
- if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
|
|
- throw exception(DEMO03_COURSE_NOT_EXISTS);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
private void deleteDemo03CourseByStudentId(Long studentId) {
|
|
|
demo03CourseErpMapper.deleteByStudentId(studentId);
|
|
|
}
|
|
|
@@ -198,16 +187,12 @@ public class Demo03StudentErpServiceImpl implements Demo03StudentErpService {
|
|
|
|
|
|
@Override
|
|
|
public void deleteDemo03Grade(Long id) {
|
|
|
- // 校验存在
|
|
|
- validateDemo03GradeExists(id);
|
|
|
// 删除
|
|
|
demo03GradeErpMapper.deleteById(id);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void deleteDemo03GradeListByIds(List<Long> ids) {
|
|
|
- // 校验存在
|
|
|
- validateDemo03GradeExists(ids);
|
|
|
// 删除
|
|
|
demo03GradeErpMapper.deleteByIds(ids);
|
|
|
}
|
|
|
@@ -223,13 +208,6 @@ public class Demo03StudentErpServiceImpl implements Demo03StudentErpService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void validateDemo03GradeExists(List<Long> ids) {
|
|
|
- List<Demo03GradeDO> list = demo03GradeErpMapper.selectByIds(ids);
|
|
|
- if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
|
|
- throw exception(DEMO03_GRADE_NOT_EXISTS);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
private void deleteDemo03GradeByStudentId(Long studentId) {
|
|
|
demo03GradeErpMapper.deleteByStudentId(studentId);
|
|
|
}
|