package com.sckw.payment.controller;

import com.sckw.core.web.response.HttpResult;
import com.sckw.payment.model.vo.req.FinanceCount;
import com.sckw.payment.service.WorkbenchService;
import jakarta.annotation.Resource;
import jakarta.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

/**
 * 工作台
 *
 * @author xucaiqin
 * @date 2023-08-28 15:36:48
 */
@Validated
@RestController
@RequestMapping("/workbench")
@Slf4j
public class WorkbenchController {
    @Resource
    private WorkbenchService workbenchService;

    /**
     * 财务数据
     *
     * @return
     */
    @PostMapping("finance")
    public HttpResult finance(@Valid @RequestBody FinanceCount financeCount) {
        return HttpResult.ok(workbenchService.financeCount(financeCount));
    }

}
