Skip to content

Commit e4f3f6f

Browse files
authored
Merge pull request #522 from TaskFlow-CLAP/CLAP-403
CLAP-403 작업 승인시 아지트 알림 생성 에러 해결 및 알림 전체 확인 처리 에러 해결
2 parents 4c16322 + e4ded77 commit e4f3f6f

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

src/main/java/clap/server/adapter/outbound/api/agit/AgitTemplateBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ public String createMessage(PushNotificationTemplate request, String taskDetailU
5252

5353
case PROCESSOR_CHANGED -> "담당자가 " + "*" + request.message() + "*" + "으로 변경되었습니다.";
5454

55-
case PROCESSOR_ASSIGNED -> "작업이 *승인*되었습니다.*\n"
56-
+ "\\t\\t*• 👤 담당자:* " + "*" + request.message() + "*";
55+
case PROCESSOR_ASSIGNED -> "*작업*이 *승인*되었습니다.\\n"
56+
+ "\\t\\t*•담당자:* " + "*" + request.message() + "*";
5757

5858
default -> null;
5959
};

src/main/java/clap/server/adapter/outbound/persistense/repository/notification/NotificationRepository.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Slice<NotificationEntity> findAllByReceiver_MemberIdOrderByCreatedAtDesc(
2525
@Query("SELECT n FROM NotificationEntity n " +
2626
"WHERE n.receiver.memberId = :receiverId " +
2727
"AND n.task.isDeleted = false")
28-
List<NotificationEntity> findAllByReceiver_MemberId(Long memberId);
28+
List<NotificationEntity> findAllByReceiver_MemberId(Long receiverId);
2929

3030
List<NotificationEntity> findByTask_TaskId(Long taskId);
3131

src/main/java/clap/server/application/service/task/TerminateTaskService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ public class TerminateTaskService implements TerminateTaskUsecase {
2828

2929
@Override
3030
public void terminateTask(Long memberId, Long taskId, String reason) {
31-
memberService.findReviewer(memberId);
3231
Task task = taskService.findById(taskId);
3332
task.terminateTask();
3433
taskService.upsert(task);
@@ -42,5 +41,6 @@ public void terminateTask(Long memberId, Long taskId, String reason) {
4241

4342
private void publishNotification(Member receiver, Task task, String message, String reason) {
4443
sendNotificationService.sendPushNotification(receiver, NotificationType.STATUS_SWITCHED, task, message, reason, null, false);
44+
sendNotificationService.sendAgitNotification(NotificationType.STATUS_SWITCHED, task, message, null);
4545
}
4646
}

src/main/java/clap/server/application/service/webhook/SendAgitService.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import clap.server.domain.model.task.Task;
88
import lombok.RequiredArgsConstructor;
99
import org.springframework.stereotype.Service;
10+
import org.springframework.transaction.annotation.Transactional;
1011

1112
@Service
1213
@RequiredArgsConstructor
@@ -15,6 +16,7 @@ public class SendAgitService {
1516
private final SendAgitPort agitPort;
1617
private final TaskService taskService;
1718

19+
@Transactional
1820
public void sendAgit(PushNotificationTemplate request, Task task, String taskDetailUrl) {
1921
Long agitPostId = agitPort.sendAgit(request, task, taskDetailUrl);
2022

src/main/java/clap/server/application/service/webhook/SendNotificationService.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ public void sendPushNotification(Member receiver, NotificationType notificationT
8686
}
8787

8888
@Async("notificationExecutor")
89-
@Transactional
9089
public void sendAgitNotification(NotificationType notificationType,
9190
Task task, String message, String commenterName) {
9291
PushNotificationTemplate pushNotificationTemplate = new PushNotificationTemplate(

0 commit comments

Comments
 (0)