Skip to content

Commit c3362b5

Browse files
authored
Merge pull request #221 from FunD-StockProject/fix/notification-score
Fix: 알림에 점수들 제대로 반영되도록 변경
2 parents 5f92d68 + ecafcb4 commit c3362b5

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/main/java/com/fund/stockProject/notification/service/NotificationService.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ public void createScheduledNotification(User user, NotificationType type, String
5757
*/
5858
@Transactional
5959
public void createScheduledStockNotification(User user, Stock stock, NotificationType type,
60-
String title, String body, Instant scheduledAt) {
61-
createNotification(user, stock, type, title, body, null, null, null, scheduledAt);
60+
String title, String body, Integer oldScore,
61+
Integer newScore, Integer changeAbs, Instant scheduledAt) {
62+
createNotification(user, stock, type, title, body, oldScore, newScore, changeAbs, scheduledAt);
6263
}
6364

6465
/**

src/main/java/com/fund/stockProject/notification/service/StockScoreAlertService.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ public void onScoreChanged(Integer stockId, int oldScore, int newScore) {
5757
preference.getStock(),
5858
NotificationType.SCORE_SPIKE,
5959
title,
60-
body,
60+
body,
61+
oldScore,
62+
newScore,
63+
delta,
6164
scheduledAt
6265
);
6366
}

0 commit comments

Comments
 (0)