Browse Source

主方法

dev
liruiqiang 5 days ago
parent
commit
f99bec6808
  1. 29
      src/main/java/com/deepchart/controller/IndexController.java
  2. 9
      src/main/java/com/deepchart/service/IndexService.java

29
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<StockDailyData> list = indexService.getStockData(stock);
String result = indexService.ma(list);
return Result.success("success", result);
}
@PostMapping("/cci")
public Result cci(@RequestBody StockInfo stock) {
List<StockDailyData> list = indexService.getStockData(stock);
String result = indexService.cci(list);
return Result.success("success", result);
}
@PostMapping("/expma")
public Result expma(@RequestBody StockInfo stock) {
List<StockDailyData> list = indexService.getStockData(stock);
String result = indexService.expma(list);
return Result.success("success", result);
}
@PostMapping("/wr")
public Result wr(@RequestBody StockInfo stock) {
List<StockDailyData> list = indexService.getStockData(stock);
String result = indexService.wr(list);
return Result.success("success", result);
}
}

9
src/main/java/com/deepchart/service/IndexService.java

@ -15,4 +15,13 @@ public interface IndexService {
String kd(List<StockDailyData> list);
String rsi(List<StockDailyData> list);
String ma(List<StockDailyData> list);
String cci(List<StockDailyData> list);
String expma(List<StockDailyData> list);
String wr(List<StockDailyData> list);
}
Loading…
Cancel
Save