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.RiskGroupTypeLoginDto;
import com.crm.rely.backend.core.entity.base.SingleLongEntity;
import com.crm.rely.backend.core.entity.risk.group.type.RiskGroupTypeLoginAddEntity;
import com.crm.rely.backend.core.entity.risk.group.type.RiskGroupTypeLoginDeleteEntity;
import com.crm.rely.backend.core.entity.risk.group.type.RiskGroupTypeLoginSearchPageEntity;
import com.crm.rely.backend.core.entity.risk.group.type.RiskGroupTypeLoginUpdateEntity;
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/login/manager")
public interface RiskGroupTypeLoginFeignService {

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

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

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

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

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