package com.yc.ship.module.trade.controller.admin.order;

import com.yc.ship.framework.common.pojo.CommonResult;
import com.yc.ship.framework.operatelog.core.annotations.OperateLog;
import com.yc.ship.module.trade.controller.admin.order.vo.order.TradeStaticReqVO;
import com.yc.ship.module.trade.service.otc.OtcTradeOrderService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
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 javax.annotation.Resource;
import javax.validation.Valid;

import static com.yc.ship.framework.operatelog.core.enums.OperateTypeEnum.API;


/**
 * @author qsl
 */
@Slf4j
@Validated
@RequestMapping("/static")
@RestController
@Tag(name = "统计服务（带token）")
public class TradeStaticController {
    @Resource
    private OtcTradeOrderService otcTradeOrderService;
    @PostMapping("/regionStatic")
    @Operation(summary = "代理区域统计")
    @OperateLog(type = API)
    public CommonResult<?> regionStatic(@Valid @RequestBody TradeStaticReqVO reqVO) {
        return otcTradeOrderService.regionStatic(reqVO);
    }

}
