diff --git a/src/main/java/cn/edu/hfut/rmdjzz/projectmanagement/service/impl/TaskServiceImpl.java b/src/main/java/cn/edu/hfut/rmdjzz/projectmanagement/service/impl/TaskServiceImpl.java index 8e107d8..c23a028 100644 --- a/src/main/java/cn/edu/hfut/rmdjzz/projectmanagement/service/impl/TaskServiceImpl.java +++ b/src/main/java/cn/edu/hfut/rmdjzz/projectmanagement/service/impl/TaskServiceImpl.java @@ -159,12 +159,13 @@ public class TaskServiceImpl extends ServiceImpl implements IT task.setTaskId(null); Integer userLevel=projectGroupService.getUserLevelInGroup(token,task.getTaskProjectId()); if(userLevel==0||(userLevel==1&&task.getTaskFatherId()==0)){ + System.out.println(userLevel); throw new BadRequestException("错误的操作"); } - if(task.checkInsert()){ + if(!task.checkInsert()){ throw new BadRequestException("工作项参数错误"); } - if(checkHolder(token,task.getTaskFatherId())){ + if(!checkHolder(token,task.getTaskFatherId())){ throw new BadRequestException("非法的父级参数"); } try{