-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Added requests, responses, and search conditions #99
Conversation
public class FoodSearchCondition { | ||
// TODO 거리 추가 구현 | ||
// 위도 경도 DEFAULT SET TO LONDON | ||
Double lat = 51.5072; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
상수 또는 설정을 추천드립니다.
@Getter @Setter | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class UpdateFoodRequestDTO { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create 때 사용되는 DTO의 재사용 또는 중복을 줄일 수 있는 방법을 고민해보시면 좋습니다.
@@ -41,16 +39,56 @@ public class FoodDTO { | |||
@JsonProperty("currency_symbol") | |||
private String currencySymbol; | |||
|
|||
@JsonProperty("rate") | |||
private double rate; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BigDecimal 사용을 추천드립니다
return new PageImpl<>(result, pageable, count); | ||
} | ||
|
||
private BooleanExpression eqFoodName(String search) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eq 로직을 계속 반복하지 않는 방법은 없을까요?
return (search != null) ? food.store.name.containsIgnoreCase(search) : null; | ||
} | ||
|
||
private OrderSpecifier[] getOrders(List<String> sortBy) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
List, Map, Array의 사용과 이유가 궁금합니다
|
||
@Transactional | ||
public void createFood(CreateFoodRequestDTO request) { | ||
Currency currency = findCurrency(request.getCurrencyCode()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 로직이 특별히 여기에 있어야하는 이유가 궁금합니다
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이건 가게 입장에서 음식을 등록할 때 결제 화폐까지 등록하는 것을 생각하고 넣었습니다.
만약 저희가 지원하지 않는 화폐를 등록하려고 할 때는 등록하지 않게 설정 하려고 했습니다만 지우도록 하겠습니다.
@Transactional | ||
public void updateFood(Long foodId, UpdateFoodRequestDTO request) { | ||
Food food = findFood(foodId); | ||
Currency currency = findCurrency(request.getCurrencyCode()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
위와 동일합니다
HCP Terraform Plan Output
|
ps.