feat:(feature/REQ-3282) 修改用户角色更新后的日志记录,把新旧的values记录下来,方便分析
This commit is contained in:
parent
421bf34dac
commit
07f86ce39b
@ -218,7 +218,8 @@ public class SaasRoleUserRelationServiceImpl extends ServiceImpl<SaasRoleUserRel
|
||||
Map<String, SaasRoleRes> roles = checkRoleCode(param);
|
||||
|
||||
// 查询用户的历史记录
|
||||
Map<String, List<SaasRoleUserV2DTO>> roleUserMap = listRoleUserRelation(param).stream()
|
||||
List<SaasRoleUserV2DTO> oldRoleUsers = listRoleUserRelation(param);
|
||||
Map<String, List<SaasRoleUserV2DTO>> roleUserMap = oldRoleUsers.stream()
|
||||
.collect(Collectors.groupingBy(e -> e.getIdentityId() + "_" + e.getIdentityType() +
|
||||
"_" + e.getSaasRoleUser().getPersonId() + "_" + e.getWorkspaceId() + "_" + e.getOuId()));
|
||||
// 根据入参解析insert、delete的记录
|
||||
@ -272,7 +273,8 @@ public class SaasRoleUserRelationServiceImpl extends ServiceImpl<SaasRoleUserRel
|
||||
.collect(Collectors.toList()))
|
||||
.message(new JSONObject()
|
||||
.fluentPut("param", param)
|
||||
.fluentPut("upsert", upsert)
|
||||
.fluentPut("oldValues", oldRoleUsers)
|
||||
.fluentPut("newValues", upsert)
|
||||
.toJSONString())
|
||||
.build());
|
||||
}
|
||||
@ -932,9 +934,9 @@ public class SaasRoleUserRelationServiceImpl extends ServiceImpl<SaasRoleUserRel
|
||||
* @param upsert
|
||||
*/
|
||||
private void assembleDeleteData(Map<String, List<SaasRoleUserV2DTO>> roleUserMap,
|
||||
UpsertUserRoleReq param,
|
||||
Map<String, SaasRoleRes> roles,
|
||||
List<SaasRoleUserRelation> upsert) {
|
||||
UpsertUserRoleReq param,
|
||||
Map<String, SaasRoleRes> roles,
|
||||
List<SaasRoleUserRelation> upsert) {
|
||||
List<SaasRoleUserRelation> resultByRemoveRoles = param.getUserRoles().stream()
|
||||
.flatMap(e -> {
|
||||
Set<Long> allRemoveRoleIds = Optional.ofNullable(e.getRemoveRoleIds())
|
||||
|
||||
Loading…
Reference in New Issue
Block a user