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() 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); + } + } } /**