Ejemplo n.º 1
0
 private Role convert(RoleDto roleDto) {
   Role role = new Role();
   role.setRoleId(roleDto.getRoleId());
   role.setRoleName(roleDto.getName());
   role.setNotes(roleDto.getDescription());
   return role;
 }
Ejemplo n.º 2
0
 @Override
 @OperationSuccessInfo(category = LogCategoryConsts.SYS, content = "修改角色")
 public void updateRole(RoleUpdateEvent roleUpdateEvent) throws SecurityException {
   RoleDto role = new RoleDto();
   role.setRoleId(roleUpdateEvent.getRoleId());
   role.setName(roleUpdateEvent.getName());
   role.setDescription(roleUpdateEvent.getDescription());
   validatorTools.validate(role);
   roleCommandService.update(convert(role));
 }