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.trade.interest.FinanceTradeInterestDto;
import com.crm.rely.backend.core.entity.base.SingleLongEntity;
import com.crm.rely.backend.core.entity.finance.trade.interest.FinanceTradeInterestAddEntity;
import com.crm.rely.backend.core.entity.finance.trade.interest.FinanceTradeInterestSearchListEntity;
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 = "/finance/trade/interest/manager")
public interface FinanceTradeInterestFeignService {

    @PostMapping("/searcher/list")
    ResultWithPagerDto<FinanceTradeInterestDto> searcherList(@RequestBody @Validated FinanceTradeInterestSearchListEntity entity);

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

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

    @PostMapping("/add")
    BaseResultDto add(FinanceTradeInterestAddEntity entity) throws Exception;
}
