Skip to content

Commit

Permalink
UserSimpleDto with one String for the CurrentExperience
Browse files Browse the repository at this point in the history
  • Loading branch information
MARINOSAG committed Sep 30, 2018
1 parent f48ea71 commit dd4bf55
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/main/java/com/linkedin/converter/UserConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ public UserSimpleDto toUserSimpleDto(Long userId) {
//experienceService.getUsersExperiences(userId).sort();
Experience experience = experienceRepository.findAllByUserIdOrderByStartDateDesc(userId).stream().findFirst().orElse(null);
if(experience != null ){
userDto.setCompany(experience.getCompany());
userDto.setJobTitle(experience.getTitle());
userDto.setJobTitleCompany(experience.getTitle() + " at " +experience.getCompany() );
}


Expand Down
6 changes: 2 additions & 4 deletions src/main/java/com/linkedin/entities/model/UserSimpleDto.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ public class UserSimpleDto implements Serializable {
@ApiModelProperty(value = "user's image path", example = "", position = 4)
private String imagePath;

@ApiModelProperty(value = "JobTitle ", example = "Software Engineer", position = 5)
private String jobTitle;
@ApiModelProperty(value = "JobTitleCompany ", example = "Software Engineer", position = 5)
private String jobTitleCompany;

@ApiModelProperty(value = "Company Name", example = "Google", position = 6)
private String company;
}

0 comments on commit dd4bf55

Please sign in to comment.