Skip to content

Commit 4f470e3

Browse files
committed
CLAP-453 Refactor: 첨부 파일 댓글 작성 시에도 modified member이 저장되도록 수정
#592
1 parent cfa304b commit 4f470e3

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

src/main/java/clap/server/application/service/history/PostCommentService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public void saveCommentAttachment(Long memberId, Long taskId, MultipartFile file
7979
Comment comment = Comment.createComment(member, task, null, fileName, fileUrl, formatFileSize(file.getSize()));
8080
Comment savedComment = commandCommentPort.saveComment(comment);
8181

82-
TaskHistory taskHistory = TaskHistory.createTaskHistory(TaskHistoryType.COMMENT_FILE, null, null, null, savedComment);
82+
TaskHistory taskHistory = TaskHistory.createTaskHistory(TaskHistoryType.COMMENT_FILE, null, null, member, savedComment);
8383
commandTaskHistoryPort.save(taskHistory);
8484

8585
Member processor = task.getProcessor();
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
START TRANSACTION;
2+
3+
UPDATE task_history th
4+
SET modified_member_id = (
5+
SELECT member_id FROM comment c WHERE c.comment_id = th.comment_id
6+
)
7+
WHERE th.comment_id IS NOT NULL AND th.type='COMMENT_FILE';
8+
9+
COMMIT;

0 commit comments

Comments
 (0)