package com.fjhx.sale.controller.commission;

import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fjhx.sale.entity.commission.vo.CommissionVo;
import com.fjhx.sale.entity.commission.dto.CommissionSelectDto;
import com.fjhx.sale.entity.commission.dto.CommissionDto;
import com.ruoyi.common.core.domain.BaseSelectDto;
import com.fjhx.sale.service.commission.CommissionService;
import org.springframework.beans.factory.annotation.Autowired;


/**
 * <p>
 * 业绩提成表 前端控制器
 * </p>
 *
 * @author
 * @since 2023-05-11
 */
@RestController
@RequestMapping("/commission")
public class CommissionController {

    @Autowired
    private CommissionService commissionService;

    /**
     * 业绩提成表分页
     */
    @PostMapping("/page")
    public Page<CommissionVo> page(@RequestBody CommissionSelectDto dto) {
        return commissionService.getPage(dto);
    }

    /**
     * 业绩提成表头部统计
     */
    @PostMapping("/getHeadStatistics")
    public CommissionVo getHeadStatistics(@RequestBody CommissionSelectDto dto) {
        return commissionService.getHeadStatistics(dto);
    }


}
