Skip to content
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 @@ -52,8 +52,8 @@ public String createMessage(PushNotificationTemplate request, String taskDetailU

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

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

default -> null;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Slice<NotificationEntity> findAllByReceiver_MemberIdOrderByCreatedAtDesc(
@Query("SELECT n FROM NotificationEntity n " +
"WHERE n.receiver.memberId = :receiverId " +
"AND n.task.isDeleted = false")
List<NotificationEntity> findAllByReceiver_MemberId(Long memberId);
List<NotificationEntity> findAllByReceiver_MemberId(Long receiverId);

List<NotificationEntity> findByTask_TaskId(Long taskId);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ public class TerminateTaskService implements TerminateTaskUsecase {

@Override
public void terminateTask(Long memberId, Long taskId, String reason) {
memberService.findReviewer(memberId);
Task task = taskService.findById(taskId);
task.terminateTask();
taskService.upsert(task);
Expand All @@ -42,5 +41,6 @@ public void terminateTask(Long memberId, Long taskId, String reason) {

private void publishNotification(Member receiver, Task task, String message, String reason) {
sendNotificationService.sendPushNotification(receiver, NotificationType.STATUS_SWITCHED, task, message, reason, null, false);
sendNotificationService.sendAgitNotification(NotificationType.STATUS_SWITCHED, task, message, null);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import clap.server.domain.model.task.Task;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@RequiredArgsConstructor
Expand All @@ -15,6 +16,7 @@ public class SendAgitService {
private final SendAgitPort agitPort;
private final TaskService taskService;

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ public void sendPushNotification(Member receiver, NotificationType notificationT
}

@Async("notificationExecutor")
@Transactional
public void sendAgitNotification(NotificationType notificationType,
Task task, String message, String commenterName) {
PushNotificationTemplate pushNotificationTemplate = new PushNotificationTemplate(
Expand Down