处理问题

This commit is contained in:
wanggeng 2022-04-07 09:58:31 +08:00
parent ee017c6adc
commit ca4e8f1df6
2 changed files with 7 additions and 2 deletions

View File

@ -3,6 +3,7 @@ package ink.wgink.service.department.service.impl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.interfaces.consts.ISystemConstant;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.dtos.user.UserDTO;
import ink.wgink.pojo.result.SuccessResultList;
@ -59,7 +60,11 @@ public class DepartmentAdjustmentServiceImpl extends DefaultBaseService implemen
}
List<UserDTO> userDTOs = userService.listByUserIds(userIds);
Map<String, Object> params = new HashMap<>(16);
params.put("creatorName", securityComponent.getCurrentUser().getUserName());
if (securityComponent.getCurrentUser() != null) {
params.put("creatorName", securityComponent.getCurrentUser().getUserName());
} else {
params.put("creatorName", ISystemConstant.ADMIN);
}
setSaveInfo(params);
for (UserDTO userDTO : userDTOs) {
params.put("userId", userDTO.getUserId());

View File

@ -76,7 +76,7 @@ public class DepartmentUserServiceImpl extends DefaultBaseService implements IDe
i--;
}
}
departmentAdjustmentService.save(departmentUserIds, departmentId, departmentName, USER_DEPARTMENT_TYPE_JOIN);
departmentAdjustmentService.save(existUserIds, departmentId, departmentName, USER_DEPARTMENT_TYPE_JOIN);
if (departmentUserSaveAfterHandler != null) {
departmentUserSaveAfterHandler.handle(departmentId, departmentUserIds);
}