From c81957d1c3a213b9f3b52f1c4d046617168122a5 Mon Sep 17 00:00:00 2001 From: zhangjinli Date: Fri, 15 Jul 2022 10:22:36 +0800 Subject: [PATCH] zh --- src/main/resources/mapper/TaskMapper.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/resources/mapper/TaskMapper.xml b/src/main/resources/mapper/TaskMapper.xml index 8aefa65..93c5839 100644 --- a/src/main/resources/mapper/TaskMapper.xml +++ b/src/main/resources/mapper/TaskMapper.xml @@ -57,8 +57,11 @@ and IF((SELECT count(*)!=0 FROM taskDepartment WHERE taskId = t1.id)>0, - t1.id in (SELECT taskId from taskDepartment inner JOIN user on user.openid =#{openid} - and user.main_department = taskDepartment.departmentId), + t1.id in + + + (SELECT taskId from taskDepartment WHERE departmentId in + (SELECT departmentId from qywxDepartmentUserLink WHERE openid = #{openid}) GROUP BY taskId), 1=1)