diff --git a/src/main/java/com/Han2m/portLogistics/user/dto/res/ResSignupDto.java b/src/main/java/com/Han2m/portLogistics/user/dto/res/ResSignupDto.java deleted file mode 100644 index 54f570d..0000000 --- a/src/main/java/com/Han2m/portLogistics/user/dto/res/ResSignupDto.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.Han2m.portLogistics.user.dto.res; - -public class ResSignupDto { - - private String memberId; - private String password; - - public ResSignupDto(String memberId, String password) { - this.memberId = memberId; - this.password = password; - } -} diff --git a/src/main/java/com/Han2m/portLogistics/user/service/GuestService.java b/src/main/java/com/Han2m/portLogistics/user/service/GuestService.java index 1545f8f..ab37eaf 100644 --- a/src/main/java/com/Han2m/portLogistics/user/service/GuestService.java +++ b/src/main/java/com/Han2m/portLogistics/user/service/GuestService.java @@ -89,6 +89,7 @@ public ResGuestDto editGuestInfo(Long id, ReqGuestDto updatedReqGuestDTO) { return new ResGuestDto(guest); } + @Transactional(readOnly = true) public ResGuestDto getGuestById(Long id) { Guest guest = guestRepository.findById(id).orElseThrow(EntityNotFoundException::new); @@ -103,11 +104,13 @@ public void deleteGuest(Long id) { }).orElseThrow(EntityNotFoundException::new); } + @Transactional(readOnly = true) public Page getAllGuests(Pageable pageable) { Page guests = guestRepository.findAll(pageable); return guests.map(ResGuestDto::new); } + @Transactional(readOnly = true) public List searchGuestByName(String name) { List guests = guestRepository.findByName(name); return guests.stream().map(ResGuestDto::new).collect(Collectors.toList()); diff --git a/src/main/java/com/Han2m/portLogistics/user/service/StatusService.java b/src/main/java/com/Han2m/portLogistics/user/service/StatusService.java index 6fc36a4..99a7b4b 100644 --- a/src/main/java/com/Han2m/portLogistics/user/service/StatusService.java +++ b/src/main/java/com/Han2m/portLogistics/user/service/StatusService.java @@ -59,12 +59,13 @@ public ResStatusDto registerWorkerOut(Long id, Long wharfId){ } - + @Transactional(readOnly = true) public List getAllWorkerInWharf(){ List statuses = statusRepository.findByOutTimeIsNull(); return statuses.stream().map(ResStatusDto::new).collect(Collectors.toList()); } + @Transactional(readOnly = true) public List getWorkerInWharf(Long wharfId){ List statuses = statusRepository.findByOutTimeIsNullAndWharfWharfId(wharfId); return statuses.stream().map(ResStatusDto::new).collect(Collectors.toList()); diff --git a/src/main/java/com/Han2m/portLogistics/user/service/WorkerService.java b/src/main/java/com/Han2m/portLogistics/user/service/WorkerService.java index adb2806..f414089 100644 --- a/src/main/java/com/Han2m/portLogistics/user/service/WorkerService.java +++ b/src/main/java/com/Han2m/portLogistics/user/service/WorkerService.java @@ -36,6 +36,7 @@ public class WorkerService { // Worker 조회 + @Transactional(readOnly = true) public ResWorkerDto getWorkerById(Long id) { Worker worker = workerRepository.findById(id).orElseThrow(EntityNotFoundException::new); @@ -123,12 +124,13 @@ public ResWorkerDto registerWorkerUrl(Worker worker, String faceUrl) { return new ResWorkerDto(worker); } - + @Transactional(readOnly = true) public Page getAllWorkers(Pageable pageable) { Page workers = workerRepository.findAll(pageable); return workers.map(ResWorkerDto::new); } + @Transactional(readOnly = true) public List searchWorkerByName(String name) { List workers = workerRepository.findByName(name); return workers.stream().map(ResWorkerDto::new).collect(Collectors.toList());