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.withdraw.FinanceAgentWithdrawDto;
import com.crm.rely.backend.core.entity.base.SingleLongEntity;
import com.crm.rely.backend.core.entity.finance.withdraw.*;
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 = "/manage/service/agent/withdraw")
public interface FinanceAgentWithdrawFeignService {

    @PostMapping("/approve")
    BaseResultDto<Object> approve(@RequestBody FinanceWithdrawApproveEntity entity) throws Exception;

    @PostMapping("/sales/approve")
    BaseResultDto approveBySales(@RequestBody @Validated FinanceWithdrawApproveSalesEntity entity) throws Exception;

    @PostMapping("/channel")
    BaseResultDto<Object> channel(@RequestBody FinanceWithdrawApproveChannelEntity entity) throws Exception;

    @PostMapping("/approve/submit/channel")
    BaseResultDto approveBySubmit(@RequestBody @Validated FinanceWithdrawApproveChannelSubmitEntity entity) throws Exception;

    @PostMapping("/approves")
    BaseResultDto<Object> approves(@RequestBody FinanceWithdrawApprovesEntity entity) throws Exception;

    @PostMapping("/approve/submits/channel")
    BaseResultDto approveBySubmits(@RequestBody @Validated FinanceWithdrawApproveChannelSubmitsEntity entity) throws Exception;

    @PostMapping("/channels")
    BaseResultDto<Object> channels(@RequestBody @Validated FinanceWithdrawApproveChannelsEntity entity) throws Exception;

    @PostMapping("/search/list")
    ResultWithPagerDto<FinanceAgentWithdrawDto> searchList(@RequestBody FinanceAgentWithdrawSearchListEntity entity) throws Exception;

    @PostMapping("/search/list/export")
    BaseResultDto<List<FinanceAgentWithdrawDto>> searchListExport(@RequestBody FinanceAgentWithdrawSearchListEntity entity) throws Exception;

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

    @PostMapping(value = "/remit/channel")
    BaseResultDto remitChannel();
}
