package com.sckw.order.controller;

import com.sckw.core.web.response.HttpResult;
import com.sckw.order.model.vo.req.WbTOrderExcelStsParam;
import com.sckw.order.serivce.KwoTradeOrderStatisticsService;
import lombok.AllArgsConstructor;
import org.springframework.http.MediaType;
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;

/**
 * @desc: 订单统计相关接口
 * @author: yzc
 * @date: 2023-09-13 8:34
 */
@AllArgsConstructor
@RestController
@RequestMapping("/kwoTradeOrderStatistics")
public class KwoTradeOrderStatisticsController {

    private final KwoTradeOrderStatisticsService kwoTradeOrderStatisticsService;


    /**
     * @desc: 工作台贸易订单表格统计
     * @author: yzc
     * @date: 2023-09-12 16:38
     * @Param params:
     * @return: com.sckw.core.web.response.HttpResult
     */
    @PostMapping(value = "/workbenchExcel", produces = MediaType.APPLICATION_JSON_VALUE)
    public HttpResult workbenchExcel(@RequestBody @Validated WbTOrderExcelStsParam params) {
        return HttpResult.ok(kwoTradeOrderStatisticsService.workbenchExcel(params));
    }
}
