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.deposit.FinanceDepositDto;
import com.crm.rely.backend.core.entity.base.SingleLongEntity;
import com.crm.rely.backend.core.entity.custom.info.CustomAmountStatisticsEntity;
import com.crm.rely.backend.core.entity.finance.deposit.*;
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 org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@FeignClient(name = "PAY-SERVICE", path = "/finance/deposit/manager")
public interface FinanceDepositFeignService {

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

    @PostMapping("/activity/approve")
    BaseResultDto activityApprove(@RequestBody @Validated FinanceDepositActivityApproveEntity entity) throws Exception;

    @PostMapping("/supplement")
    BaseResultDto supplement(@RequestBody @Validated FinanceDepositCallbackUpdateEntity balanceCallbackUpdateEntity) throws Exception;

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

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

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

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

    @RequestMapping("/amount/statictics")
    BaseResultDto depositAmountStatictics(CustomAmountStatisticsEntity entity) throws Exception;

    @RequestMapping("/type/statictics")
    BaseResultDto depositPayTypeAmountStatictics(CustomAmountStatisticsEntity entity) throws Exception;
}
