diff --git a/src/main/java/com/xit/biz/ctgy/controller/MinUserinfoController.java b/src/main/java/com/xit/biz/ctgy/controller/MinUserinfoController.java index 7e160fa..3223941 100644 --- a/src/main/java/com/xit/biz/ctgy/controller/MinUserinfoController.java +++ b/src/main/java/com/xit/biz/ctgy/controller/MinUserinfoController.java @@ -30,7 +30,7 @@ import org.springframework.web.bind.annotation.RestController; @Tag(name = "MinUserinfoController", description = "사용자 관리") @RestController -@RequestMapping("/api/v1/ctgy") +@RequestMapping("/api/v1/ctgy/user") @Validated @RequiredArgsConstructor public class MinUserinfoController { @@ -47,7 +47,7 @@ public class MinUserinfoController { @Parameter(in = ParameterIn.QUERY, name = "page", description = "페이지", required = true, example = "0"), @Parameter(in = ParameterIn.QUERY, name = "size", description = "페이지당갯수", required = true, example = "10") }) - @GetMapping(value="users", produces = MediaType.APPLICATION_JSON_VALUE) + @GetMapping(produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity findMinUserinfos( @Parameter(hidden = true) @ModelAttribute("minUserinfoDto") @@ -58,7 +58,7 @@ public class MinUserinfoController { } @Operation(summary = "사용자 정보 조회" , description = "사용자 정보 조회") - @GetMapping("/user") + @GetMapping("/info") @Secured(policy = SecurityPolicy.TOKEN) @Transactional(readOnly = true) public ResponseEntity getUserInfo() { diff --git a/src/main/java/com/xit/biz/ctgy/controller/MinSimsa680Controller.java b/src/main/java/com/xit/biz/ctgy/controller/ParkingController.java similarity index 63% rename from src/main/java/com/xit/biz/ctgy/controller/MinSimsa680Controller.java rename to src/main/java/com/xit/biz/ctgy/controller/ParkingController.java index d69b484..eed12de 100644 --- a/src/main/java/com/xit/biz/ctgy/controller/MinSimsa680Controller.java +++ b/src/main/java/com/xit/biz/ctgy/controller/ParkingController.java @@ -1,10 +1,9 @@ package com.xit.biz.ctgy.controller; -import com.xit.biz.ctgy.dto.MinSimsa680Dto; import com.xit.biz.ctgy.dto.MinSimsa680GroupDto; import com.xit.biz.ctgy.dto.struct.MinSimsa680GroupMapstruct; import com.xit.biz.ctgy.dto.struct.MinSimsa680Mapstruct; -import com.xit.biz.ctgy.service.IMinSimsa680Service; +import com.xit.biz.ctgy.service.IParkingService; import com.xit.core.api.IRestResponse; import com.xit.core.api.RestResponse; import io.swagger.v3.oas.annotations.Operation; @@ -17,7 +16,6 @@ import org.mapstruct.factory.Mappers; import org.springframework.data.domain.Pageable; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; -import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; @@ -25,19 +23,19 @@ import org.springframework.web.bind.annotation.RestController; import javax.validation.Valid; -@Tag(name = "MinCivBoard680Controller", description = "게시글 관리") +@Tag(name = "ParkingController", description = "주정차의견진술") @RestController -@RequestMapping("/api/v1/ctgy/simsa") +@RequestMapping("/api/v1/ctgy/parking") @Validated @RequiredArgsConstructor -public class MinSimsa680Controller { +public class ParkingController { - private final IMinSimsa680Service service; + private final IParkingService service; private final MinSimsa680Mapstruct mapstruct = Mappers.getMapper(MinSimsa680Mapstruct.class); private final MinSimsa680GroupMapstruct groupMapstruct = Mappers.getMapper(MinSimsa680GroupMapstruct.class); - @Operation(summary = "심사(대상) 목록 조회" , description = "심사(대상) 목록 조회") + @Operation(summary = "주정차의견진술심의목록" , description = "주정차의견진술심의목록") @Parameters({ @Parameter(in = ParameterIn.QUERY, name = "msYear", description = "심사년도", required = true, example = "2021"), @Parameter(in = ParameterIn.QUERY, name = "msChasu", description = "차수", required = false, example = " "), @@ -45,17 +43,17 @@ public class MinSimsa680Controller { @Parameter(in = ParameterIn.QUERY, name = "size", description = "페이지당갯수", required = true, example = "10") }) - @GetMapping(value="review", produces = MediaType.APPLICATION_JSON_VALUE) - public ResponseEntity findMinSimsa680Groups( + @GetMapping(produces = MediaType.APPLICATION_JSON_VALUE) + public ResponseEntity findSimsas( @Valid @Parameter(hidden = true) final MinSimsa680GroupDto dto, @Parameter(hidden = true) final Pageable pageable) { - return RestResponse.of(service.findGroups(dto, pageable)); + return RestResponse.of(service.findSimsas(dto, pageable)); } - @Operation(summary = "심사(대상) 상세 조회" , description = "심사(대상) 상세 조회") + @Operation(summary = "주정차의견진술심의목록-상세" , description = "주정차의견진술심의목록-상세") @Parameters({ @Parameter(in = ParameterIn.QUERY, name = "msSdate", description = "심사시작일", required = true, example = "2021-01-04"), @Parameter(in = ParameterIn.QUERY, name = "msEdate", description = "심사종료일", required = true, example = "2021-01-05"), @@ -63,27 +61,27 @@ public class MinSimsa680Controller { @Parameter(in = ParameterIn.QUERY, name = "msuTeam", description = "팀코드", required = true, example = "002") }) @GetMapping(value="details", produces = MediaType.APPLICATION_JSON_VALUE) - public ResponseEntity findMinSimsa680Details( + public ResponseEntity findSimsaDetails( @Valid @Parameter(hidden = true) final MinSimsa680GroupDto dto) { - return RestResponse.of(service.findDetails(dto)); + return RestResponse.of(service.findSimsaDetails(dto)); } // TODO :: 파라메터 정의 필요 - @Operation(summary = "심사(대상)자 조회" , description = "심사(대상)자 조회") - @Parameters({ - @Parameter(in = ParameterIn.QUERY, name = "page", description = "페이지", required = true, example = "0"), - @Parameter(in = ParameterIn.QUERY, name = "size", description = "페이지당갯수", required = true, example = "10") - }) - @GetMapping(produces = MediaType.APPLICATION_JSON_VALUE) - @Transactional(readOnly = true) - public ResponseEntity findMinSimsa680s( - @Parameter(hidden = true) - final MinSimsa680Dto minSimsa680Dto, - @Parameter(hidden = true) - final Pageable pageable) { - return RestResponse.of(service.findMinSimsa680s2(mapstruct.toEntity(minSimsa680Dto), pageable)); - } +// @Operation(summary = "심사(대상)자 조회" , description = "심사(대상)자 조회") +// @Parameters({ +// @Parameter(in = ParameterIn.QUERY, name = "page", description = "페이지", required = true, example = "0"), +// @Parameter(in = ParameterIn.QUERY, name = "size", description = "페이지당갯수", required = true, example = "10") +// }) +// @GetMapping(produces = MediaType.APPLICATION_JSON_VALUE) +//// @Transactional(readOnly = true) +// public ResponseEntity findMinSimsa680s( +// @Parameter(hidden = true) +// final MinSimsa680Dto minSimsa680Dto, +// @Parameter(hidden = true) +// final Pageable pageable) { +// return RestResponse.of(service.findMinSimsa680s2(mapstruct.toEntity(minSimsa680Dto), pageable)); +// } } diff --git a/src/main/java/com/xit/biz/ctgy/repository/IMinSimsa680Repository.java b/src/main/java/com/xit/biz/ctgy/repository/IParkingRepository.java similarity index 56% rename from src/main/java/com/xit/biz/ctgy/repository/IMinSimsa680Repository.java rename to src/main/java/com/xit/biz/ctgy/repository/IParkingRepository.java index 7f46169..aab5aa7 100644 --- a/src/main/java/com/xit/biz/ctgy/repository/IMinSimsa680Repository.java +++ b/src/main/java/com/xit/biz/ctgy/repository/IParkingRepository.java @@ -3,5 +3,5 @@ package com.xit.biz.ctgy.repository; import com.xit.biz.ctgy.entity.MinSimsa680; import org.springframework.data.jpa.repository.JpaRepository; -public interface IMinSimsa680Repository extends JpaRepository, IMinSimsa680RepositoryCustom { +public interface IParkingRepository extends JpaRepository, IParkingRepositoryCustom { } diff --git a/src/main/java/com/xit/biz/ctgy/repository/IMinSimsa680RepositoryCustom.java b/src/main/java/com/xit/biz/ctgy/repository/IParkingRepositoryCustom.java similarity index 60% rename from src/main/java/com/xit/biz/ctgy/repository/IMinSimsa680RepositoryCustom.java rename to src/main/java/com/xit/biz/ctgy/repository/IParkingRepositoryCustom.java index 3fddbe7..0f2bba3 100644 --- a/src/main/java/com/xit/biz/ctgy/repository/IMinSimsa680RepositoryCustom.java +++ b/src/main/java/com/xit/biz/ctgy/repository/IParkingRepositoryCustom.java @@ -8,9 +8,9 @@ import org.springframework.data.domain.Pageable; import java.util.List; -public interface IMinSimsa680RepositoryCustom { - Page findMinSimsa680Groups(MinSimsa680GroupDto pMinSimsa680GroupDto, Pageable pageable); - List findMinSimsa680Details(MinSimsa680GroupDto minSimsa680GroupDto); +public interface IParkingRepositoryCustom { + Page findSimsas(MinSimsa680GroupDto pMinSimsa680GroupDto, Pageable pageable); + List findSimsaDetails(MinSimsa680GroupDto minSimsa680GroupDto); Page findMinSimsa680s2(Pageable pageable); } diff --git a/src/main/java/com/xit/biz/ctgy/repository/IMinSimsa680RepositoryImpl.java b/src/main/java/com/xit/biz/ctgy/repository/IParkingRepositoryImpl.java similarity index 95% rename from src/main/java/com/xit/biz/ctgy/repository/IMinSimsa680RepositoryImpl.java rename to src/main/java/com/xit/biz/ctgy/repository/IParkingRepositoryImpl.java index f0261fb..24e62e9 100644 --- a/src/main/java/com/xit/biz/ctgy/repository/IMinSimsa680RepositoryImpl.java +++ b/src/main/java/com/xit/biz/ctgy/repository/IParkingRepositoryImpl.java @@ -14,7 +14,6 @@ import org.springframework.data.domain.Page; import org.springframework.data.domain.PageImpl; import org.springframework.data.domain.Pageable; -import java.time.LocalDate; import java.util.List; import static com.xit.biz.ctgy.entity.QMinSimsa680.minSimsa680; @@ -22,12 +21,12 @@ import static com.xit.biz.ctgy.entity.QMinSimsaUser680.minSimsaUser680; import static com.xit.biz.ctgy.entity.QMinUserinfo.minUserinfo; @RequiredArgsConstructor -public class IMinSimsa680RepositoryImpl implements IMinSimsa680RepositoryCustom { +public class IParkingRepositoryImpl implements IParkingRepositoryCustom { private final JPAQueryFactory queryFactory; @Override - public Page findMinSimsa680Groups(MinSimsa680GroupDto pMinSimsa680GroupDto, Pageable pageable) { + public Page findSimsas(MinSimsa680GroupDto pMinSimsa680GroupDto, Pageable pageable) { /* SELECT MS_CHASU, MS_SDATE, MS_STARTSI, MS_EDATE, MS_CDATE, MS_CLOSESI, COUNT(*) CNT FROM MIN_SIMSA680 @@ -68,7 +67,7 @@ public class IMinSimsa680RepositoryImpl implements IMinSimsa680RepositoryCustom return new PageImpl<>(rslt.getResults(), pageable, rslt.getTotal()); } - public List findMinSimsa680Details(MinSimsa680GroupDto dto) { + public List findSimsaDetails(MinSimsa680GroupDto dto) { BooleanBuilder builder = new BooleanBuilder(); builder.and(minSimsa680.msSdate.eq(dto.getMsSdate())); diff --git a/src/main/java/com/xit/biz/ctgy/service/IMinSimsa680Service.java b/src/main/java/com/xit/biz/ctgy/service/IParkingService.java similarity index 77% rename from src/main/java/com/xit/biz/ctgy/service/IMinSimsa680Service.java rename to src/main/java/com/xit/biz/ctgy/service/IParkingService.java index 5cc7ed9..92b9cf6 100644 --- a/src/main/java/com/xit/biz/ctgy/service/IMinSimsa680Service.java +++ b/src/main/java/com/xit/biz/ctgy/service/IParkingService.java @@ -8,11 +8,11 @@ import org.springframework.data.domain.Pageable; import java.util.List; -public interface IMinSimsa680Service { +public interface IParkingService { //Page findMinSimsa680Groups(MinSimsa680 minSimsa680, Pageable pageable); - Page findGroups(MinSimsa680GroupDto minSimsa680GroupDto, Pageable pageable); - List findDetails(MinSimsa680GroupDto minSimsa680GroupDto); + Page findSimsas(MinSimsa680GroupDto minSimsa680GroupDto, Pageable pageable); + List findSimsaDetails(MinSimsa680GroupDto minSimsa680GroupDto); Page findAll(MinSimsa680 minSimsa680, Pageable pageable); diff --git a/src/main/java/com/xit/biz/ctgy/service/impl/MinSimsa680Service.java b/src/main/java/com/xit/biz/ctgy/service/impl/ParkingService.java similarity index 67% rename from src/main/java/com/xit/biz/ctgy/service/impl/MinSimsa680Service.java rename to src/main/java/com/xit/biz/ctgy/service/impl/ParkingService.java index 9972b64..c40269c 100644 --- a/src/main/java/com/xit/biz/ctgy/service/impl/MinSimsa680Service.java +++ b/src/main/java/com/xit/biz/ctgy/service/impl/ParkingService.java @@ -3,11 +3,14 @@ package com.xit.biz.ctgy.service.impl; import com.xit.biz.ctgy.dto.MinSimsa680GroupDto; import com.xit.biz.ctgy.dto.MinSimsaReviewGroupDto; import com.xit.biz.ctgy.entity.MinSimsa680; -import com.xit.biz.ctgy.repository.IMinSimsa680Repository; -import com.xit.biz.ctgy.service.IMinSimsa680Service; +import com.xit.biz.ctgy.repository.IParkingRepository; +import com.xit.biz.ctgy.service.IParkingService; import com.xit.core.support.jpa.JpaUtil; import lombok.RequiredArgsConstructor; -import org.springframework.data.domain.*; +import org.springframework.data.domain.Example; +import org.springframework.data.domain.ExampleMatcher; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -17,9 +20,9 @@ import static org.springframework.data.domain.ExampleMatcher.GenericPropertyMatc @Service @RequiredArgsConstructor -public class MinSimsa680Service implements IMinSimsa680Service { +public class ParkingService implements IParkingService { - private final IMinSimsa680Repository repository; + private final IParkingRepository repository; @Transactional(readOnly = true) public Page findAll(MinSimsa680 entity, Pageable pageable) { @@ -34,13 +37,13 @@ public class MinSimsa680Service implements IMinSimsa680Service { } @Transactional(readOnly = true) - public Page findGroups(MinSimsa680GroupDto minSimsa680GroupDto, Pageable pageable) { - return repository.findMinSimsa680Groups(minSimsa680GroupDto, pageable); + public Page findSimsas(MinSimsa680GroupDto minSimsa680GroupDto, Pageable pageable) { + return repository.findSimsas(minSimsa680GroupDto, pageable); } @Transactional(readOnly = true) - public List findDetails(MinSimsa680GroupDto minSimsa680GroupDto) { - return repository.findMinSimsa680Details(minSimsa680GroupDto); + public List findSimsaDetails(MinSimsa680GroupDto minSimsa680GroupDto) { + return repository.findSimsaDetails(minSimsa680GroupDto); } @Transactional(readOnly = true)