Skip to content

Commit

Permalink
Merge branch 'develop' into fix/759-print-excel-bug
Browse files Browse the repository at this point in the history
  • Loading branch information
4mjeo authored Sep 22, 2024
2 parents 4ca7177 + 9fb2f83 commit f477c62
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 96 deletions.
2 changes: 0 additions & 2 deletions buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,4 @@ object Dependencies {

// slack
const val SLACK = "com.slack.api:slack-api-client:${DependencyVersions.SLACK_VERSION}"

const val CACHE = "org.springframework.boot:spring-boot-starter-cache"
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package team.aliens.dms.domain.student.dto

import com.fasterxml.jackson.annotation.JsonCreator
import com.fasterxml.jackson.annotation.JsonProperty
import team.aliens.dms.domain.manager.spi.vo.StudentWithTag
import team.aliens.dms.domain.student.model.Sex
import team.aliens.dms.domain.student.model.Student
Expand Down Expand Up @@ -48,17 +46,17 @@ data class StudentNameResponse(
val name: String
)

data class StudentDetailsResponse @JsonCreator constructor(
@JsonProperty("id") val id: UUID,
@JsonProperty("name") val name: String,
@JsonProperty("gcn") val gcn: String,
@JsonProperty("profileImageUrl") val profileImageUrl: String,
@JsonProperty("sex") val sex: Sex? = null,
@JsonProperty("bonusPoint") val bonusPoint: Int? = null,
@JsonProperty("minusPoint") val minusPoint: Int? = null,
@JsonProperty("roomNumber") val roomNumber: String? = null,
@JsonProperty("roomMates") val roomMates: List<RoomMate>? = null,
@JsonProperty("tags") val tags: List<TagResponse>? = null
data class StudentDetailsResponse(
val id: UUID,
val name: String,
val gcn: String,
val profileImageUrl: String,
val sex: Sex? = null,
val bonusPoint: Int? = null,
val minusPoint: Int? = null,
val roomNumber: String? = null,
val roomMates: List<RoomMate>? = null,
val tags: List<TagResponse>? = null
) {
data class RoomMate(
val id: UUID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package team.aliens.dms.domain.tag.dto
import team.aliens.dms.domain.tag.model.Tag
import java.util.UUID


data class TagResponse(
val id: UUID,
val name: String?,
Expand Down
2 changes: 0 additions & 2 deletions dms-infrastructure/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ dependencies {
// notification
implementation(Dependencies.FCM)

//cache
implementation(Dependencies.CACHE)
}

tasks.getByName<Jar>("jar") {
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ import jakarta.validation.Valid
import jakarta.validation.constraints.Email
import jakarta.validation.constraints.NotBlank
import jakarta.validation.constraints.NotNull
import org.springframework.cache.annotation.CacheConfig
import org.springframework.cache.annotation.CacheEvict
import org.springframework.cache.annotation.Cacheable
import org.springframework.http.HttpStatus
import org.springframework.validation.annotation.Validated
import org.springframework.web.bind.annotation.DeleteMapping
Expand Down Expand Up @@ -59,7 +56,6 @@ import team.aliens.dms.domain.student.usecase.UpdateStudentProfileUseCase
import team.aliens.dms.domain.student.usecase.UpdateStudentRoomByFileUseCase
import java.util.UUID

@CacheConfig(cacheNames = ["student"])
@Validated
@RequestMapping("/students")
@RestController
Expand Down Expand Up @@ -161,7 +157,6 @@ class StudentWebAdapter(
return checkStudentGcnUseCase.execute(request)
}

@CacheEvict(allEntries = true)
@ResponseStatus(HttpStatus.NO_CONTENT)
@PatchMapping("/profile")
fun updateProfile(@RequestBody @Valid webRequest: UpdateStudentProfileWebRequest) {
Expand All @@ -173,7 +168,6 @@ class StudentWebAdapter(
return studentMyPageUseCase.execute()
}

@CacheEvict(allEntries = true)
@ResponseStatus(HttpStatus.NO_CONTENT)
@DeleteMapping
fun withdrawal() {
Expand All @@ -187,7 +181,6 @@ class StudentWebAdapter(
return response.file
}

@Cacheable
@GetMapping("/manager")
fun managerGetAllStudents(
@RequestParam(required = false) name: String?,
Expand All @@ -209,34 +202,29 @@ class StudentWebAdapter(
)
}

@Cacheable
@GetMapping("/{student-id}")
fun getStudentDetails(@PathVariable("student-id") @NotNull studentId: UUID): StudentDetailsResponse {
return queryStudentDetailsUseCase.execute(studentId)
}

@CacheEvict(allEntries = true)
@ResponseStatus(HttpStatus.NO_CONTENT)
@DeleteMapping("/{student-id}")
fun deleteStudent(@PathVariable("student-id") @NotNull studentId: UUID) {
removeStudentUseCase.execute(studentId)
}

@CacheEvict(allEntries = true)
@ResponseStatus(HttpStatus.NO_CONTENT)
@PostMapping("/file/room")
fun updateStudentRoomByFile(@RequestPart @NotNull file: MultipartFile?) {
updateStudentRoomByFileUseCase.execute(file!!.toFile())
}

@CacheEvict(allEntries = true)
@ResponseStatus(HttpStatus.NO_CONTENT)
@PostMapping("/file/gcn")
fun updateStudentGcnByFile(@RequestPart @NotNull file: MultipartFile?) {
updateStudentGcnByFileUseCase.execute(file!!.toFile())
}

@CacheEvict(allEntries = true)
@ResponseStatus(HttpStatus.CREATED)
@PostMapping("/verified-student")
fun importVerifiedStudentFromExcel(@RequestPart @NotNull file: MultipartFile?) {
Expand Down

0 comments on commit f477c62

Please sign in to comment.