Skip to content

Commit

Permalink
feat: (#672) UseCase 에 slack api 로직 추가 & SendBugService
Browse files Browse the repository at this point in the history
  • Loading branch information
zios0707 committed Aug 30, 2024
1 parent ac70809 commit e628c66
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ import team.aliens.dms.common.annotation.Service

@Service
class BugService(
commandBugService: CommandBugService
) : CommandBugService by commandBugService
commandBugService: CommandBugService,
sendBugService: SendBugService
) : CommandBugService by commandBugService,
SendBugService by sendBugService
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package team.aliens.dms.domain.bug.service

import team.aliens.dms.domain.bug.model.BugReport

interface SendBugService {

fun sendBugReport(bugReport: BugReport)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package team.aliens.dms.domain.bug.service

import team.aliens.dms.common.annotation.Service
import team.aliens.dms.domain.bug.model.BugReport
import team.aliens.dms.domain.bug.spi.SendBugPort

@Service
class SendBugServiceImpl(
private val sendBugPort: SendBugPort
) : SendBugService {

override fun sendBugReport(bugReport: BugReport) {
sendBugPort.sendBugReport(bugReport)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ class CreateBugReportUseCase(

val attachmentUrls = request.attachmentUrls ?: emptyList()

bugService.saveBugReport(
BugReport(
studentId = student.id,
content = request.content,
developmentArea = DevelopmentArea.valueOf(request.developmentArea),
createdAt = LocalDateTime.now(),
attachmentUrls = BugAttachment(attachmentUrls)
bugService.sendBugReport(
bugService.saveBugReport(
BugReport(
studentId = student.id,
content = request.content,
developmentArea = DevelopmentArea.valueOf(request.developmentArea),
createdAt = LocalDateTime.now(),
attachmentUrls = BugAttachment(attachmentUrls)
)
)
)
}
Expand Down

0 comments on commit e628c66

Please sign in to comment.