Skip to content

Commit

Permalink
#261 fix(*): 주유기록 조회시 gastype dto 한글로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
gyuturn committed Feb 22, 2023
1 parent cade023 commit b3e7b47
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static UserGasRecordResDto toUserGasRecordResDto(UserGasRecord userGasRec
return UserGasRecordResDto.builder()
.chargeDate((userGasRecord.getChargeDate()))
.gasStationName(gasStation.getName())
.gasType(userGasRecord.getRecordGasType().getOpinetGasType())
.gasType(userGasRecord.getRecordGasType().getDtoName())
.recordGasAmount(userGasRecord.getRecordGasAmount() + "L")
.refuelingPrice(userGasRecord.getRefuelingPrice() + "원")
.savingPrice(userGasRecord.getSavingPrice() + "원")
Expand Down
12 changes: 7 additions & 5 deletions backend/src/main/java/com/kaspi/backend/enums/GasType.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@

@Getter
public enum GasType {
PREMIUM_GASOLINE("고급휘발유"),
GASOLINE("휘발유"),
DIESEL("자동차용경유"),
LPG("자동차용부탄");
PREMIUM_GASOLINE("고급휘발유","고급휘발유"),
GASOLINE("휘발유","휘발유"),
DIESEL("자동차용경유","경유"),
LPG("자동차용부탄","LPG");

private String opinetGasType;
private String dtoName;

GasType(String opinetGasType) {
GasType(String opinetGasType,String dtoName) {
this.opinetGasType = opinetGasType;
this.dtoName = dtoName;
}

public static Optional<GasType> getTypeFromOpinetData(String opinetdata) {
Expand Down

0 comments on commit b3e7b47

Please sign in to comment.