package com.crm.manager.service;

import com.crm.rely.backend.core.dto.base.BaseReportResultDto;
import com.crm.rely.backend.core.dto.base.BaseResultDto;
import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
import com.crm.rely.backend.core.entity.base.SingleLongEntity;
import com.crm.rely.backend.model.dto.finance.train.FinanceTrainDto;
import com.crm.rely.backend.model.dto.report.FinanceTrainReportListDto;
import com.crm.rely.backend.model.dto.report.FinanceTrainReportSumDto;
import com.crm.rely.backend.model.dto.report.FinanceTrainSalesReportListDto;
import com.crm.rely.backend.model.entity.finance.train.FinanceTrainApproveEntity;
import com.crm.rely.backend.model.entity.finance.train.FinanceTrainSearchListEntity;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

@FeignClient(name = "GOLDEN-PAY-SERVICE", path = "/finance/train/manager")
public interface FinanceTrainFeignService {

    @PostMapping("/approve")
    BaseResultDto approve(FinanceTrainApproveEntity entity) throws Exception;

    @PostMapping("/search/list")
    ResultWithPagerDto<FinanceTrainDto> searchList(FinanceTrainSearchListEntity entity) throws Exception;

    @PostMapping("/search/single")
    BaseResultDto<FinanceTrainDto> searchSingle(SingleLongEntity entity) throws Exception;

    @PostMapping("/report")
    BaseReportResultDto<List<FinanceTrainReportListDto>, FinanceTrainReportSumDto> report(FinanceTrainSearchListEntity entity);

    @PostMapping("/report/export")
    BaseResultDto<List<FinanceTrainReportListDto>> reportExport(FinanceTrainSearchListEntity entity);

    @PostMapping("/commission")
    BaseReportResultDto<List<FinanceTrainSalesReportListDto>, FinanceTrainReportSumDto> salesReport(FinanceTrainSearchListEntity entity);

    @PostMapping("/commission/export")
    BaseResultDto<List<FinanceTrainSalesReportListDto>> salesReportExport(FinanceTrainSearchListEntity entity) throws Exception;
}
