1
This commit is contained in:
@@ -2,12 +2,14 @@ package com.ga.api;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cache.annotation.EnableCaching;
|
||||
|
||||
/**
|
||||
* GA 수수료 정산 API 서버.
|
||||
* 컴포넌트 스캔: com.ga 패키지 (common/core/api 모두 포함)
|
||||
*/
|
||||
@SpringBootApplication(scanBasePackages = {"com.ga"})
|
||||
@EnableCaching
|
||||
public class GaApiApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(GaApiApplication.class, args);
|
||||
|
||||
@@ -24,20 +24,20 @@ public class InstallmentController {
|
||||
private final InstallmentService installmentService;
|
||||
|
||||
@GetMapping
|
||||
@RequirePermission(menu = "INSTALLMENT", perm = "READ")
|
||||
@RequirePermission(menu = "INSTALLMENT_PLAN", perm = "READ")
|
||||
public ApiResponse<PageResponse<InstallmentPlanResp>> list(InstallmentPlanSearchParam param) {
|
||||
return ApiResponse.ok(installmentService.list(param));
|
||||
}
|
||||
|
||||
@GetMapping("/{planId}")
|
||||
@RequirePermission(menu = "INSTALLMENT", perm = "READ")
|
||||
@RequirePermission(menu = "INSTALLMENT_PLAN", perm = "READ")
|
||||
public ApiResponse<InstallmentPlanResp> detail(@PathVariable Long planId) {
|
||||
return ApiResponse.ok(installmentService.detail(planId));
|
||||
}
|
||||
|
||||
@PostMapping("/generate")
|
||||
@RequirePermission(menu = "INSTALLMENT", perm = "CREATE")
|
||||
@DataChangeLog(menu = "INSTALLMENT", table = "installment_plan")
|
||||
@RequirePermission(menu = "INSTALLMENT_PLAN", perm = "CREATE")
|
||||
@DataChangeLog(menu = "INSTALLMENT_PLAN", table = "installment_plan")
|
||||
public ApiResponse<Void> generate(@Valid @RequestBody GeneratePlanReq req) {
|
||||
installmentService.createPlan(
|
||||
req.getContractId(),
|
||||
@@ -49,8 +49,8 @@ public class InstallmentController {
|
||||
}
|
||||
|
||||
@PutMapping("/{planId}/pay")
|
||||
@RequirePermission(menu = "INSTALLMENT", perm = "UPDATE")
|
||||
@DataChangeLog(menu = "INSTALLMENT", table = "installment_plan")
|
||||
@RequirePermission(menu = "INSTALLMENT_PLAN", perm = "UPDATE")
|
||||
@DataChangeLog(menu = "INSTALLMENT_PLAN", table = "installment_plan")
|
||||
public ApiResponse<Void> pay(@PathVariable Long planId,
|
||||
@Valid @RequestBody PayPlanReq req) {
|
||||
installmentService.payPlan(planId, req.getPaymentId(), req.getPaidAmount());
|
||||
@@ -58,23 +58,23 @@ public class InstallmentController {
|
||||
}
|
||||
|
||||
@PutMapping("/{planId}/defer")
|
||||
@RequirePermission(menu = "INSTALLMENT", perm = "UPDATE")
|
||||
@DataChangeLog(menu = "INSTALLMENT", table = "installment_plan")
|
||||
@RequirePermission(menu = "INSTALLMENT_PLAN", perm = "UPDATE")
|
||||
@DataChangeLog(menu = "INSTALLMENT_PLAN", table = "installment_plan")
|
||||
public ApiResponse<Void> defer(@PathVariable Long planId) {
|
||||
installmentService.deferPlan(planId);
|
||||
return ApiResponse.ok();
|
||||
}
|
||||
|
||||
@PutMapping("/{planId}/cancel")
|
||||
@RequirePermission(menu = "INSTALLMENT", perm = "UPDATE")
|
||||
@DataChangeLog(menu = "INSTALLMENT", table = "installment_plan")
|
||||
@RequirePermission(menu = "INSTALLMENT_PLAN", perm = "UPDATE")
|
||||
@DataChangeLog(menu = "INSTALLMENT_PLAN", table = "installment_plan")
|
||||
public ApiResponse<Void> cancel(@PathVariable Long planId) {
|
||||
installmentService.cancelPlan(planId);
|
||||
return ApiResponse.ok();
|
||||
}
|
||||
|
||||
@GetMapping("/scheduled")
|
||||
@RequirePermission(menu = "INSTALLMENT", perm = "READ")
|
||||
@RequirePermission(menu = "INSTALLMENT_PLAN", perm = "READ")
|
||||
public ApiResponse<List<InstallmentPlanVO>> scheduled(@RequestParam String settleMonth) {
|
||||
return ApiResponse.ok(installmentService.selectScheduledForMonth(settleMonth));
|
||||
}
|
||||
|
||||
+3
-3
@@ -22,14 +22,14 @@ public class InstallmentRatioController {
|
||||
private final InstallmentService installmentService;
|
||||
|
||||
@GetMapping
|
||||
@RequirePermission(menu = "INSTALLMENT", perm = "READ")
|
||||
@RequirePermission(menu = "INSTALLMENT_RATIO", perm = "READ")
|
||||
public ApiResponse<PageResponse<InstallmentRatioResp>> list(InstallmentRatioSearchParam param) {
|
||||
return ApiResponse.ok(installmentService.listRatios(param));
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@RequirePermission(menu = "INSTALLMENT", perm = "CREATE")
|
||||
@DataChangeLog(menu = "INSTALLMENT", table = "installment_ratio")
|
||||
@RequirePermission(menu = "INSTALLMENT_RATIO", perm = "CREATE")
|
||||
@DataChangeLog(menu = "INSTALLMENT_RATIO", table = "installment_ratio")
|
||||
public ApiResponse<Void> create(@Valid @RequestBody InstallmentRatioSaveReq req) {
|
||||
installmentService.createRatio(req);
|
||||
return ApiResponse.ok();
|
||||
|
||||
@@ -25,41 +25,41 @@ public class SettleCorrectionController {
|
||||
private final SettleCorrectionService service;
|
||||
|
||||
@GetMapping
|
||||
@RequirePermission(menu = "SETTLE_CORR", perm = "READ")
|
||||
@RequirePermission(menu = "SETTLE_CORRECTION", perm = "READ")
|
||||
public ApiResponse<PageResponse<SettleCorrectionResp>> list(@ModelAttribute SettleCorrectionSearchParam param) {
|
||||
return ApiResponse.ok(service.list(param));
|
||||
}
|
||||
|
||||
@GetMapping("/{correctionId}")
|
||||
@RequirePermission(menu = "SETTLE_CORR", perm = "READ")
|
||||
@RequirePermission(menu = "SETTLE_CORRECTION", perm = "READ")
|
||||
public ApiResponse<SettleCorrectionResp> detail(@PathVariable Long correctionId) {
|
||||
return ApiResponse.ok(service.detail(correctionId));
|
||||
}
|
||||
|
||||
@GetMapping("/by-settle/{originalSettleId}")
|
||||
@RequirePermission(menu = "SETTLE_CORR", perm = "READ")
|
||||
@RequirePermission(menu = "SETTLE_CORRECTION", perm = "READ")
|
||||
public ApiResponse<List<SettleCorrectionResp>> listByOriginalSettle(@PathVariable Long originalSettleId) {
|
||||
return ApiResponse.ok(service.listByOriginalSettle(originalSettleId));
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@RequirePermission(menu = "SETTLE_CORR", perm = "CREATE")
|
||||
@DataChangeLog(menu = "SETTLE_CORR", table = "settle_correction")
|
||||
@RequirePermission(menu = "SETTLE_CORRECTION", perm = "CREATE")
|
||||
@DataChangeLog(menu = "SETTLE_CORRECTION", table = "settle_correction")
|
||||
public ApiResponse<Long> create(@Valid @RequestBody SettleCorrectionSaveReq req) {
|
||||
return ApiResponse.ok(service.create(req));
|
||||
}
|
||||
|
||||
@PostMapping("/{correctionId}/approve")
|
||||
@RequirePermission(menu = "SETTLE_CORR", perm = "APPROVE")
|
||||
@DataChangeLog(menu = "SETTLE_CORR", table = "settle_correction")
|
||||
@RequirePermission(menu = "SETTLE_CORRECTION", perm = "APPROVE")
|
||||
@DataChangeLog(menu = "SETTLE_CORRECTION", table = "settle_correction")
|
||||
public ApiResponse<Void> approve(@PathVariable Long correctionId) {
|
||||
service.approve(correctionId);
|
||||
return ApiResponse.ok();
|
||||
}
|
||||
|
||||
@PostMapping("/{correctionId}/cancel")
|
||||
@RequirePermission(menu = "SETTLE_CORR", perm = "UPDATE")
|
||||
@DataChangeLog(menu = "SETTLE_CORR", table = "settle_correction")
|
||||
@RequirePermission(menu = "SETTLE_CORRECTION", perm = "UPDATE")
|
||||
@DataChangeLog(menu = "SETTLE_CORRECTION", table = "settle_correction")
|
||||
public ApiResponse<Void> cancel(@PathVariable Long correctionId, @RequestBody Map<String, String> body) {
|
||||
service.cancel(correctionId, body.get("cancelReason"));
|
||||
return ApiResponse.ok();
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
ga:
|
||||
redis:
|
||||
enabled: false
|
||||
|
||||
spring:
|
||||
datasource:
|
||||
url: jdbc:postgresql://125.241.236.203:55432/ga
|
||||
username: ga
|
||||
password: ga
|
||||
cache:
|
||||
type: simple
|
||||
autoconfigure:
|
||||
exclude:
|
||||
- org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration
|
||||
- org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
spring:
|
||||
datasource:
|
||||
url: jdbc:postgresql://192.168.0.60:55432/trading_ai?currentSchema=ga
|
||||
url: jdbc:postgresql://125.241.236.203:55432/trading_ai?currentSchema=ga
|
||||
username: ${DB_USER:kyu}
|
||||
password: ${DB_PASSWORD:7895123}
|
||||
driver-class-name: org.postgresql.Driver
|
||||
@@ -20,6 +20,7 @@ spring:
|
||||
baseline-on-migrate: true
|
||||
baseline-version: 17 # 현재 적용된 최신 버전. 새 V18+ 만 적용
|
||||
baseline-description: "Initial baseline (V1-V17 applied manually on 2026-05-09)"
|
||||
validate-on-migrate: false
|
||||
|
||||
data:
|
||||
redis:
|
||||
|
||||
@@ -2,7 +2,7 @@ spring:
|
||||
application:
|
||||
name: ga-api
|
||||
profiles:
|
||||
active: local
|
||||
active: trading_ai
|
||||
datasource:
|
||||
url: jdbc:postgresql://localhost:5432/ga
|
||||
username: ga
|
||||
@@ -22,7 +22,7 @@ spring:
|
||||
max-request-size: 100MB
|
||||
|
||||
server:
|
||||
port: 8080
|
||||
port: 8082
|
||||
servlet:
|
||||
encoding:
|
||||
charset: UTF-8
|
||||
|
||||
Reference in New Issue
Block a user