From af0911b541dc6cd7040f953aa934bfd4fcebdb44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Wed, 4 May 2022 17:41:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9D=83=E9=99=90=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/xm/core/ctrl/XmQuestionController.java | 7 ++++++- .../mybatis/mapper/xm/core/dao/XmQuestionMapper.xml | 6 ++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/xm-core/src/main/java/com/xm/core/ctrl/XmQuestionController.java b/xm-core/src/main/java/com/xm/core/ctrl/XmQuestionController.java index 030ef84a..26638f63 100644 --- a/xm-core/src/main/java/com/xm/core/ctrl/XmQuestionController.java +++ b/xm-core/src/main/java/com/xm/core/ctrl/XmQuestionController.java @@ -109,7 +109,12 @@ public class XmQuestionController { RequestUtils.transformArray(xmQuestion, "tagIdList"); PageUtils.startPage(xmQuestion); User user = LoginUtils.getCurrentUserInfo(); - xmQuestion.put("compete",user.getUserid()); + if(LoginUtils.isBranchAdmin()){ + xmQuestion.put("branchId",user.getBranchId()); + }else { + xmQuestion.put("compete",user.getUserid()); + } + List> xmQuestionList = xmQuestionService.getQuestion(xmQuestion); //列出XmQuestion列表 PageUtils.responePage(m, xmQuestionList); diff --git a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmQuestionMapper.xml b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmQuestionMapper.xml index 1a36ba8f..7343b5dc 100644 --- a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmQuestionMapper.xml +++ b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmQuestionMapper.xml @@ -30,8 +30,10 @@ and exists ( select 1 from xm_group_user gu where gu.userid=#{compete} and (gu.project_id=res.project_id or gu.product_id=res.product_id)) and res.name like #{key} - and res.status != 'resolved' - + and res.status in ('1','2','3','4','7') + + and exists( select 1 from xm_project p where p.id=res.project_id and p.branch_id=#{branchId}) + and exists (select 1 from xm_menu m where m.iteration_id=#{linkIterationId} and m.menu_id=res.menu_id)