|
|
@@ -174,7 +174,7 @@ public class QuestionChapterServiceImpl extends ServiceImpl<QuestionChapterMappe
|
|
|
*/
|
|
|
private void validEntityBeforeSave(QuestionChapter entity){
|
|
|
//TODO 做一些数据校验,如唯一约束
|
|
|
- if(entity.getChapterExamId()>0&&entity.getPublishStatus().equals(0)){
|
|
|
+ if(entity.getChapterExamId()>0&&entity.getPublishStatus()==0){
|
|
|
GoodsAttached one = iGoodsAttachedService.getOne(new LambdaQueryWrapper<GoodsAttached>().eq(GoodsAttached::getMajorId, entity.getChapterExamId()).eq(GoodsAttached::getType,2).last("limit 1"));
|
|
|
if(one!=null){
|
|
|
throw new CustomException("该章卷已被绑定,不允许修改发布状态为未发布");
|
|
|
@@ -182,7 +182,6 @@ public class QuestionChapterServiceImpl extends ServiceImpl<QuestionChapterMappe
|
|
|
if(iQuestionModuleChapterService.getOne(new LambdaQueryWrapper<QuestionModuleChapter>().eq(QuestionModuleChapter::getChapterExamId,entity.getChapterExamId()).last("limit 1"))!=null){
|
|
|
throw new CustomException("该章卷已被绑定,不允许修改发布状态为未发布");
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
|