From 152131c4d7cb95485d6bda8f1b3f30863108e05b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B0=81=E7=BE=BD?= <2360164671@qq.com> Date: Mon, 4 Jul 2022 20:34:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E4=BA=86Task=E7=9A=84?= =?UTF-8?q?=E4=B8=80=E9=83=A8=E5=88=86=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../projectmanagement/service/impl/TaskServiceImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 ade0e7a..c477d6e 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 @@ -105,12 +105,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{