From f99bec6808855acc444476c1daa56fc9faebd0aa Mon Sep 17 00:00:00 2001 From: liruiqiang <3151805288@qq.com> Date: Tue, 25 Nov 2025 10:28:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BB=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/deepchart/controller/IndexController.java | 29 ++++++++++++++++++++++ .../java/com/deepchart/service/IndexService.java | 9 +++++++ 2 files changed, 38 insertions(+) diff --git a/src/main/java/com/deepchart/controller/IndexController.java b/src/main/java/com/deepchart/controller/IndexController.java index 72a573b..ce07f06 100644 --- a/src/main/java/com/deepchart/controller/IndexController.java +++ b/src/main/java/com/deepchart/controller/IndexController.java @@ -46,4 +46,33 @@ public class IndexController { String result = indexService.rsi(list); return Result.success("success", result); } + + + @PostMapping("/ma") + public Result ma(@RequestBody StockInfo stock) { + List list = indexService.getStockData(stock); + String result = indexService.ma(list); + return Result.success("success", result); + } + + @PostMapping("/cci") + public Result cci(@RequestBody StockInfo stock) { + List list = indexService.getStockData(stock); + String result = indexService.cci(list); + return Result.success("success", result); + } + + @PostMapping("/expma") + public Result expma(@RequestBody StockInfo stock) { + List list = indexService.getStockData(stock); + String result = indexService.expma(list); + return Result.success("success", result); + } + + @PostMapping("/wr") + public Result wr(@RequestBody StockInfo stock) { + List list = indexService.getStockData(stock); + String result = indexService.wr(list); + return Result.success("success", result); + } } diff --git a/src/main/java/com/deepchart/service/IndexService.java b/src/main/java/com/deepchart/service/IndexService.java index e38ab0b..8c5ebe2 100644 --- a/src/main/java/com/deepchart/service/IndexService.java +++ b/src/main/java/com/deepchart/service/IndexService.java @@ -15,4 +15,13 @@ public interface IndexService { String kd(List list); String rsi(List list); + + String ma(List list); + + String cci(List list); + + String expma(List list); + + String wr(List list); + }