package com.fjhx.account.controller.account;

import com.fjhx.account.entity.account.dto.CapitalDailyDto;
import com.fjhx.account.entity.account.vo.CapitalDailyVo;
import com.fjhx.account.service.account.StatementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * 账户-报表
 */
@RestController
@RequestMapping("/accountStatement")
public class StatementController {

    @Autowired
    private StatementService statementService;

    /**
     * 资金日报表
     */
    @PostMapping("/capitalDaily")
    public List<CapitalDailyVo> getCapitalDaily(@Validated @RequestBody CapitalDailyDto dto) {
        return statementService.getCapitalDaily(dto);
    }

    /**
     *
     */
    @PostMapping("/getCurrencyList")
    public List<CapitalDailyVo.Currency> getCurrencyList(@Validated @RequestBody CapitalDailyDto dto) {
        return statementService.getCurrencyList(dto);
    }

    /**
     *
     */
    @PostMapping("/getTotalList")
    public List<Map<String, Object>> getTotalList(@Validated @RequestBody CapitalDailyDto dto) {
        return statementService.getTotalList(dto);
    }


}
