package com.crm.manager.service.ib;

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.entity.ib.balance.AgentBalanceRecordAddEntity;
import com.crm.rely.backend.core.entity.ib.balance.AgentBalanceRecordListEntity;
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/agent/balance/record")
public interface AgentBalanceRecordService {

    /**
     * 添加记录
     *
     * @param entity
     * @throws Exception
     */
    @PostMapping("/add")
    BaseResultDto<Object> add(AgentBalanceRecordAddEntity entity) throws Exception;

    /**
     * 根据ID获取信息
     *
     * @param id
     * @return
     * @throws Exception
     */
    @PostMapping("/search/single")
    BaseResultDto<AgentBalanceRecordDto> getById(Long id) throws Exception;

    /**
     * 列表
     *
     * @param entity
     * @return
     * @throws Exception
     */
    @PostMapping("/search/list")
    BaseResultWithPagerDto<List<AgentBalanceRecordDto>> getList(AgentBalanceRecordListEntity entity) throws Exception;

    /**
     * 根据ID删除信息
     *
     * @param id
     * @throws Exception
     */
    @PostMapping("/delete/single")
    BaseResultDto<Object> deleteById(Long id) throws Exception;

    /**
     * 导入
     * @param entities
     * @return
     */
    @PostMapping("/batchAdd")
    BaseResultDto<Object> batchAdd(List<AgentBalanceRecordAddEntity> entities) throws Exception;
}
