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.group.type.group.RiskGroupTypeGroupDto;
import com.crm.rely.backend.core.entity.base.SingleLongEntity;
import com.crm.rely.backend.core.entity.risk.group.type.group.RiskGroupTypeGroupAddEntity;
import com.crm.rely.backend.core.entity.risk.group.type.group.RiskGroupTypeGroupDeleteEntity;
import com.crm.rely.backend.core.entity.risk.group.type.group.RiskGroupTypeGroupSearchPageEntity;
import com.crm.rely.backend.core.entity.risk.group.type.group.RiskGroupTypeGroupUpdateEntity;
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/group/type/group/manager")
public interface RiskGroupTypeGroupFeignService {

    /**
     * @param entity
     * @return
     * @throws Exception
     */
    @PostMapping("/add")
    BaseResultDto add(@RequestBody @Validated RiskGroupTypeGroupAddEntity entity) throws Exception;

    @PostMapping("/update")
    BaseResultDto update(@RequestBody @Validated RiskGroupTypeGroupUpdateEntity entity) throws Exception;

    @PostMapping("/delete")
    BaseResultDto delete(@RequestBody @Validated RiskGroupTypeGroupDeleteEntity entity) throws Exception;

    @PostMapping("/search/list")
    ResultWithPagerDto<RiskGroupTypeGroupDto> pageList(@RequestBody @Validated RiskGroupTypeGroupSearchPageEntity entity) throws Exception;

    @PostMapping("/search/single")
    BaseResultDto<RiskGroupTypeGroupDto> single(@RequestBody @Validated SingleLongEntity entity) throws Exception;
}
