package com.crm.manager.service.ib;

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.BaseResultWithPagerDto;
import com.crm.rely.backend.core.dto.ib.balance.AgentBalanceRecordDto;
import com.crm.rely.backend.core.dto.ib.balance.AgentBalanceReportSumDto;
import com.crm.rely.backend.core.dto.ib.balance.AgentBalanceWithdrawalDto;
import com.crm.rely.backend.core.dto.ib.balance.AgentBalanceWithdrawalSumDto;
import com.crm.rely.backend.core.dto.ib.info.AgentInfoTreeDto;
import com.crm.rely.backend.core.dto.ib.info.IbInfoDto;
import com.crm.rely.backend.core.dto.ib.info.IbReportNewDto;
import com.crm.rely.backend.core.dto.ib.point.AgentPointDto;
import com.crm.rely.backend.core.dto.user.info.UserInfoIbNoDto;
import com.crm.rely.backend.core.entity.base.BaseIbReportListEntity;
import com.crm.rely.backend.core.entity.base.BaseValidEntity;
import com.crm.rely.backend.core.entity.base.SingleLongEntity;
import com.crm.rely.backend.core.entity.custom.info.CustomRegisterLinkCodeEntity;
import com.crm.rely.backend.core.entity.ib.info.*;
import com.crm.rely.backend.core.entity.ib.point.AgentPointSingleEntity;
import com.crm.rely.backend.core.entity.user.info.*;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

/**
 * Created by max on 2020/7/14.
 */
@FeignClient(name = "IB-SERVICE", path = "/manage/service/ib")
public interface IbInfoFeignService {

    @PostMapping("/search/single")
    BaseResultDto<IbInfoDto> managerSearchSingle(SingleLongEntity entity);

    @PostMapping("/search/ib/single")
    BaseResultDto<UserInfoIbNoDto> managerSearchIbSingle(UserInfoIbSearchEntity entity);

    @PostMapping("/search/list")
    BaseResultWithPagerDto<List<IbInfoDto>> manageGetList(IbInfoSearchListEntity entity) throws Exception;

    @PostMapping("/search/list/export")
    BaseResultDto<List<IbInfoDto>> manageGetListExport(IbInfoSearchListEntity entity) throws Exception;

    @PostMapping("/delete/single")
    BaseResultDto<Object> deleteIbInSingle(SingleLongEntity entity) throws Exception;

    @PostMapping("/update/hide")
    BaseResultDto<Object> updateHide(UserInfoUpdateHideEntity entity) throws Exception;

    @PostMapping("/update/closeFunctions")
    BaseResultDto<Object> updateCloseFunctions(UserInfoUpdateCloseFunctionsEntity entity) throws Exception;

    @PostMapping("/update/commission/approval")
    BaseResultDto<Object> updateCommissionApproval(UserInfoUpdateCommissionApprovalEntity entity) throws Exception;

    @PostMapping("/update/login/group")
    BaseResultDto<Object> updateSelectLoginTypeAndGroupType(UserInfoUpdateLoginTypeAndGroupTypeEntity entity) throws Exception;

    @PostMapping("/update/show/login/type")
    BaseResultDto<Object> updateExcludeShowLoginType(UserInfoUpdateExcludeShowLoginTypeEntity entity) throws Exception;

    @PostMapping("/report/new")
    BaseResultWithPagerDto<List<IbReportNewDto>> ibReportNew(IbReportNewEntity entity) throws Exception;

    @PostMapping("/tree")
    BaseResultDto<List<AgentInfoTreeDto>> getTree(AgentInfoTreeEntity entity) throws Exception;

    @PostMapping("/tree/search")
    BaseResultDto<List<AgentInfoTreeDto>> agentTreeSearch(AgentInfoTreeEntity entity) throws Exception;

    @PostMapping("/report/balance")
    BaseReportResultDto<List<AgentBalanceRecordDto>, AgentBalanceReportSumDto> ibBalanceReport(BaseIbReportListEntity entity) throws Exception;

    @PostMapping("/report/balance/export")
    BaseResultDto<List<AgentBalanceRecordDto>> ibBalanceReportExport(BaseIbReportListEntity entity) throws Exception;

    @PostMapping("/report/withdrawal")
    BaseReportResultDto<List<AgentBalanceWithdrawalDto>, AgentBalanceWithdrawalSumDto> ibWithdrawalReport(BaseIbReportListEntity entity) throws Exception;

    @PostMapping("/report/withdrawal/export")
    BaseResultDto<List<AgentBalanceWithdrawalDto>> ibWithdrawalReporteExport(BaseIbReportListEntity entity) throws Exception;

    @PostMapping("/point")
    BaseResultDto<AgentPointDto> ibPoint(AgentPointSingleEntity entity) throws Exception;

    @PostMapping("/update/pammManagerValid")
    BaseResultDto<Object> updatePammManagerValid(UserInfoUpdatePammManagerValidEntity entity) throws Exception;

    @PostMapping("/update/pammValid")
    BaseResultDto<Object> updatePammValid(UserInfoUpdatePammValidEntity entity) throws Exception;

    @PostMapping("/search/single/cid")
    BaseResultDto<IbInfoDto> getIbInfoByCid(SingleLongEntity entity) throws Exception;

    @PostMapping("/register/link/hash")
    BaseResultDto getLinkValue(CustomRegisterLinkCodeEntity entity) throws Exception;

    @PostMapping("/agent/setting")
    BaseResultDto ibAgentAccountSetting(IbAccountSettingEntity entity);

    @PostMapping("/fixed/hide")
    BaseResultDto ibAgentFixedHide(IbFixedHideEntity entity);

    @PostMapping("/agent/transfer")
    BaseResultDto ibAgentTransfer(IbAgentTansferEntity entity);

    @PostMapping("/commission/valid")
    BaseResultDto<Object> commissionValid(BaseValidEntity entity) throws Exception;

    @PostMapping("/search/all")
    BaseResultDto<List<AgentInfoTreeDto>> searchAllAgentInfo(AgentInfoTreeEntity entity) throws Exception;
}
