From 9374f6dc98a16e29837574064ea6f4f747492f7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Tue, 17 Jan 2023 19:09:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=A2=E9=98=9F=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/xm/core/ctrl/XmIterationController.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/xm-core/src/main/java/com/xm/core/ctrl/XmIterationController.java b/xm-core/src/main/java/com/xm/core/ctrl/XmIterationController.java index c0bb27c6..34a3f4a6 100644 --- a/xm-core/src/main/java/com/xm/core/ctrl/XmIterationController.java +++ b/xm-core/src/main/java/com/xm/core/ctrl/XmIterationController.java @@ -207,10 +207,11 @@ public class XmIterationController { xmIteration.setIphase("0"); xmIteration.setAdminUserid(user.getUserid()); xmIteration.setAdminUsername(user.getUsername()); - - if(!operQxService.checkIsProductAdmOrAss(xmProductService.getProductFromCache(xmIteration.getProductId()), user.getUserid())){ - return failed("no-product-qx","您不是产品管理人员,无权将该产品与迭代关联"); - }; + XmProduct xmProductDb=xmProductService.getProductFromCache(xmIteration.getProductId()); + boolean isPm=groupService.checkUserIsProductAdm(xmProductDb,user.getUserid()); + if(!isPm && !groupService.checkUserExistsProductGroup(xmProductDb.getId(),user.getUserid())){ + return failed("no-qx","您无权新增迭代,您不是产品组成员。"); + } notifyMsgService.pushMsg(user,xmIteration.getAdminUserid(),xmIteration.getAdminUsername(),"6",xmIteration.getProductId(),xmIteration.getId(),"您成为迭代【"+xmIteration.getIterationName()+"】管理员,请及时跟进。"); xmIterationService.addIteration(xmIteration); xmIterationStateService.loadTasksToXmIterationState(xmIteration.getId());