Skip to content

Commit

Permalink
Merge pull request #36 from Imsyp/main
Browse files Browse the repository at this point in the history
feat: architecture change in Posty
  • Loading branch information
Imsyp authored Sep 27, 2024
2 parents c26f896 + 0a6cabc commit 50592be
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 5 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified server/build/tmp/compileJava/previous-compilation-data.bin
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

package com.swdc.server.controller;

import com.swdc.server.domain.Storage.Price;
import com.swdc.server.domain.storage.Price;
import com.swdc.server.service.PriceService;
import jakarta.servlet.http.HttpServletRequest;
import lombok.RequiredArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
*/

package com.swdc.server.domain.Storage;
package com.swdc.server.domain.storage;

import lombok.Builder;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
*/

package com.swdc.server.domain.Storage;
package com.swdc.server.domain.storage;

import lombok.Getter;
import lombok.NoArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

package com.swdc.server.service;

import com.swdc.server.domain.Storage.Price;
import com.swdc.server.domain.storage.Price;
import lombok.RequiredArgsConstructor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -94,7 +94,12 @@ public Price getProductDetailsWithoutCategory(String platform, String product_id
try (BufferedReader bufferedReader = Files.newBufferedReader(filePath)) {
List<Map<String, Integer>> prices = bufferedReader.lines()
.map(line -> line.split(","))
.map(parts -> Map.of(parts[0], Integer.parseInt(parts[1])))
.map(parts -> {
// 날짜와 시간 부분을 키로, 가격을 값으로 맵 구성
String dateTime = parts[0] + "," + parts[1]; // "2024-09-20,09:00" 형태
int price = Integer.parseInt(parts[2]); // "8000"을 정수로 변환
return Map.of(dateTime, price); // Map<String, Integer> 생성
})
.collect(Collectors.toList());
allPrices.addAll(prices);
} catch (IOException e) {
Expand Down

0 comments on commit 50592be

Please sign in to comment.