package com.crm.manager.service;

import com.crm.manager.configuration.FeignMultipartSupportConfig;
import com.crm.rely.backend.core.dto.base.BaseResultDto;
import com.crm.rely.backend.core.entity.base.SingleLongEntity;
import com.crm.rely.backend.model.dto.sys.remittance.channel.SysRemittanceChannelDto;
import com.crm.rely.backend.model.dto.sys.remittance.channel.SysRemittanceChannelGetCodeDto;
import com.crm.rely.backend.model.entity.sys.remittance.channel.SysRemittanceChannelBatchUpdateEntity;
import com.crm.rely.backend.model.entity.sys.remittance.channel.SysRemittanceChannelByCodeEntity;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

/**
 * @description:
 * @author: houn
 * @create: 2021-1-13 16:25
 **/
@FeignClient(name = "GOLDEN-PAY-SERVICE", path = "/remittance/channel/manager", configuration = FeignMultipartSupportConfig.class)
public interface SysRemittanceChannelFeignService {

    /**
     * 根据code 获取通道信息
     *
     * @param entity
     * @return
     * @throws Exception
     */
    @PostMapping("/code")
    BaseResultDto<SysRemittanceChannelDto> getByCode(SysRemittanceChannelByCodeEntity entity) throws Exception;

    @PostMapping("/batch/update")
    BaseResultDto updateBatch(SysRemittanceChannelBatchUpdateEntity entity) throws Exception;

    @PostMapping("/list")
    BaseResultDto list() throws Exception;

    @PostMapping("/get/code")
    BaseResultDto<List<SysRemittanceChannelGetCodeDto>> getCodeList() throws Exception;

    /**
     * 单个查询
     *
     * @param entity
     * @return
     * @throws Exception
     */
    @PostMapping("/search/single")
    BaseResultDto single(SingleLongEntity entity) throws Exception;

}
