소스 검색

update

tags/Baseline_30082024_BACKEND_UAT
MSI\derek 1 년 전
부모
커밋
879056f353
1개의 변경된 파일2개의 추가작업 그리고 7개의 파일을 삭제
  1. +2
    -7
      src/main/java/com/ffii/tsms/modules/data/web/TeamController.kt

+ 2
- 7
src/main/java/com/ffii/tsms/modules/data/web/TeamController.kt 파일 보기

@@ -43,14 +43,9 @@ class TeamController(
@GetMapping("/{id}") @GetMapping("/{id}")
fun getStaff(@PathVariable id: Long): Map<String, Any> { fun getStaff(@PathVariable id: Long): Map<String, Any> {
val staffList = staffsService.findAllByTeamId(id).orElseThrow { NotFoundException() } val staffList = staffsService.findAllByTeamId(id).orElseThrow { NotFoundException() }
val staffIdList: MutableList<Long> = mutableListOf()
for (staff in staffList) {
staffIdList.add(staff.id as Long)
}
// val map: Map<String, Any> = java.util.Map.of("team" to teamService.find(id).orElseThrow { NotFoundException() })
// map["staffIds"] = staffIdList
val staffIdList: List<Long?> = staffList.map { it.id }
return java.util.Map.of( return java.util.Map.of(
"team", staffsService.find(id).orElseThrow { NotFoundException() },
"team", teamService.find(id).orElseThrow { NotFoundException() },
"staffIds", staffIdList "staffIds", staffIdList
) )
} }


불러오는 중...
취소
저장