|
|
@@ -145,6 +145,7 @@ public class CurriculumServiceImpl implements CurriculumService {
|
|
|
main.setCreateTime(new Date());
|
|
|
main.setSchoolId(BaseContextHolder.getSchoolId());
|
|
|
main.setCreatorName(BaseContextHolder.getUserName());
|
|
|
+ main.setStatus("0");
|
|
|
//保存主表
|
|
|
curriculumMapper.insertSelective(main);
|
|
|
Long mId = main.getId();
|
|
|
@@ -156,6 +157,7 @@ public class CurriculumServiceImpl implements CurriculumService {
|
|
|
curriculumDetailDTO.setSchoolId(schoolId);
|
|
|
curriculumDetailDTO.setClazzId(Long.parseLong(main.getClazzId()));
|
|
|
curriculumDetailDTO.setStatus(Integer.parseInt(main.getStatus()));
|
|
|
+ curriculumDetailDTO.setStatus(0);
|
|
|
});
|
|
|
curriculumMapper.insertDetailSelective(items);
|
|
|
messageLogService.save(new DocBaseDTO(mId, CODE, NAME));
|
|
|
@@ -190,6 +192,9 @@ public class CurriculumServiceImpl implements CurriculumService {
|
|
|
@Override
|
|
|
@Transactional
|
|
|
public void delete(Long id) {
|
|
|
+ if(curriculumMapper.courseStatus(id)>0){
|
|
|
+ throw new BizException(BizExceptionCode.COURSE_RELEASE_STATUS);
|
|
|
+ }
|
|
|
curriculumMapper.deleteDetailByMainId(id);
|
|
|
curriculumMapper.delete(id);
|
|
|
messageLogService.delete(new DocBaseDTO(id, CODE, NAME));
|