12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- package com.smppw.analysis.client;
- import com.smppw.analysis.application.dto.performance.*;
- import com.smppw.analysis.application.service.performance.FundPerformanceService;
- import com.smppw.analysis.domain.dto.performance.WinVO;
- import com.smppw.common.pojo.ResultVo;
- import org.springframework.web.bind.annotation.GetMapping;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RestController;
- import java.util.Map;
- /**
- * @author wangzaijun
- * @date 2023/8/7 15:52
- * @description 业绩表现api
- */
- @RestController
- @RequestMapping("/v1/api/performance")
- public class FundPerformanceApi {
- private final FundPerformanceService service;
- public FundPerformanceApi(FundPerformanceService service) {
- this.service = service;
- }
- @GetMapping("indicator")
- public Map<String, Object> indicator(IndicatorReq req) {
- return this.service.calcIndicator(req);
- }
- @GetMapping("trend")
- public ResultVo<Map<String, Object>> trend(TrendReq req) {
- Map<String, Object> data = this.service.trend(req);
- return ResultVo.ok(data);
- }
- @GetMapping("imf-trend")
- public ResultVo<Map<String, Object>> imfTrend(ImfTrendReq req) {
- Map<String, Object> data = this.service.imfTrend(req);
- return ResultVo.ok(data);
- }
- @GetMapping("dynamic-down")
- public ResultVo<Map<String, Object>> dynamicDown(DrawdownTrendReq req) {
- Map<String, Object> data = this.service.dynamicDown(req);
- return ResultVo.ok(data);
- }
- @GetMapping("correlation")
- public ResultVo<Map<String, Object>> cor(CorrelationReq req) {
- Map<String, Object> data = this.service.cor(req);
- return ResultVo.ok(data);
- }
- @GetMapping("win")
- public ResultVo<WinVO> win(WinReq req) {
- WinVO data = this.service.win(req);
- return ResultVo.ok(data);
- }
- @GetMapping("revenue")
- public ResultVo<Map<String, Object>> revenue(RevenueReq req) {
- Map<String, Object> data = this.service.revenue(req);
- return ResultVo.ok(data);
- }
- @GetMapping("interval")
- public ResultVo<Map<String, Object>> interval(IntervalReq req) {
- Map<String, Object> data = this.service.interval(req);
- return ResultVo.ok(data);
- }
- @GetMapping("rolling")
- public ResultVo<Map<String, Object>> rolling(RollingReq req) {
- Map<String, Object> data = this.service.rolling(req);
- return ResultVo.ok(data);
- }
- @GetMapping("rank")
- public ResultVo<Map<String, Object>> rank(RankReq req) {
- Map<String, Object> data = this.service.rank(req);
- return ResultVo.ok(data);
- }
- }
|