Commit 78532c09 authored by 李博今's avatar 李博今

修改关于章节状态的改变

parent cf65e8fc
......@@ -402,11 +402,12 @@ public class BChapterServiceImpl implements BChapterService {
}else
bChapter.setState(StateEnum.OPEN.getCode());
int result = bChapterRepository.updateStateById(bChapter);
if(!bChapter.getPid().equals("-1")){
List<String> state = bChapterRepository.queryChapterStateByPid(bChapter.getPid());
if(state.size()==1&&state.get(0).equals(StateEnum.CLOSE.getCode())){
bChapterRepository.updateStateByPid(bChapter.getPid(),StateEnum.CLOSE.getCode());
}else if(state.size()>1){
}else{
bChapterRepository.updateStateByPid(bChapter.getPid(),StateEnum.OPEN.getCode());
}
}
......
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