From 150bc62b66aea450870c73698fa5babb2183df75 Mon Sep 17 00:00:00 2001 From: CMM <2198256324@qq.com> Date: Sat, 6 May 2023 15:21:25 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=B9=B4=E5=BA=A6=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E5=AF=BC=E5=85=A5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java index f070e07..f84345f 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java @@ -288,7 +288,7 @@ public class AnnualPlanLibManage { return project; }).collect(Collectors.toList()); // 保存到项目库中 - projectService.saveBatch(projectList); + projectService.saveOrUpdateBatch(projectList); // 筛选出导入的续建项目 List continuedList = list.stream() From bd83d9af8574b972164e7e7f7ca745db91a0d87e Mon Sep 17 00:00:00 2001 From: WendyYang Date: Sat, 6 May 2023 17:31:00 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=BC=96=E8=BE=91=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=A6=82=E6=9E=9C=E7=A6=81=E7=94=A8=E7=9A=84=E8=AF=9D=EF=BC=8C?= =?UTF-8?q?=E5=88=99=E8=B8=A2=E7=94=A8=E6=88=B7=E4=B8=8B=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ningdatech/pmapi/user/manage/UserInfoManage.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java index 77d6b3d..3d7fd7a 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java @@ -1,7 +1,6 @@ package com.ningdatech.pmapi.user.manage; import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.collection.CollectionUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.baomidou.mybatisplus.core.toolkit.Wrappers; @@ -208,7 +207,7 @@ public class UserInfoManage { return new ArrayList<>(); } return iUserInfoService.list(Wrappers.lambdaQuery(UserInfo.class) - .in(UserInfo::getId, compliantUserIdList)) + .in(UserInfo::getId, compliantUserIdList)) .stream().map(UserInfo::getId).collect(Collectors.toList()); } @@ -315,8 +314,8 @@ public class UserInfoManage { } userId = generateUserId(employeeCode); } - UserInfo userInfo = iUserInfoService.getById(userId); + String oldUserStatus = userInfo.getAvailable(); // 绑定用户手机号 bandUserMobile(userInfo, reqUserDetailEditPO); @@ -337,8 +336,14 @@ public class UserInfoManage { }).collect(Collectors.toList()); iUserRoleService.saveBatch(userRoleList); } - // 刷新用户权限 - userAuthManage.refreshSession(userId); + // 刷新用户权限 仅原状态为正常才需要刷新session + if ("ENABLE".equals(oldUserStatus)) { + if (oldUserStatus.equals(userInfo.getAvailable())) { + userAuthManage.refreshSession(userId); + } else { + userAuthManage.kickOff(userId); + } + } } /**