Commit d36a13b5 authored by luzhuang's avatar luzhuang

fix: BUG 29371

parent 9167be80
......@@ -652,8 +652,17 @@ public class BLessonServiceImpl implements BLessonService {
}
bLesson.setDeleted();
UserUtil.setCurrentMergeOperation(bLesson);
// 保存日志
bLessonLogRepository.insertSelective(BLessonLog.generate("关闭课程",bLesson.getBusinessId()));
//查询 当前资源共享状态
String flag = bMessageRepository.getSycnValue(bLesson.getCorpId());
if(LessonSycnEnum.OPEN.getCode().equals(flag)){
BPLesson bpLesson = new BPLesson();
bpLesson.setBusinessId(bLesson.getBusinessId());
bpLesson.setReleaseState(ReleaseStateEnum.DELETE.getCode());
bpLessonRepository.updateByPrimaryKeySelective(bpLesson);
}
int line = bLessonRepository.logicalDelete(bLesson);
//int line = bLessonRepository.deleteByPrimaryKey(id);
return new PersistModel(line, MessageConstant.MESSAGE_ALERT_SUCCESS);
}
......@@ -693,8 +702,17 @@ public class BLessonServiceImpl implements BLessonService {
bLesson.setBusinessId(id);
bLesson.setCloseDate(new Date());
UserUtil.setCurrentMergeOperation(bLesson);
// 保存日志
bLessonLogRepository.insertSelective(BLessonLog.generate("关闭课程",bLesson.getBusinessId()));
//查询 当前资源共享状态
String flag = bMessageRepository.getSycnValue(bLesson.getCorpId());
if(LessonSycnEnum.OPEN.getCode().equals(flag)){
BPLesson bpLesson = new BPLesson();
bpLesson.setBusinessId(bLesson.getBusinessId());
bpLesson.setReleaseState(ReleaseStateEnum.CLOSED.getCode());
bpLessonRepository.updateByPrimaryKeySelective(bpLesson);
}
int line = bLessonRepository.closeLesson(bLesson);
//int line = bLessonRepository.deleteByPrimaryKey(id);
return new PersistModel(line, MessageConstant.MESSAGE_ALERT_SUCCESS);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment