|
@@ -123,12 +123,7 @@ public class CourseMenuServiceImpl extends ServiceImpl<CourseMenuMapper, CourseM
|
|
|
*/
|
|
|
private void validEntityBeforeSave(CourseMenu entity){
|
|
|
//TODO 做一些数据校验,如唯一约束
|
|
|
- if(entity.getType()==1&&entity.getParentId()>0){
|
|
|
- throw new CustomException("父ID错误");
|
|
|
- }
|
|
|
- if(entity.getType()!=1&&entity.getParentId()==0){
|
|
|
- throw new CustomException("结构错误");
|
|
|
- }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
@Override
|