|
@@ -170,9 +170,9 @@ public class CourseChapterServiceImpl extends ServiceImpl<CourseChapterMapper, C
|
|
|
*/
|
|
|
private void validEntityBeforeSave(CourseChapter entity){
|
|
|
//TODO 做一些数据校验,如唯一约束
|
|
|
- if(checkNameUnique(entity)){
|
|
|
+ /* if(checkNameUnique(entity)){
|
|
|
throw new CustomException("名称重复");
|
|
|
- }
|
|
|
+ }*/
|
|
|
if(entity.getChapterId()!=null&&entity.getPublishStatus()!=null&&entity.getPublishStatus()==0){
|
|
|
CourseMenu one = iCourseMenuService.getOne(new LambdaQueryWrapper<CourseMenu>().eq(CourseMenu::getMenuId, entity.getChapterId()).eq(CourseMenu::getType,2).last("limit 1"));
|
|
|
if(one!=null){
|