refactor: 패키지 변경 적용

dev
minuk926 3 years ago
parent c07cc6911c
commit 6652345922

@ -20,7 +20,7 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Tag(name = "MinCivBoard680Controller", description = "게시글 관리")
@Tag(name = "BoardController", description = "게시글 관리")
@RestController
@RequestMapping("/api/v1/ctgy/board")
@Validated

@ -19,12 +19,9 @@ 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.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
@Tag(name = "MinUserinfoController", description = "사용자 관리")
@Tag(name = "MinUserController", description = "사용자 관리")
@RestController
@RequestMapping("/api/v1/ctgy/user")
@Validated
@ -44,7 +41,7 @@ public class MinUserController {
@Parameter(in = ParameterIn.QUERY, name = "size", description = "페이지당갯수", required = true, example = "10")
})
@GetMapping(produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<? extends IRestResponse> findMinUserinfos(
public ResponseEntity<? extends IRestResponse> findMinUsers(
@Parameter(hidden = true)
@ModelAttribute("minUserinfoDto")
final MinUserinfoDto minUserinfoDto,
@ -57,8 +54,14 @@ public class MinUserController {
@GetMapping("/info")
@Secured(policy = SecurityPolicy.TOKEN)
@Transactional(readOnly = true)
public ResponseEntity<? extends IRestResponse> getUserInfo() {
return RestResponse.of(service.findMyUserWithoutAuthorities());
public ResponseEntity<? extends IRestResponse> getMinUser() {
return RestResponse.of(service.findMinUser());
}
@Operation(summary = "사용자 정보 조회" , description = "사용자 정보 조회")
@GetMapping("/{userid}")
//@Transactional(readOnly = true)
public ResponseEntity<? extends IRestResponse> getMinUser(@PathVariable String userid) {
return RestResponse.of(service.findMinUserByUserid(userid));
}
}

@ -23,7 +23,7 @@ import org.springframework.web.bind.annotation.RestController;
import javax.validation.Valid;
@Tag(name = "ParkingController", description = "주정차의견진술")
@Tag(name = "ParkingController", description = "주정차의견진술관리")
@RestController
@RequestMapping("/api/v1/ctgy/parking")
@Validated

@ -17,10 +17,11 @@ import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Tag(name = "MinInfoBoard680Controller", description = "공지사항 관리")
@Tag(name = "PublicBoardController", description = "공지사항 관리")
@RestController
@RequestMapping("/api/v1/ctgy/pboard")
@Validated
@ -40,7 +41,7 @@ public class PublicBoardController {
@Parameter(in = ParameterIn.QUERY, name = "size", description = "페이지당갯수", required = true, example = "10")
})
@GetMapping(produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<? extends IRestResponse> findMinCivBoard680s(
public ResponseEntity<? extends IRestResponse> findAll(
@Parameter(hidden = true)
final MinInfoBoard680Dto dto,
@Parameter(hidden = true)
@ -48,4 +49,12 @@ public class PublicBoardController {
return RestResponse.of(service.findAll(mapstruct.toEntity(dto), pageable));
}
@Operation(summary = "게시글상세" , description = "게시글상세")
@Parameters({
@Parameter(in = ParameterIn.PATH, name = "inCode", description = "게시글번호", required = true, example = "18"),
})
@GetMapping(value = "/{inCode}", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<? extends IRestResponse> findByInCode(@PathVariable Long inCode) {
return RestResponse.of(service.findByInCode(inCode));
}
}

@ -4,4 +4,5 @@ import com.xit.biz.ctgy.entity.MinInfoBoard680;
import org.springframework.data.jpa.repository.JpaRepository;
public interface IPublicBoardRepository extends JpaRepository<MinInfoBoard680, Long> {
MinInfoBoard680 findByInCode(Long inCode);
}

@ -11,5 +11,7 @@ public interface IMinUserService {
Page<MinUserinfo> findMinUsers(MinUserinfo minUserinfo, Pageable pageable);
MinUserinfo findMyUserWithoutAuthorities();
MinUserinfo findMinUser();
MinUserinfo findMinUserByUserid(String userId);
}

@ -7,4 +7,5 @@ import org.springframework.data.domain.Pageable;
public interface IPublicBoardService {
Page<MinInfoBoard680> findAll(MinInfoBoard680 entity, Pageable pageable);
MinInfoBoard680 findByInCode(Long inCode);
}

@ -40,9 +40,14 @@ public class MinUserService implements IMinUserService {
@Override
@Transactional(readOnly = true)
public MinUserinfo findMyUserWithoutAuthorities() {
public MinUserinfo findMinUser() {
//cmmUserRepos
//return Optional.empty(); //cmmUserRepository.findOneWithAuthorities(SecurityUtil.getCurrentMemberId());
return repository.findMinUserinfoByUserid(HeaderUtil.getUserId());
}
@Override
public MinUserinfo findMinUserByUserid(String userid) {
return repository.findMinUserinfoByUserid(userid);
}
}

@ -32,4 +32,9 @@ public class PublicBoardService implements IPublicBoardService {
// List<CmmUser> userList = page.getContent();
return page;
}
@Override
public MinInfoBoard680 findByInCode(Long inCode) {
return repository.findByInCode(inCode);
}
}

@ -66,7 +66,7 @@ public class SpringDocApiConfig {
@Bean
public GroupedOpenApi ctgyBizApi() {
return GroupedOpenApi.builder()
.group("Ctgy-biz-API")
.group("1. Ctgy-biz-API")
.pathsToMatch(
"/api/v1/ctgy/**"
)
@ -76,7 +76,7 @@ public class SpringDocApiConfig {
@Bean
public GroupedOpenApi authorizeApi() {
return GroupedOpenApi.builder()
.group("Authorize-API")
.group("2. Authorize-API")
.pathsToMatch(
"/api/v1/auth/**",
"/api/v1/users/**"
@ -87,7 +87,7 @@ public class SpringDocApiConfig {
@Bean
public GroupedOpenApi commonApi() {
return GroupedOpenApi.builder()
.group("common-API")
.group("3. common-API")
.pathsToMatch(
"/api/biz/cmm/**",
"/api/v1/biz/cmm/**"
@ -101,7 +101,7 @@ public class SpringDocApiConfig {
@Bean
public GroupedOpenApi sampleApi() {
return GroupedOpenApi.builder()
.group("Sample-API")
.group("4. Sample-API")
.pathsToMatch("/api/sample/**")
.build();
}

@ -33,9 +33,6 @@ class IMinSimsa680RepositoryTest {
private JPAQueryFactory queryFactory;
@Autowired
private IMinSimsa680Repository iMinSimsa680Repository;
@BeforeEach
void beforeEach(){
queryFactory = new JPAQueryFactory(em);

Loading…
Cancel
Save