Skip to content

Commit

Permalink
Merge pull request #68 from Da-gather/fix/#66-error
Browse files Browse the repository at this point in the history
[fix] rperiod int로 변경
  • Loading branch information
Lightieey authored May 22, 2023
2 parents 1fd9aac + 3805136 commit 985eefc
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class ProfileGetListResponseDto {
private boolean gender;
private String birth;
private String nationality;
private String rperiod;
private int rperiod;
private String introduction;
private List<ProfilePurposeDto> purposes;
private List<ProfileInterestDto> interests;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class ProfileGetResponseDto {
private boolean gender;
private String birth;
private String nationality;
private String rperiod;
private int rperiod;
private String introduction;
private List<ProfilePurposeDto> purposes;
private List<ProfileInterestDto> interests;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class ProfileResponseDto {
private boolean gender;
private String birth;
private String nationality;
private String rperiod;
private int rperiod;
private String introduction;
private List<String> purposes;
private List<String> interests;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ public class Profile {
private String nationality;

@Column(nullable = false)
private String rperiod;
private int rperiod;

@Column(nullable = false)
private String introduction;

@Builder
Profile(String memberId, String resident, String name, String imageUrl, boolean gender, LocalDate birth,
String nationality, String rperiod, String introduction) {
String nationality, int rperiod, String introduction) {
Assert.notNull(memberId, "memberId must not be null");
Assert.notNull(resident, "resident must not be null");
Assert.notNull(name, "name must not be null");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,11 @@ public ProfileResponseDto saveProfile(ProfileRequestDto requestDto) {
Profile profile = profileRepository.findProfileByMemberId(requestDto.getMemberId())
.orElse(new Profile());

int rperiod;
boolean gender;
float longitude, latitude;
try {
rperiod = Integer.parseInt(requestDto.getRperiod());
gender = Boolean.parseBoolean(requestDto.getGender());
longitude = Float.parseFloat(requestDto.getLongitude());
latitude = Float.parseFloat(requestDto.getLatitude());
Expand All @@ -65,7 +67,7 @@ public ProfileResponseDto saveProfile(ProfileRequestDto requestDto) {
profile.setGender(gender);
profile.setBirth(LocalDate.parse(requestDto.getBirth()));
profile.setNationality(requestDto.getNationality());
profile.setRperiod(requestDto.getRperiod());
profile.setRperiod(rperiod);
profile.setIntroduction(requestDto.getIntroduction());

String imageUrl = s3Util.profileImageUpload(requestDto.getImage());
Expand Down

0 comments on commit 985eefc

Please sign in to comment.