-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #246 from Juinjang/dev
[deploy] dev > prod 변경사항 반영
- Loading branch information
Showing
23 changed files
with
262 additions
and
244 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 0 additions & 58 deletions
58
src/main/java/umc/th/juinjang/converter/limjang/LimjangTotalListConverter.java
This file was deleted.
Oops, something went wrong.
40 changes: 0 additions & 40 deletions
40
src/main/java/umc/th/juinjang/converter/limjang/LimjangsGetResponseConverter.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 0 additions & 6 deletions
6
src/main/java/umc/th/juinjang/model/dto/limjang/enums/LimjangCheckListVersionEnum.java
This file was deleted.
Oops, something went wrong.
41 changes: 41 additions & 0 deletions
41
src/main/java/umc/th/juinjang/model/dto/limjang/response/LimjangDetailGetResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package umc.th.juinjang.model.dto.limjang.response; | ||
|
||
import static umc.th.juinjang.service.LimjangService.LimjangPriceBridge.makePriceListVersion2; | ||
|
||
import java.time.LocalDateTime; | ||
import java.util.List; | ||
import lombok.Builder; | ||
import umc.th.juinjang.model.entity.Image; | ||
import umc.th.juinjang.model.entity.enums.LimjangCheckListVersion; | ||
import umc.th.juinjang.model.entity.Limjang; | ||
|
||
@Builder | ||
public record LimjangDetailGetResponse( | ||
long limjangId, | ||
LimjangCheckListVersion checkListVersion, | ||
List<String> images, | ||
int purposeCode, | ||
String nickname, | ||
int priceType, | ||
List<String> priceList, | ||
String address, | ||
String addressDetail, | ||
LocalDateTime createdAt, | ||
LocalDateTime updatedAt | ||
) { | ||
public static LimjangDetailGetResponse of(Limjang limjang){ | ||
return LimjangDetailGetResponse.builder() | ||
.limjangId(limjang.getLimjangId()) | ||
.checkListVersion(LimjangCheckListVersion.getByLimjangType(limjang)) | ||
.images(limjang.getImageList().stream().map(Image::getImageUrl).toList()) | ||
.purposeCode(limjang.getPurpose().getValue()) | ||
.nickname(limjang.getNickname()) | ||
.priceType(limjang.getPriceType().getValue()) | ||
.priceList(makePriceListVersion2(limjang.getPriceType(), limjang.getPurpose(), limjang.getLimjangPrice())) | ||
.address(limjang.getAddress()) | ||
.addressDetail(limjang.getAddressDetail()) | ||
.createdAt(limjang.getCreatedAt()) | ||
.updatedAt(limjang.getUpdatedAt()) | ||
.build(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
src/main/java/umc/th/juinjang/model/dto/limjang/response/LimjangsGetByKeywordResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package umc.th.juinjang.model.dto.limjang.response; | ||
|
||
import static umc.th.juinjang.service.LimjangService.LimjangPriceBridge.makePriceListVersion2; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
import umc.th.juinjang.model.entity.Image; | ||
import umc.th.juinjang.model.entity.Limjang; | ||
|
||
public record LimjangsGetByKeywordResponse(List<LimjangByKeywordResponse> limjangList) { | ||
record LimjangByKeywordResponse( | ||
long limjangId, | ||
List<String> images, | ||
int purposeCode, | ||
boolean isScraped, | ||
String nickname, | ||
int priceType, | ||
List<String> priceList, | ||
String totalAverage, | ||
String address | ||
) { | ||
static LimjangByKeywordResponse of(Limjang limjang, boolean isScraped) { | ||
return new LimjangByKeywordResponse( | ||
limjang.getLimjangId(), | ||
limjang.getImageList().stream().map(Image::getImageUrl).toList(), | ||
limjang.getPurpose().getValue(), | ||
isScraped, | ||
limjang.getNickname(), | ||
limjang.getPriceType().getValue(), | ||
makePriceListVersion2(limjang.getPriceType(), limjang.getPurpose(), limjang.getLimjangPrice()), | ||
limjang.getReport() == null ? null : limjang.getReport().getTotalRate().toString(), | ||
limjang.getAddress() | ||
); | ||
} | ||
} | ||
|
||
public static LimjangsGetByKeywordResponse of(List<Limjang> limjangList, Map<Long, Boolean> mapLimjangToScrapStatus) { | ||
return new LimjangsGetByKeywordResponse(limjangList.stream().map(it -> LimjangByKeywordResponse.of(it, mapLimjangToScrapStatus.get(it.getLimjangId()))).toList()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.