Skip to content
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

#261code_fix -> dev: 최종 수정사항 #277

Merged
merged 1 commit into from
Feb 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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