package com.crm.manager.service.ucard;

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.ucard.CardNumberDto;
import com.crm.rely.backend.core.entity.base.BaseDeleteEntities;
import com.crm.rely.backend.core.entity.ucard.CardNumberAddEntity;
import com.crm.rely.backend.core.entity.ucard.CardNumberPageEntity;
import com.crm.rely.backend.core.entity.ucard.CardNumberUpdateEntity;
import com.crm.rely.backend.core.entity.ucard.CardNumberVerifyEntity;
import com.crm.rely.backend.exception.ServiceException;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

@FeignClient(name = "UCARD-SERVICE", path = "/ucard/number/manager")
public interface UcardNumberFeignService {

    /**
     * 校验实体卡卡号是否使用过
     */
    @PostMapping("/verify")
    BaseResultDto cardNumberVerify(CardNumberVerifyEntity entity) throws ServiceException;

    /**
     * 导入卡号
     */
    @PostMapping("/import")
    BaseResultDto cardNumberImport(List<CardNumberAddEntity> entityList) throws ServiceException;

    /**
     * 卡号列表
     */
    @PostMapping("/list")
    ResultWithPagerDto<CardNumberDto> queryCardNumberList(CardNumberPageEntity entity) throws ServiceException;

    /**
     * 修改卡号状态
     */
    @PostMapping("/update/status")
    BaseResultDto saveCardNumberStatus(CardNumberUpdateEntity entity) throws ServiceException;

    /**
     * 卡号下拉列表
     */
    @PostMapping("/dropdown")
    BaseResultDto queryCardNumberDropdown(CardNumberPageEntity entity) throws ServiceException;

    /**
     * 删除实体卡卡号
     */
    @PostMapping("/delete")
    BaseResultDto deleteCardNumber(BaseDeleteEntities entity) throws ServiceException;

}
