package com.crm.manager.service.risk;

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.risk.copy.trade.array.RiskCopyTradeArrayDto;
import com.crm.rely.backend.core.dto.risk.copy.trade.array.record.RiskCopyTradeArrayMtRecordDto;
import com.crm.rely.backend.core.entity.risk.copy.trade.array.RiskCopyTradeArrayAddEntity;
import com.crm.rely.backend.core.entity.risk.copy.trade.array.RiskCopyTradeArrayDeleteEntity;
import com.crm.rely.backend.core.entity.risk.copy.trade.array.RiskCopyTradeArraySearchPageEntity;
import com.crm.rely.backend.core.entity.risk.copy.trade.array.record.RiskCopyTradeArrayRecordAddEntity;
import com.crm.rely.backend.core.entity.risk.copy.trade.array.record.RiskCopyTradeArrayRecordCloseEntity;
import com.crm.rely.backend.core.entity.risk.copy.trade.array.record.RiskCopyTradeArrayRecordSearchPageEntity;
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;

@FeignClient(name = "RISKBBI-SERVICE", path = "/risk/copy/trade/array/manager")
public interface RiskCopyTradeArrayFeignService {


    @PostMapping("/add")
    BaseResultDto add(@RequestBody @Validated RiskCopyTradeArrayAddEntity entity) throws Exception;

    /**
     * 删除规则
     *
     * @param entity
     * @return
     * @throws Exception
     */
    @PostMapping("/delete")
    BaseResultDto delete(@RequestBody @Validated RiskCopyTradeArrayDeleteEntity entity) throws Exception;


    /**
     * 查看绑定列表
     *
     * @param entity
     * @return
     * @throws Exception
     */
    @PostMapping("/search/list")
    ResultWithPagerDto<RiskCopyTradeArrayDto> searchPage(@RequestBody @Validated RiskCopyTradeArraySearchPageEntity entity) throws Exception;

    /**
     * 查看绑定主账户持仓订单列表-关系列表中有是否订单已拷贝标记
     *
     * @param entity
     * @return
     * @throws Exception
     */
    @PostMapping("/search/record/list")
    ResultWithPagerDto<RiskCopyTradeArrayMtRecordDto> searchRecordList(@RequestBody @Validated RiskCopyTradeArrayRecordSearchPageEntity entity) throws Exception;

    /**
     * 订单拷贝
     *
     * @param entity
     * @return
     * @throws Exception
     */
    @PostMapping("/record/add")
    BaseResultDto searchRecordAdd(@RequestBody @Validated RiskCopyTradeArrayRecordAddEntity entity) throws Exception;

    @PostMapping("/record/close")
    BaseResultDto searchRecordClose(@RequestBody @Validated RiskCopyTradeArrayRecordCloseEntity entity) throws Exception;
}
