package com.crm.manager.service.finance;

import com.crm.rely.backend.core.dto.base.BaseResultDto;
import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
import com.crm.rely.backend.core.dto.finance.agent.transfer.FinanceAgentTransferSearchDto;
import com.crm.rely.backend.core.entity.base.SingleLongEntity;
import com.crm.rely.backend.core.entity.finance.agent.transfer.FinanceAgentTransferApproveEntity;
import com.crm.rely.backend.core.entity.finance.agent.transfer.FinanceAgentTransferDeleteEntity;
import com.crm.rely.backend.core.entity.finance.agent.transfer.FinanceAgentTransferSearchEntity;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(name = "PAY-SERVICE", path = "/agent/transfer/manager")
public interface FinanceAgentTransferFeignService {

    @PostMapping("/approve")
    BaseResultDto approve(@RequestBody @Validated FinanceAgentTransferApproveEntity entity) throws Exception;

    @PostMapping("/delete")
    BaseResultDto delete(@RequestBody @Validated FinanceAgentTransferDeleteEntity entity) throws Exception;

    @PostMapping("/list")
    ResultWithPagerDto<FinanceAgentTransferSearchDto> searcherList(@RequestBody @Validated FinanceAgentTransferSearchEntity entity) throws Exception;

    @PostMapping("/single")
    BaseResultDto<FinanceAgentTransferSearchDto> searcherSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception;

    @PostMapping("/export")
    BaseResultDto<List<FinanceAgentTransferSearchDto>> export(@RequestBody @Validated FinanceAgentTransferSearchEntity entity) throws Exception;

}
