Merge branch 'main' of http://192.168.0.251:3000/localnet/localhost-back.git into main
This commit is contained in:
commit
87215dba93
@ -80,7 +80,7 @@ public class SecurityConfig {
|
|||||||
http
|
http
|
||||||
.securityMatcher("/api/**") // '/api/**' 경로에 대해서만 보안 적용
|
.securityMatcher("/api/**") // '/api/**' 경로에 대해서만 보안 적용
|
||||||
.authorizeHttpRequests(auth -> auth
|
.authorizeHttpRequests(auth -> auth
|
||||||
//.requestMatchers("/api/board/**").hasRole("MEMBER")
|
.requestMatchers("/api/project/**").hasRole("MEMBER")
|
||||||
.requestMatchers("/api/**").permitAll() // 특정 엔드포인트 허용
|
.requestMatchers("/api/**").permitAll() // 특정 엔드포인트 허용
|
||||||
.anyRequest().authenticated() // 나머지 요청은 인증 필요
|
.anyRequest().authenticated() // 나머지 요청은 인증 필요
|
||||||
//auth.anyRequest().access(authorizationManager) // 모든 요청에 대해 권한 관리
|
//auth.anyRequest().access(authorizationManager) // 모든 요청에 대해 권한 관리
|
||||||
|
|||||||
@ -0,0 +1,51 @@
|
|||||||
|
/************************************************************
|
||||||
|
*
|
||||||
|
* @packageName : io.company.localhost.controller.api
|
||||||
|
* @fileName : ProjectListController.java
|
||||||
|
* @author : 박지윤
|
||||||
|
* @date : 25.02.10
|
||||||
|
* @description : 프로젝트 목록
|
||||||
|
*
|
||||||
|
* ===========================================================
|
||||||
|
* DATE AUTHOR NOTE
|
||||||
|
* -----------------------------------------------------------
|
||||||
|
* 25.02.10 박지윤 최초 생성
|
||||||
|
*
|
||||||
|
*************************************************************/
|
||||||
|
|
||||||
|
package io.company.localhost.controller.api;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import io.company.localhost.common.annotation.ParameterCheck;
|
||||||
|
import io.company.localhost.common.dto.ApiResponse;
|
||||||
|
import io.company.localhost.common.dto.MapDto;
|
||||||
|
import io.company.localhost.service.commoncodService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/project")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Slf4j
|
||||||
|
public class ProjectListController {
|
||||||
|
|
||||||
|
private final commoncodService commoncodservice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 프로젝트 년도 조회
|
||||||
|
*
|
||||||
|
* @return ApiResponse<List<MapDto>>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ParameterCheck
|
||||||
|
@GetMapping("/yearCategory")
|
||||||
|
public ApiResponse<List<MapDto>> getYearCategories() {
|
||||||
|
List<MapDto> yearCategory = commoncodservice.getYearCategories();
|
||||||
|
return ApiResponse.ok(yearCategory);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -35,5 +35,7 @@ public interface commoncodMapper {
|
|||||||
|
|
||||||
int updateColorYon(String color);
|
int updateColorYon(String color);
|
||||||
|
|
||||||
|
List<MapDto> getYearCategories();
|
||||||
|
|
||||||
List<MapDto> getCategories();
|
List<MapDto> getCategories();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -44,9 +44,14 @@ public class commoncodService {
|
|||||||
return commoncodmapper.getMbtiList();
|
return commoncodmapper.getMbtiList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<MapDto> getYearCategories() {
|
||||||
|
return commoncodmapper.getYearCategories();
|
||||||
|
}
|
||||||
|
|
||||||
public List<MapDto> getPwhintList() {
|
public List<MapDto> getPwhintList() {
|
||||||
return commoncodmapper.getPwhintList();
|
return commoncodmapper.getPwhintList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<MapDto> getCategoryList() {
|
public List<MapDto> getCategoryList() {
|
||||||
return commoncodmapper.getCategories();
|
return commoncodmapper.getCategories();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -79,5 +79,18 @@
|
|||||||
WHERE CMNCODVAL BETWEEN 300101 AND 300103
|
WHERE CMNCODVAL BETWEEN 300101 AND 300103
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getYearCategories" resultType="Map">
|
||||||
|
SELECT
|
||||||
|
CMNCODVAL
|
||||||
|
,CMNCODNAM
|
||||||
|
FROM
|
||||||
|
commoncod
|
||||||
|
WHERE
|
||||||
|
CMNCODLV1 = 900
|
||||||
|
AND
|
||||||
|
CMNCODODR != 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user