Exemplo n.º 1
0
  public void handleMessage(String message) {
    try {
      UserDTO userDto = jsonMapper.fromJson(message, UserDTO.class);

      Long typeId = 1L;
      Long entityId = this.getPartyEntityId(userDto.getId(), typeId);

      if (entityId == null) {
        return;
      }

      Long structTypeId = 1L;
      jdbcTemplate.update(removePartyStructSql, structTypeId, entityId, entityId);

      jdbcTemplate.update(removePartyEntitySql, entityId);

      logger.info("update user : {}", message);
    } catch (IOException ex) {
      logger.error(ex.getMessage(), ex);
    }
  }
Exemplo n.º 2
0
 public void removeUser(UserDTO userDto) {
   cache.remove("userId:" + userDto.getId());
   cache.remove("userUsername:"******":" + userDto.getUserRepoRef());
   cache.remove("userRef:" + userDto.getRef() + ":" + userDto.getUserRepoRef());
   cache.remove("nickName:" + userDto.getDisplayName());
 }
Exemplo n.º 3
0
 public void updateUser(UserDTO userDto) {
   cache.set("userId:" + userDto.getId(), userDto);
   cache.set("userUsername:"******":" + userDto.getUserRepoRef(), userDto);
   cache.set("userRef:" + userDto.getRef() + ":" + userDto.getUserRepoRef(), userDto);
   cache.set("nickName:" + userDto.getDisplayName(), userDto);
 }